Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Write and typeset economic models in LaTeX with proper notation
.claude/skills/brycewang-stanford-latex-econ-model/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-18 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-10 | ✓→✓ | = Same ✓ | 91% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 56% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 80% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 81% | 0% |
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.
Ask the user:
Follow economics conventions:
Organize as:
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% 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
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}}
align environment for multiline equations\label{} and reference with \eqref{}\text{} for words in equations (not bare text)\boxed{}* for multiplication (use \cdot or implicit multiplication)\left( and \right) for auto-sizing brackets= signs$$ ... $$ instead of proper environments| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-10 | pass→pass | 15,880 | 12,055 | -24% | 1 | 1 | 0% | 2,153 | 4,108 | +91% | 0 | 0 | — |
case-01 | fail→fail | 14,952 | 9,114 | -39% | 1 | 1 | 0% | 3,401 | 4,089 | +20% | 0 | 0 | — |
case-02 | fail→fail | 19,220 | 19,490 | +1% | 1 | 1 | 0% | 4,135 | 6,168 | +49% | 0 | 0 | — |
case-03 | fail→fail | 18,970 | 16,434 | -13% | 1 | 1 | 0% | 3,929 | 5,713 | +45% | 0 | 0 | — |
case-04 | pass→pass | 12,347 | 9,358 | -24% | 1 | 1 | 0% | 2,465 | 3,856 | +56% | 0 | 0 | — |
case-05 | pass→pass | 9,081 | 5,348 | -41% | 1 | 1 | 0% | 1,616 | 2,910 | +80% | 0 | 0 | — |
case-06 | pass→pass | 8,861 | 5,238 | -41% | 1 | 1 | 0% | 1,602 | 2,905 | +81% | 0 | 0 | — |
case-07 | pass→pass | 11,350 | 7,276 | -36% | 1 | 1 | 0% | 2,068 | 3,311 | +60% | 0 | 0 | — |
case-08 | pass→pass | 20,066 | 11,758 | -41% | 1 | 1 | 0% | 3,731 | 4,152 | +11% | 0 | 0 | — |
case-09 | pass→pass | 10,342 | 4,608 | -55% | 1 | 1 | 0% | 1,721 | 2,755 | +60% | 0 | 0 | — |
case-11 | pass→pass | 7,271 | 5,458 | -25% | 1 | 1 | 0% | 1,295 | 2,983 | +130% | 0 | 0 | — |
case-12 | pass→pass | 8,090 | 5,220 | -35% | 1 | 1 | 0% | 1,479 | 2,930 | +98% | 0 | 0 | — |
case-13 | pass→pass | 7,770 | 10,019 | +29% | 1 | 1 | 0% | 1,836 | 3,901 | +112% | 0 | 0 | — |
case-14 | pass→pass | 10,772 | 10,153 | -6% | 1 | 1 | 0% | 2,556 | 4,211 | +65% | 0 | 0 | — |
case-15 | pass→pass | 9,462 | 6,509 | -31% | 1 | 1 | 0% | 2,299 | 3,465 | +51% | 0 | 0 | — |
case-16 | pass→pass | 8,984 | 9,074 | +1% | 1 | 1 | 0% | 1,754 | 4,041 | +130% | 0 | 0 | — |
case-17 | pass→pass | 10,880 | 15,154 | +39% | 1 | 1 | 0% | 2,271 | 4,952 | +118% | 0 | 0 | — |
case-18 | fail→pass | 10,947 | 7,507 | -31% | 1 | 1 | 0% | 2,544 | 3,651 | +44% | 0 | 0 | — |
case-19 | pass→pass | 11,359 | 9,981 | -12% | 1 | 1 | 0% | 2,225 | 3,795 | +71% | 0 | 0 | — |
case-20 | pass→pass | 15,378 | 14,448 | -6% | 1 | 1 | 0% | 2,716 | 4,744 | +75% | 0 | 0 | — |
case-21 | pass→pass | 7,267 | 5,254 | -28% | 1 | 1 | 0% | 1,434 | 2,976 | +108% | 0 | 0 | — |
case-22 | pass→pass | 7,812 | 10,940 | +40% | 1 | 1 | 0% | 1,718 | 4,271 | +149% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.