Skip to main content
skill CX Codex

latex-econ-model — Claude Code skill: what it does, how to install

latex-econ-model typesets economic theory models in LaTeX using standard academic notation, from utility optimization to dynamic programming setups.

CC0-1.0 147 installs ★ 675 updated 2026-09-26

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add meleantonio/awesome-econ-ai-stuff --skill latex-econ-model -a claude-code
Open on GitHub

What latex-econ-model does

This skill formats economics theory sections and lecture notes according to academic conventions. It prompts for the model category, active agents, and constraints, then outputs a structured LaTeX document: environment, preferences or technology, constraints, equilibrium definitions, and first-order conditions.

The generated code includes ready-made blocks for consumer utility maximization, firm profit problems, Bellman equations, and game theory setups. It automatically includes essential packages such as amsmath, mathtools, amssymb, and amsthm. Custom shortcuts for expectations, partial derivatives, and argmax operators are already defined in the preamble.

Without mathtools and the AMS packages installed in your TeX distribution, the provided macros and multiline equation environments will fail to compile.

What it helps with

  • typeset a two-period consumer optimization problem with budget constraints
  • format dynamic programming Bellman equations for firm capital accumulation
  • derive first-order conditions using Lagrangian multipliers in LaTeX
  • configure standard economics macros for expectations and partial derivatives

Example prompts for the agent

  • Set up a two-period consumer utility maximization problem and derive the Euler equation in LaTeX
  • Write the dynamic programming problem for a firm with capital accumulation as a Bellman equation
  • Draft a LaTeX proposition and proof for consumption smoothing under equal discount and interest rates

How to install latex-econ-model

1Skills CLI (Vercel)

npx skills add meleantonio/awesome-econ-ai-stuff --skill latex-econ-model -a claude-code

2Manually: put the files in place

~/.claude/skills/latex-econ-model/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/latex-econ-model/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about latex-econ-model

How to install latex-econ-model in Claude Code?

Run npx skills add meleantonio/awesome-econ-ai-stuff --skill latex-econ-model -a claude-code. The skill definition will be saved to ~/.claude/skills/latex-econ-model/SKILL.md.

What does latex-econ-model do?

It formats economic theory setups in LaTeX, applying standard notation for utilities, prices, dynamic constraints, and equilibrium conditions.

Which LaTeX packages are required for the generated output?

The output relies on amsmath, amssymb, amsthm, mathtools, bm, and dsfont.

Source text

SKILL.md · CC0-1.0
---
name: latex-econ-model
description: Write and typeset economic models in LaTeX with proper notation
workflow_stage: theory
compatibility:
  - claude-code
  - cursor
  - codex
  - gemini-cli
author: Awesome Econ AI Community
version: 1.0.0
tags:
  - LaTeX
  - economic-models
  - theory
  - equations
---

# 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

- [AMS-LaTeX User's Guide](https://www.ams.org/arc/resources/amslatex-about.html)
- [The Not So Short Introduction to LaTeX](https://tobi.oetiker.ch/lshort/lshort.pdf)
- [Mathpix](https://mathpix.com/) - Convert handwritten equations to LaTeX

## Changelog

### v1.0.0
- Initial release with consumer, firm, and game theory templates

© Awesome Econ AI Community · CC0-1.0 · meleantonio/awesome-econ-ai-stuff

Similar skills

All skills for Science and research →

From the same set12

The whole set →
r-econometrics r-econometrics generates R code for causal inference and panel data using fixest, complete with diagnostics and publication tables. Useful for IV, DiD, and RDD research designs. CX Codex +1 340installs beamer-presentation beamer-presentation is a Claude Code skill that builds academic Beamer decks from a paper or project, with timed structure, themes, charts, and tables. CX Codex +1 285installs lit-review-assistant lit-review-assistant structures economics literature reviews, crafts database queries, and tracks research gaps. Helps synthesize empirical papers into standardized markdown templates. CX Codex +1 241installs api-data-fetcher The api-data-fetcher skill helps an agent pull economic indicators from FRED, World Bank, and other APIs. Use it for datasets, recurring updates, or cross-country panels. CX Codex +1 208installs econ-visualization econ-visualization generates publication-ready figures and charts for economics research in R or Python. CX Codex +1 202installs research-ideation research-ideation guides economists from raw observations or datasets to testable research questions. Useful when starting dissertation projects or designing policy evaluations. CX Codex +1 196installs python-panel-data python-panel-data is a Claude Code skill that generates Python code for panel-data analysis, including fixed- and random-effects models, difference-in-differences, and regression tables. CX Codex +1 163installs latex-tables Creates clean LaTeX tables for regression results and summary statistics using academic formatting standards. Use it when you need to format statistical output for journal submission. CX Codex +1 128installs

Project sponsors

Companies that keep this analytics open