OpenCastle Documentation
Everything you need to install, configure, and run your AI agent team — interactively through IDE chat or automated via the Convoy Engine.
See it in action
Quick Start
Install
npx opencastle init Confirm what it found
It reads your repository first — which assistants already have config, which framework, database, and test runner you use — shows the plan, and asks once. Files you already wrote are never overwritten: your CLAUDE.md keeps its content and the generated config goes into a managed block below it. Prefer to choose by hand? npx opencastle init --customize.
Open your IDE
Open VS Code and reload the window (Cmd+Shift+P → “Developer: Reload Window”). This loads the OpenCastle agents, skills, and instructions.
Open Cursor — the rules will be loaded automatically from .cursor/rules/.
Run claude in your terminal from the project root. CLAUDE.md will be auto-loaded.
Run opencode in your terminal from the project root. AGENTS.md will be auto-loaded.
Open Windsurf — the rules will be loaded automatically from .windsurf/rules/.
Run codex in your terminal from the project root. AGENTS.md will be auto-loaded.
Open Antigravity — GEMINI.md will be auto-loaded from the project root.
Bootstrap your project
If you have an existing codebase, run the bootstrap prompt first. It scans your project and generates tailored configuration.
In Copilot Chat, select the Team Lead agent and run the Bootstrap Customizations prompt. The Team Lead will scan your project, detect your tech stack, and generate tailored configuration files in .opencastle/.
Start a new chat and ask: “Run the Bootstrap Customizations prompt”. The Team Lead will scan your project, detect your tech stack, and generate tailored configuration files in .opencastle/.
Run the /bootstrap-customizations command. The Team Lead will scan your project, detect your tech stack, and generate tailored configuration files in .opencastle/.
Run the bootstrap-customizations prompt. The Team Lead will scan your project, detect your tech stack, and generate tailored configuration files in .opencastle/.
Start a new chat and ask: “Run the Bootstrap Customizations prompt”. The Team Lead will scan your project, detect your tech stack, and generate tailored configuration files in .opencastle/.
Run the bootstrap-customizations prompt. The Team Lead will scan your project, detect your tech stack, and generate tailored configuration files in .opencastle/.
Run the bootstrap-customizations prompt. The Team Lead will scan your project, detect your tech stack, and generate tailored configuration files in .opencastle/.
Skip this step for brand-new projects — there’s nothing to detect yet.
Start building
You’re ready to go. Choose how you want to work:
Staying in sync
Ask what needs doing
Run opencastle with no arguments. It reports which targets exist, whether the generated files are still current, which assistants are configured but not being compiled, and the one command to run next.
Recompile
opencastle sync regenerates every target from source. Your .opencastle/ customizations and anything outside a managed block are left alone.
Catch drift in CI
opencastle 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, dropped a file into a generated directory, or upgraded without recompiling. Without it, drift is invisible: a stale rule file still loads fine.
Commit 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.
# .github/workflows/opencastle.yml
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npx opencastle sync --check Adopt a new tool
opencastle add supabase updates the stored stack and recompiles, so the integration's skills and MCP config reach every target. opencastle add --list shows what is available.
Agentic Development
guideGuide to agentic development and multi-agent orchestration. Vibecoding best practices, prompt patterns, specialist agents, quality gates, and how to coordinate AI agent teams.
CLI Reference
6 commandsComplete reference for every opencastle command — init, sync, add, doctor, remove, and the experimental convoy namespace.
Prompt Templates
8 promptsReady-to-use prompt templates for the Team Lead agent. Brainstorm ideas, implement features, fix bugs, resolve PR comments, and generate task specs.
Plugin Setup Guide
31 pluginsConfigure plugins for your AI coding agents. Each plugin bundles skills, optional MCP server configs, and agent tool mappings.
Use Cases
1 recipeCookbook-style recipes for common projects. Follow step-by-step guides to build real applications with your AI agent team.