/compound:setupfrom Compound
Configure this repo for compounding engineering — working agreement, knowledge base, and the commands the agent should use. Run once per repo.
Ships in Compound. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Run once per repo. Safe to re-run — every write below is idempotent, and re-running is the supported way to update the working agreement after a plugin upgrade.
Templates live in ${CLAUDE_PLUGIN_ROOT}/templates/.
Read enough to answer the interview yourself where the answer is discoverable:
the package manifest, CI config, Makefile/justfile, existing README.md, and
the test directory layout.
Look up facts. Put decisions to the user. Asking someone their own test
command when it is sitting in package.json wastes the one thing setup is
spending — their attention.
Also note whether codegraph is available — the tools, the binary, or neither. Step 4
handles it.
Completion criterion: you have candidate test, build, and lint commands, or you have established the repo has none.
Setup is a one-time chore. Run it, then show the user what it did — every answer here has a defensible default, and a question they could have skipped is a worse experience than a decision they can correct in one sentence.
Take these without asking:
wiki/ at the repo root, unless the repo clearly keeps
everything under docs/, in which case docs/wiki/.Ask only where the repo genuinely cannot answer and the wrong guess would be expensive —
for example, several plausible test commands with no way to tell which is canonical. Then
it is one AskUserQuestion, recommendation first.
Completion criterion: you can name each decision and the evidence behind it, and you asked nothing Step 1 already answered.
Take ${CLAUDE_PLUGIN_ROOT}/templates/claude-block.md, substitute {{TEST_COMMAND}},
{{BUILD_COMMAND}}, and {{LINT_COMMAND}}, and place it in the repo's CLAUDE.md:
CLAUDE.md → create it with the block.CLAUDE.md without the sentinels → append the block.<!-- compound:begin --> and
<!-- compound:end -->, preserving any command values already filled in there.Drop a section whose command does not exist rather than writing an empty backtick pair.
Leave {{CODEGRAPH_LINE}} in place for now; Step 4 resolves it.
Completion criterion: exactly one <!-- compound:begin --> appears in the file,
and the text outside the sentinels is byte-identical to what was there before.
Follow ${CLAUDE_SKILL_DIR}/CODEGRAPH.md. It covers the three states the repo can be in
and what to do in each — including that installing the binary needs the user's consent
first, because it downloads and runs a third-party installer.
Completion criterion: either the working agreement names codegraph and an index exists,
or the {{CODEGRAPH_LINE}} placeholder is gone and codegraph is not mentioned in the repo.
Copy templates/wiki/index.md and templates/wiki/log.md into the chosen wiki
directory, skipping either if it already exists.
If CONTEXT.md is absent, create it from templates/CONTEXT.md, filling in the
project name and one-line description from what you read in Step 1. Leave the
## Language section empty rather than inventing terms — the capture skill fills
it as real vocabulary emerges.
Completion criterion: ${CLAUDE_PLUGIN_ROOT}/bin/compound-lint <wiki-dir> exits 0.
A wiki with nothing in it stays empty. From what you read in Step 1, write one
area page for the part of the codebase a newcomer would hit first. Give it real
covers: globs, link it from index.md, and append a log.md entry.
This is the one place a merge-candidate warning is expected — a single page has no inbound links yet. Say so, so the warning reads as a starting point rather than a defect.
Completion criterion: compound-lint reports zero errors, and the seeded page
names paths that actually exist.
State plainly:
Stop hook wiring the test command is available but not installedcapture files decisions as they happenSetup is finished when this step completes. It never ends by asking the user to run something to finish the job.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mthanhlm/compound --plugin compound12 skills in this plugin
/captureFile a decision, root cause, or discovery into the repo wiki. Use once something has been settled, diagnosed, or learned that the next session would want./diagnosingFind the cause of a bug that resists — intermittent, mysterious, or a regression between two known-good states. Use when it is not yet clear why something breaks; once the cause is known and reproducible, tdd writes the test./goStart a piece of work properly — interview the user one question at a time until its shape is settled, before anything gets built. Use when a request could reasonably be built several different ways, or when asked to clarify, pin down, or grill out what is actually wanted./guardrailsThe reasoning behind surgical diffs, minimum code, and surfaced assumptions. Use when a scope or simplicity call needs arguing, or the user asks why so much changed./handoffSave mid-task progress — what is done, what is next, what already failed — so a session resumes work in flight. Use when building has started; for a settled plan, use to-spec./implementExecute an agreed spec or slice end to end: consult the wiki, define the check, build, review the diff, file what was learned. Use once what to build is settled.