Latex Econ Model logo

Latex Econ Model

CommunityPopular
brycewang-stanford
latex-econ-model

Write and typeset economic models in LaTeX with proper notation

Overview

Publisherbrycewang-stanford
RepositoryAuto-Empirical-Research-Skills
Skill namelatex-econ-model
Stars
3.8K
Forks
479
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by brycewang-stanford on GitHub. Read the source before you install it.

Installation

Install the Latex Econ Model AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills.git /tmp/Auto-Empirical-Research-Skills
mkdir -p .claude/skills
cp -r /tmp/Auto-Empirical-Research-Skills/skills/09-meleantonio-awesome-econ-ai-stuff/_skills/theory/latex-econ-model .claude/skills/latex-econ-model
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Latex Econ Model in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Latex Econ Model on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Latex Econ Model is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

LaTeX Economic Model Writer

Purpose

This skill helps economists write and typeset economic models in LaTeX with proper mathematical notation, consistent formatting, and academic conventions. It covers utility maximization, equilibrium conditions, dynamic programming, and game theory models.

When to Use

  • Writing the theory section of a paper
  • Formalizing an economic model
  • Creating lecture notes with equations
  • Typesetting optimization problems and equilibrium conditions

Instructions

Step 1: Understand the Model Type

Ask the user:

  1. What type of model? (Static optimization, dynamic programming, game theory, general equilibrium)
  2. What are the agent types? (Consumer, firm, government, etc.)
  3. What constraints apply?
  4. Should it include proofs or just the setup?

Step 2: Use Standard Notation

Follow economics conventions:

  • Utility: $U$, $u$, or $v$
  • Production: $F$, $f$, or $Y$
  • Prices: $p$, $w$, $r$
  • Quantities: $q$, $x$, $y$
  • Time subscripts: $t$, $t+1$
  • Greek letters for parameters: $\alpha$, $\beta$, $\gamma$, $\delta$

Step 3: Structure the Model

Organize as:

  1. Environment - Agents, goods, time horizon
  2. Preferences/Technology - Utility functions, production functions
  3. Constraints - Budget, resource, incentive compatibility
  4. Equilibrium concept - Definition and conditions
  5. Solution - First-order conditions, closed-form solutions

Example Output

latex
\documentclass{article}
\usepackage{amsmath, amssymb, amsthm}
\usepackage{mathtools}

% Theorem environments
\newtheorem{definition}{Definition}
\newtheorem{proposition}{Proposition}
\newtheorem{lemma}{Lemma}

% Custom commands for economics
\newcommand{\E}{\mathbb{E}}          % Expectation
\newcommand{\R}{\mathbb{R}}          % Real numbers
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}  % Partial derivative

\begin{document}

\section{A Simple Consumer Problem}

\subsection{Environment}

Consider a consumer who lives for two periods, $t \in \{1, 2\}$. The consumer has preferences over consumption $c_t$ represented by the utility function:
%
\begin{equation}
    U(c_1, c_2) = u(c_1) + \beta u(c_2)
\end{equation}
%
where $\beta \in (0,1)$ is the discount factor and $u(\cdot)$ is strictly increasing and strictly concave.

\subsection{Constraints}

The consumer earns income $y_1$ in period 1 and $y_2$ in period 2. She can save at gross interest rate $R = 1 + r$. The budget constraints are:
%
\begin{align}
    c_1 + s &= y_1 \label{eq:bc1}\\
    c_2 &= y_2 + Rs \label{eq:bc2}
\end{align}
%
where $s$ denotes savings. Combining \eqref{eq:bc1} and \eqref{eq:bc2} yields the intertemporal budget constraint:
%
\begin{equation}
    c_1 + \frac{c_2}{R} = y_1 + \frac{y_2}{R} \equiv W
\end{equation}

\subsection{Optimization Problem}

The consumer solves:
%
\begin{equation}
    \max_{c_1, c_2} \quad u(c_1) + \beta u(c_2) 
    \quad \text{s.t.} \quad c_1 + \frac{c_2}{R} = W
\end{equation}

\subsection{Solution}

The Lagrangian is:
%
\begin{equation}
    \mathcal{L} = u(c_1) + \beta u(c_2) + \lambda\left(W - c_1 - \frac{c_2}{R}\right)
\end{equation}

First-order conditions:
%
\begin{align}
    \pd{\mathcal{L}}{c_1} &= u'(c_1) - \lambda = 0 \\
    \pd{\mathcal{L}}{c_2} &= \beta u'(c_2) - \frac{\lambda}{R} = 0
\end{align}

Combining these yields the \textbf{Euler equation}:
%
\begin{equation}
    \boxed{u'(c_1) = \beta R \cdot u'(c_2)}
\end{equation}

\begin{proposition}[Consumption Smoothing]
If $\beta R = 1$, then $c_1^* = c_2^*$ (perfect consumption smoothing).
\end{proposition}

\begin{proof}
When $\beta R = 1$, the Euler equation becomes $u'(c_1) = u'(c_2)$. Since $u$ is strictly concave, $u'$ is strictly decreasing, which implies $c_1 = c_2$.
\end{proof}

%====================================
\section{A Firm's Dynamic Problem}
%====================================

Consider a firm that maximizes the present value of profits:
%
\begin{equation}
    \max_{\{k_{t+1}, n_t\}_{t=0}^{\infty}} \sum_{t=0}^{\infty} \beta^t \left[ F(k_t, n_t) - w_t n_t - I_t \right]
\end{equation}
%
subject to the capital accumulation equation:
%
\begin{equation}
    k_{t+1} = (1 - \delta) k_t + I_t
\end{equation}

The Bellman equation is:
%
\begin{equation}
    V(k) = \max_{k', n} \left\{ F(k, n) - wn - k' + (1-\delta)k + \beta V(k') \right\}
\end{equation}

\end{document}

LaTeX Packages to Include

latex
% Essential packages for economics papers
\usepackage{amsmath}    % Enhanced math environments
\usepackage{amssymb}    % Mathematical symbols
\usepackage{amsthm}     % Theorem environments
\usepackage{mathtools}  % Extensions to amsmath
\usepackage{bm}         % Bold math symbols
\usepackage{dsfont}     % \mathds for indicator functions

Useful Custom Commands

latex
% Expectation and probability
\newcommand{\E}{\mathbb{E}}
\newcommand{\Var}{\text{Var}}
\newcommand{\Cov}{\text{Cov}}
\newcommand{\Prob}{\mathbb{P}}

% Indicator function
\newcommand{\ind}{\mathds{1}}

% Partial derivatives
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\pdd}[2]{\frac{\partial^2 #1}{\partial #2^2}}

% Argmax/argmin
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}

% Blackboard bold
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}

Best Practices

  1. Use align environment for multiline equations
  2. Label important equations with \label{} and reference with \eqref{}
  3. Use \text{} for words in equations (not bare text)
  4. Box key results with \boxed{}
  5. Define custom commands for repeated notation
  6. Use consistent subscript conventions ($t$ for time, $i$ for individuals)

Common Pitfalls

  • ❌ Using * for multiplication (use \cdot or implicit multiplication)
  • ❌ Forgetting \left( and \right) for auto-sizing brackets
  • ❌ Inconsistent notation across the paper
  • ❌ Not aligning equations at = signs
  • ❌ Using $$ ... $$ instead of proper environments

References

Changelog

v1.0.0

  • Initial release with consumer, firm, and game theory templates

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Latex Econ Model AI skill do?

Write and typeset economic models in LaTeX with proper notation

Why use Latex Econ Model on TypingMind?

Because you install it once and use it with any model. Latex Econ Model is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Latex Econ Model in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills/tree/main/skills/09-meleantonio-awesome-econ-ai-stuff/_skills/theory/latex-econ-model. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Latex Econ Model?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Latex Econ Model?

As many as you like. As long as a model supports skills, you can use Latex Econ Model with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Latex Econ Model AI skill free?

It is published on GitHub by brycewang-stanford. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇