dynare-copilot

English | 中文 | 日本語
A Claude Code skill that takes your macroeconomic intuition — "I want a New Keynesian model with a financial accelerator," "replicate Smets-Wouters 2007" — and turns it into a working, validated Dynare .mod file with steady state solved and IRFs in hand.
Its core job is to enforce the workflow experienced modelers follow anyway: derive first, translate second, validate incrementally — so timing errors, naming conflicts, and steady-state algebra mistakes get caught before they become wrong results. Concretely, it gives you:
- A vetted starting point, never a blank page — a built-in dual reference library (149 MMB replication models for economic structure + 89 Pfeifer examples for Dynare syntax) means every model starts from working code.
- A tool that sharpens with use — every model you finish is archived and consulted on future tasks; every bug you hit is logged with its fix, so the same trap is never debugged twice.
- Faithful replication, never a guessed model — when a paper hands part of its model off to another paper ("the financial block is identical to Gertler-Karadi 2011"), it stops and asks you for that source instead of silently reconstructing the missing block from memory.
- Paper-ready output — every IRF is delivered as a publication-quality vector figure, ready to drop into your manuscript.
No timing pitfalls. No silent errors. No blank page.
Enjoy the world of macroeconomics.
Contents
Requirements
| What you want to do | What you need |
|---|
Let it write / edit / inspect .mod files | A coding agent: Claude Code or OpenAI Codex |
Run the generated .mod files yourself | Also install Dynare 7.1 + MATLAB or Octave |
| Let it run automatically and iterate on errors | Also install a MATLAB MCP server in VSCode |
You can still use it without MATLAB: it can write models and inspect errors, but it will not run Dynare for you.
Providing the specific paper can greatly reduce response time and token usage.
🔌 New to MCP? If you've never connected MATLAB (or Stata) to Claude Code before, follow the step-by-step beginner's guide: Connecting MATLAB / Stata to Claude Code (MCP Setup Guide). It assumes zero prior setup and covers installing Claude Code, wiring up the MATLAB MCP that powers the automatic run-debug loop above, and the Stata MCP.
Installation (about 1 minute)
Using OpenAI Codex instead of Claude Code? Skip to Use with OpenAI Codex.
First install Claude Code. See the official installation guide; a common method is npm install -g @anthropic-ai/claude-code. Then:
-
In a terminal, enter any project directory and run claude to start Claude Code.
-
In the Claude Code conversation, paste the following two commands one line at a time:
/plugin marketplace add EconSolider/dynare-copilot
/plugin install dynare-copilot@econsolider-skills
The first line registers this repository as a plugin marketplace, and the second line installs the dynare-copilot plugin.
-
Done. If typing / shows the dynare-copilot skill in the menu, the installation succeeded.
Update
To pull the latest version after installing, run these two commands in Claude Code, one line at a time:
/plugin marketplace update econsolider-skills
/plugin update dynare-copilot@econsolider-skills
The first line refreshes the marketplace metadata from the repository; the second line upgrades the installed plugin to the latest released version. Restart Claude Code if the change doesn't take effect immediately.
Enable auto-update (recommended)