Write your AI assistant config once. Use it in every assistant.
Website · Quickstart · Docs · Architecture · Contributing
Your team's AI assistant config is scattered across seven formats. Someone wrote
CLAUDE.md. Someone else keeps .cursor/rules/. Copilot reads
.github/copilot-instructions.md. They say almost the same thing, and they
drift apart the moment anyone edits one of them.
OpenCastle compiles one source into all of them, and tells you when they fall out of sync.
npx opencastle initIt reads your repository first: which assistants you already have config for, which framework and database you use, which test runner. Then it shows you what it found and asks once.
🏰 OpenCastle
Found assistant config:
• Claude Code (CLAUDE.md)
Will compile for:
→ Claude Code
Integrations detected:
nextjs, supabase, vitest, chrome-devtools
Set this up? [Y/n]
No questionnaire. Your existing files are never overwritten — OpenCastle tells you which ones it left alone.
Full walkthrough: docs/quickstart.md — five minutes.
opencastle # what's installed, what drifted, what to run next
opencastle sync # recompile every target from source
opencastle sync --check # fail if anything drifted (for CI)
opencastle add stripe # adopt a new tool, recompile
opencastle doctor # diagnose setup problemsRunning opencastle with no arguments is the one command worth remembering. It
answers the question you actually have:
🏰 OpenCastle
! 2/3 targets in sync (sources are newer)
✓ claude-code up to date
✓ cursor up to date
! vscode 4 paths missing
Next: opencastle sync
generated files are older than the framework sources
sync --check compiles to a scratch directory and compares. It writes nothing and
exits non-zero when a generated file no longer matches its source — someone edited
.cursor/rules/foo.mdc by hand, added a file under a generated directory, or
upgraded without recompiling.
# .github/workflows/opencastle.yml
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npx opencastle sync --checkCommit the generated config, like a lockfile. That is what gives the check
something to compare and what lets a teammate clone the repo and have working
rules without running anything. Only .env and run artefacts are gitignored.
Upgrading from 0.35 or earlier? Run opencastle sync once — it rewrites the
.gitignore block, repairs the manifest, and adopts root files an older release
generated, keeping a .opencastle-backup of each. See
the quickstart.
| Assistant | Compiles to |
|---|---|
| Claude Code | CLAUDE.md + .claude/ |
| GitHub Copilot | .github/ — agents, skills, prompts |
| Cursor | .cursorrules + .cursor/rules/*.mdc |
| Windsurf | .windsurfrules + .windsurf/rules/*.md |
| OpenCode | AGENTS.md + .opencode/ + opencode.json |
| Codex CLI | AGENTS.md + .codex/ |
| Antigravity | GEMINI.md + .agents/ |
Each target gets that assistant's native format, including its own frontmatter dialect for how a rule is scoped. MCP servers are configured per assistant too, in whichever shape it expects.
Agents — 13 role definitions (Developer, UI/UX, Data, Security, Testing, Reviewer, and others), each with a defined scope and output contract.
Skills — 27 domain skills plus 30 tool integrations, loaded on demand so they don't sit in the context window. Selected during init from what your repository actually uses.
Workflows — 9 templates for recurring work: features, bug fixes, data pipelines, security audits, migrations.
Quality gates — a review pass after each step, panel review for high-stakes changes, plus your own lint, test, and build commands.
Agents declare a capability tier — premium, standard, or economy — rather than a model name. Your assistant picks the model: it knows which ones your account can reach and what they cost today. A pinned model name can only be wrong later.
For work too long to sit and watch, the convoy engine runs tasks in dependency order across isolated git worktrees, with SQLite persistence so a crash resumes instead of restarting.
opencastle convoy "Add user reviews to the place detail page"
opencastle convoy # where did the last run get to?
opencastle convoy resume # continue after an interruptionIt plans the work, executes it, and runs your gates. Inspired by Steve Yegge's Gas Town.
This part is experimental and may change. The compiler above does not depend on it.
See ARCHITECTURE.md for how the adapters, skill matrix, and convoy engine fit together.
- Fork the repo
- Create a branch —
feat/your-featureorfix/your-fix - Make changes and ensure
npm testandnpx tsc --noEmitpass - Open a PR
See CONTRIBUTING.md for details.
MIT — see LICENSE.
