From claude-castle
Configures a repo for the Castle (claude-castle) workflow. Sets up the tracker adapter (implements the tracker contract), review_retry_budget, and label-map overrides in docs/agents/. Run before first use of /build-castle, or if /build-castle appears to be missing context about the tracker adapter or label map.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-castle:lay-foundationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Configure this repo for the Castle (claude-castle) development pipeline. Before any sand can be packed, the foundation has to be flat.
Configure this repo for the Castle (claude-castle) development pipeline. Before any sand can be packed, the foundation has to be flat.
This skill writes:
review_retry_budget — how many automatic TDD retries /build-castle attempts when /review finds problems before escalating to a humanThis is a prompt-driven skill. Explore current state, present findings, confirm with user one decision at a time, then write.
Read current repo state — don't assume:
git remote -v — GitHub remote present? (suggests GitHub issue tracker)CLAUDE.md and AGENTS.md at root — which exists? Is there already an ## Agent skills section?docs/agents/tracker-adapter.md — prior tracker adapter config?docs/agents/build-castle.md — prior build-castle config?issues/ directory at root — local markdown issue tracker in use?.scratch/ — alternative local markdown conventionSummarise what's present and what's missing. Walk user through three decisions one at a time — present each, get answer, then move to next.
Decision A — Tracker adapter
The tracker adapter tells
/build-castlehow to talk to your issue tracker. It implements the tracker contract (skills/build-castle/tracker-contract.md) — a fixed set of verbs (list-by-status,read,set-status,get-dependency-edges) — using commands appropriate for the chosen tracker. Pick where you actually track work.
gh CLI). Recommended if git remote points to GitHub..md files under issues/ at repo root. Good for solo projects or repos without a remote.Default: GitHub if remote points to GitHub, local markdown otherwise.
Decision B — review_retry_budget
When
/build-castleruns/reviewon completed TDD work and review finds problems, how many times should it pass the findings back to the TDD agent and retry before escalating to a human?
Integer ≥ 0. Default: 0.
0 — no retries; first review failure marks the issue needs-human and halts the run1 — retry once; if review still fails, escalateN — retry up to N times before escalatingDecision C — Label strings
/build-castleworks with logical statuses (READY,IN_PROGRESS,COMPLETED,FAILED,NEEDS_HUMAN). The tracker adapter maps each logical status to a concrete label string in its "Label map" section. These strings must match labels that exist (or will be created) in your issue tracker.
Defaults (override any that conflict with existing labels):
| Logical | Default label |
|---|---|
READY | ready-for-agent |
IN_PROGRESS | in-progress |
COMPLETED | completed |
FAILED | failed |
NEEDS_HUMAN | needs-human |
Ask if user wants to override any. If issue tracker has no existing labels, defaults are fine. Overrides land in the adapter's Label map section.
Show user a draft of:
## Agent skills block to add to CLAUDE.md / AGENTS.mddocs/agents/tracker-adapter.mddocs/agents/build-castle.md — must include the seeded ## Models table (tdd=sonnet/high, review=opus/high) so the user can object/override before write.Let them review and request edits before writing.
Pick file to edit:
CLAUDE.md exists → edit itAGENTS.md exists → edit itNever create AGENTS.md when CLAUDE.md already exists (or vice versa). If ## Agent skills block already exists in the chosen file, update in-place — don't append a duplicate.
The block to add/update:
## Agent skills
### Tracker adapter
[one-line summary of tracker]. See `docs/agents/tracker-adapter.md`. Contract: `skills/build-castle/tracker-contract.md`.
### Build-castle
review_retry_budget: [N]. See `docs/agents/build-castle.md`.
Write config files using the seed templates in this skill folder:
ghissues/Copy the chosen template to docs/agents/tracker-adapter.md in the target repo. If the user overrode any defaults in Decision C, edit the "Label map" section of the copied adapter accordingly.
For "other" trackers, write docs/agents/tracker-adapter.md from scratch. Use one of the existing templates as a structural model — same ## headings (list-by-status, read, set-status, get-dependency-edges, Label map) — and fill each section with the user's description.
If docs/agents/ files already exist: update only fields that changed. Don't overwrite sections the user has customised.
Tell user setup is complete. Mention:
docs/agents/*.md directly for minor tweaks — no need to re-run this skill/tdd and /review subagents are configured in the ## Models table of docs/agents/build-castle.md. Edit that table to retune model or thinking-level per role./grill-me → /to-prd → /to-issues → /build-castlemattpocock/skills: grill-me, to-prd, to-issues, tddlay-foundation, build-castleProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub jeroenvdwaal/claude-castle --plugin claude-castle