OpenCastle compiles 7 prompts for every assistant in your project. In Claude Code and VS Code
Copilot Chat each one is a slash command under one namespace — /oc:bug-fix — so it
never collides with a command of your own. Each is written for the Team Lead; in Copilot Chat it
also selects that agent. All of them work in your session, except
Convoy, which hands the work to the experimental convoy engine. The planner's
own steps are listed at the end: the CLI runs them, and they are not commands.
How to use
| Assistant | Where the prompts are | How to run one |
|---|---|---|
| Claude Code | .claude/commands/oc/<name>.md | Type /oc: and pick one — /oc:bug-fix — then describe the task |
| VS Code (GitHub Copilot) | .github/prompts/oc.<name>.prompt.md | In Copilot Chat, type /oc: and pick one; it also selects the agent |
| Cursor | .cursor/rules/prompts/<name>.mdc | Ask for it by name: “run the bug-fix prompt: …” |
| Windsurf (Devin Desktop) | .windsurf/rules/prompts/<name>.md | Ask for it by name |
| OpenCode | .opencode/prompts/<name>.md | Ask for it by name |
| Codex CLI | .codex/prompts/<name>.md | Ask for it by name |
| Antigravity | .agents/prompts/<name>.md | Ask for it by name |
What you type after the command, or after the prompt's name, is the input.
npx opencastle explain lists the prompts compiled in your project
and where each assistant reads them. The workflow templates sit beside the prompts:
/oc:workflow-<name> in Claude Code, and an agent-workflows/ or
workflows/ directory for the other assistants.
Workflow templates
For recurring kinds of work that need more than a prompt: the steps, which agent does each, and what to check. The Team Lead follows one when a task matches it; in Claude Code each is also a command. Every template ends with the same delivery phase, compiled into it.
| Template | For | Claude Code |
|---|---|---|
| Database Migration | Schema, access-policy and data migrations: plan, migrate, regenerate the types, integrate, verify every role | /oc:workflow-database-migration |
| CMS Schema Changes | Content-model changes, and the queries and pages that use them | /oc:workflow-schema-changes |
| Data Pipeline | Crawl, process, validate and import data, a test batch first | /oc:workflow-data-pipeline |
| Performance Optimization | Measure, find the bottleneck, optimize, measure again; a change stays only if it helps | /oc:workflow-performance-optimization |
| Refactoring | Changing code without changing behaviour: tests for what it does first, a panel for large or security-sensitive changes | /oc:workflow-refactoring |
| Security Audit | A security review, a panel on the findings, and fixing what it finds | /oc:workflow-security-audit |
| Assistant | Where the workflow templates are |
|---|---|
| Claude Code | .claude/commands/oc/workflow-<name>.md |
| VS Code (GitHub Copilot) | .github/agent-workflows/<name>.md |
| Cursor | .cursor/rules/agent-workflows/<name>.mdc |
| Windsurf (Devin Desktop) | .windsurf/rules/agent-workflows/<name>.md |
| OpenCode | .opencode/workflows/<name>.md |
| Codex CLI | .codex/workflows/<name>.md |
| Antigravity | .agents/workflows/<name>.md |
Planning
Brainstorm
Collaborative brainstorm to explore requirements, approaches, and trade-offs BEFORE committing to a plan. Use when the task has ambiguity, multiple valid approaches, or significant design decisions.
When to use
When a task has ambiguity, multiple valid approaches, or design decisions to make before implementation. Use this before reaching for an implementation prompt.
What it does
Runs a structured brainstorm — clarifies the problem, explores the solution space, generates alternatives, evaluates trade-offs, and defines scope before any code is written. The report it ends with is the input for implement-feature.
/oc:brainstorm Implementation
Implement Feature
Implement a change in this session — a feature, a roadmap item or a small follow-up — planned to its size, built with tests, verified, reviewed, and delivered as a pull request.
When to use
For any change you want made now. A change in one area the Team Lead makes itself; one across the API, the UI and the data it splits into tasks for the specialist agents, each with the files it may change. Work you want planned into parallel tasks and run unattended is Convoy.
What it does
- Understands it — the goal and what done means, from your request, a tracker issue it names, the Project Context, lessons, known issues and the code
- Plans it to its size — does a small change itself; splits a larger one by area and dependency
- Builds it — with the tests, following the project's conventions and the skill for each domain
- Verifies it — the project's tests, lint and build; a UI change in a browser; a review by an agent that did not write it, and a panel of three for auth, payments, migrations or deleting data
- Delivers it — a branch and a pull request, never
main, with what changed and how it was checked
/oc:implement-feature Bug Fix
Reproduce a bug, find its root cause, fix it with a regression test, verify it and open a pull request — in this session.
When to use
When something is broken. It reproduces the bug before changing anything, rather than jumping straight to editing code.
What it does
- Reproduces it — a failing test when it can write one, otherwise the exact steps; a UI bug in a browser. It asks for what is missing rather than fix by guessing
- Finds the root cause — and names it; hiding the symptom does not count
- Fixes it — the smallest change, with a regression test that fails without it
- Verifies and delivers — the project's checks, a review, a pull request; a lesson when the cause will come up again
/oc:bug-fix Collaboration
Resolve PR Comments
Resolve GitHub PR review comments by reading them, grouping by file, and applying fixes systematically.
When to use
When a pull request has review comments that need to be addressed. Reads, groups, and resolves comments systematically rather than ad-hoc. It reads the comments with the gh CLI, so gh must be signed in.
What it does
- Gather PR comments — reads all review comments from GitHub
- Group by file — organises comments into file-level batches
- Classify — marks each as must-fix, should-fix, or discussion
- Delegate fixes — sends batches to appropriate specialist agents, shared types and utilities first, never two agents on one file
- Verify and push — a secret scan, lint, tests and build, a check that only the commented files changed, and a mandatory fast review; then it commits and pushes to the same branch. Discussion comments are summarised for you, not fixed
/oc:resolve-pr-comments Setup
Bootstrap Customizations
Checks what opencastle init read from the code into .opencastle/, and fills in the "Still to describe" list at the end of each file — architecture, access rules, test conventions, environments — by reading the code.
When to use
Once, right after opencastle init, on an existing codebase. Skip it in an empty project: there is nothing to read yet.
What it does
init writes .opencastle/project.instructions.md and stack/*-config.md from the code: the stack with versions, the structure, commands, routes and API endpoints, models and migrations, environment variable names and the test setup. What it cannot read from files, each file lists at its end under Still to describe. This prompt checks what init wrote, then reads the code to answer that list, and says what only a person can fill in.
/oc:bootstrap-customizations Create Skill
Scaffold a new team skill with proper frontmatter and structure. Use when adding a new domain skill to the AI configuration.
When to use
When your team has knowledge every assistant should load on demand — a deploy runbook, a review checklist, the rules for one part of your stack.
What it does
Checks the compiled skills and the available integrations for overlap, names the skill, and writes .opencastle/skills/<name>/SKILL.md. The next npx opencastle sync compiles it for every assistant in the project. A team skill with the same name as one of OpenCastle's replaces it.
/oc:create-skill Convoy (experimental)
/oc:convoy hands work to the convoy planner and leaves the run to you. The planner's steps below run inside the CLI, which fills in their input — npx opencastle convoy "<task>" runs them, and so does the prompt. Step 1 sizes the request while step 5 plans it straight from the request and step 2 writes a PRD, all at the same time: a small change keeps that plan, with no PRD, and larger work keeps the PRD. npx opencastle convoy plan --prd <path> starts from a PRD you already have. Every step runs read-only. The fix steps run only when a check fails, and step 6 only with --yes, when nobody reads the plan before it runs. The convoy engine is experimental; its commands are on the CLI page.
Convoy
Plan work as tasks that agents run in parallel, each in its own git worktree, for the experimental convoy engine. Your assistant runs the planner and shows you the plan; you start the run.
When to use
For work that splits into several tasks with separate files: a feature across the API, the UI and the tests, or one change repeated across modules. A change in a few files is faster with Implement Feature, and the prompt says so.
What it does
- Checks it fits — that the work splits into tasks, and is committed: every task starts from the last commit
- Runs the planner —
npx opencastle convoy "<task>" --dry-run, which reads the repository, changes nothing, and writes the spec to.opencastle/convoys/ - Shows you the plan — each task, its agent, what it waits for and its files, and anything that looks wrong
- Hands it over — you run
npx opencastle convoy run <spec>; the work lands on a branch of its own
/oc:convoy 1. Size the work
Sizes the work, first on your request, while the plan from the request and the PRD are written at the same time. A change sized low, and not split into groups, keeps the plan from the request, and the PRD is stopped. Larger work keeps the PRD and this sizing, unless it splits the work into groups: then the PRD is sized again beside its review, so each group can name its phases.
npx opencastle convoy, not a command 2. Write the PRD
Turns a request that is not small into a product requirements document, written to .opencastle/prds/<name>.prd.md and named after its title.
npx opencastle convoy, not a command 3. Review the PRD
Checks that the PRD has every required section and is consistent enough to plan from. Runs beside the plan from the PRD, or beside a second sizing when the work is split into groups; a PRD that fails is fixed and planned again. Answers with a JSON verdict: valid, or the issues to fix.
npx opencastle convoy, not a command 4. Fix the PRD
Rewrites the PRD to fix what its review found. Runs only when the review fails, up to two rounds.
npx opencastle convoy, not a command 5. Plan the tasks
Turns the request, or the PRD, into a JSON task plan. The CLI folds a task that only writes tests into the task it tests, checks the plan in code — ids, dependencies, cycles, file paths, and tasks that could run at once on the same files — and writes .opencastle/convoys/<name>.convoy.yml.
npx opencastle convoy, not a command 6. Review the plan
Reviews a plan that will run without a person reading it first (--yes): tasks that run in parallel on the same files, missing dependencies, and missing or redundant tasks. Answers with a JSON verdict: valid, or the issues to fix.
npx opencastle convoy, not a command 7. Fix the plan
Returns JSON patches for the problems the code checks or the review found; the CLI applies them. Up to two rounds after the checks, one after a review.
npx opencastle convoy, not a command