/autopilot:onboardfrom autopilot
Detects repo structure and scaffolds .claude/*-config.md files with autopilot chains. Run project-detect.js then scaffold-config.js to onboard a repo.
Ships in autopilot. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turns a repo with no autopilot config into one that speaks its own build commands, coverage thresholds,
doc layout, and ecosystem-standalone dispatch chains. The deterministic half is scripted (detect +
scaffold); the judgment half is yours (map this project's domain to skills, derive doc⇄code drift
domains, name security surfaces). The golden reference output is the hand-built ~/projects/hangar-bridge/.claude/.
Premise: ecosystem-standalone. The scaffolded chains default to autopilot-only (the assumed baseline is autopilot +
codeforge+mnemos, no third-party plugins).superpowersis added only as an explicit, commented fallback when the project actually has it installed. Never scaffold a superpowers-first default.
| Script | Role |
|---|---|
scripts/project-detect.js | Detect (pure read → JSON): package manager, commands (+lint_is_noop), per-package coverage thresholds, doc convention (doc/ vs docs/), workspace/packages, default_branch, protected-path candidates, project paths, installed plugins. Run it FIRST; it owns every mechanical fact. |
scripts/scaffold-config.js | Scaffold (mechanical write): copies+fills the config set into <target>/.claude/ (including backlog-config.md), fills detected values, writes autopilot-only chains when superpowers=false, merge-safely pins CLAUDE_CODE_ENABLE_TODO_TOOLS=1 into .claude/settings.json (task tools are gated off on 5-era models since CC 2.1.233 — without the pin every dev-flow forcing function silently no-ops; an explicit existing value is respected), and updates .gitignore to exclude runtime state while KEEPING *-config.md tracked. Idempotent; --force to clobber a hand-edit; --dry-run to preview. |
node <autopilot>/scripts/project-detect.js <target-repo> | tee /tmp/onboard-detect.json
Read the JSON. Sanity-check it against the repo: does package_manager, doc_dir, the coverage table, and
default_branch match reality? default_branch is only emitted when the target IS the git top-level; if it
is null or wrong (e.g. the repo's origin/HEAD isn't set), note the canonical branch for step 4. Do not
re-derive these facts by hand — the detector owns them.
node <autopilot>/scripts/scaffold-config.js <target-repo> --detect /tmp/onboard-detect.json
Preview first with --dry-run (writes nothing, prints what it WOULD do); pass --force to overwrite a
hand-edited config. This writes the 9 configs + the .gitignore runtime-state block. Inspect the JSON summary
({written, skipped, gitignore_updated}). On a re-run it is idempotent (writes nothing unchanged) and skips
hand-edited files unless you pass --force. The 7 mechanical configs (next, project-lifecycle, dispatch,
quality-gate, dev-flow, test-strategy, qc-gate) are now correctly filled. The 2 judgment configs
(skill-routing, doc-drift) are SKELETONS with TODO(onboard) markers — step 3 fills them.
Read the target repo's code + docs, then fill:
skill-routing.md — map THIS project's domain keywords → the right autopilot methodology skill. Read
the source/docs for the recurring domain terms (wire format, schema, auth surface, perf-sensitive paths,
test tooling) and route each to autopilot:debug / autopilot:reviewer / autopilot:test-strategy /
autopilot:profiling. (Golden example: hangar-bridge routes "envelope/zod schema → debug", "channel tag/
escaping/injection → reviewer", "latency/throughput → profiling".)doc-drift-config.md — one ### domain block per doc⇄code mapping: which doc file(s) describe which
code dir(s), and a focus: line naming the claims that must stay true (commands, coverage numbers, API
surface, status claims). Keep the deterministic gate_command + staleness_days the skeleton already has.quality-gate-config.md security surfaces — if the repo has security-sensitive code (auth, crypto,
escaping, input validation, idempotency, ordering invariants), add a ## Security-critical surfaces block
naming them as always-full-review (never fast-path). Read the code to find them; do not guess.If the target has a CLAUDE.md, align its commands / coverage thresholds / doc paths / default branch to the
detected reality (step 1). If default_branch detection was null/ambiguous, write the canonical branch you
confirmed. Do NOT invent conventions — only correct drift against detected facts. If there's no CLAUDE.md,
skip (creating one is out of this skill's scope).
If the target warrants persistent memory, note the project memory dir
(~/.claude/projects/<path-hash>/memory/) so autopilot:learn writes to one home. Add a one-line pointer to
its MEMORY.md if the project has ongoing work worth tracking. (This mirrors what was hand-done for
hangar-bridge.)
If the project's review-loop-config.md uses a cc-shim / anthropic-compatible reviewer or
implementer (GLM / MiniMax / any Anthropic-compatible endpoint), point the user to the ONE canonical
credential home instead of scattering shell exports: run load-endpoints-env.sh --init to scaffold
a mode-600 ~/.autopilot/endpoints.env stub, fill in AUTOPILOT_ENDPOINT_<NAME>_{URL,TOKEN}, then
set reviewer_endpoint / implementer_endpoint in .claude/review-loop-config.md so /l5//l6
pick it up declaratively. Prefer a subscription/coding-plan token over a metered API key; OAuth-login
runners (codex/agy/grok) need no token. Full guide: docs/guide/installation.md §
"Heterogeneous engine credentials".
Skip entirely if no hetero role is configured. Otherwise ask the user exactly once, per role:
Autopilot ships the officially-administered scorecards for this role as defaults. Adopt them, or self-qualify in this environment?
Show them the evidence first — node scripts/adopt-qualification-defaults.js list --role <role>
prints each administration WITH the environment it was measured in (runner CLI version, harness
commit, corpus, prompt-config hash, effort, date). Official environment ≠ theirs; that block is the
decision, not decoration.
node scripts/adopt-qualification-defaults.js adopt --role <role> (or --seat <engine>:<runner>). Copies the rows into their stores as ordinary, strike-able rows.engine-qualify flow; it overrides a default on the same seat
identity, and adoption refuses to shadow a local row.
Contract, ADR-0001 posture, and strike interplay: references/qualification-defaults.md.ls <target>/.claude/ shows the 9 configs; <target>/.gitignore excludes runtime state but NOT
*-config.md (they must stay tracked — git -C <target> check-ignore .claude/dispatch-config.md returns
nothing).scaffold-config.js <target> --detect /tmp/onboard-detect.json (same detect JSON as step 2) →
summary written:[] (idempotent; your step-3/4 hand edits are preserved, reported in skipped).The <target>/.claude/ set reproduces the mechanical values of the golden hangar-bridge output (same
commands, coverage table, doc paths, protected paths, autopilot-only chains) AND carries the project-specific
judgment content you added in step 3. The scaffold is re-runnable without churn.
Note (first run after install): a newly-shipped
onboardskill is not dispatchable until Claude Code restarts (the plugin caches skills at session start). The scripts (project-detect.js/scaffold-config.js) work immediately from the CLI regardless.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
32 skills in this plugin
/agent-callContact an already-running persistent coding-agent session via fleet v2 (fallback: Claude SendMessage + outbox). Use when: "通知 <host>", "跟 <host> 說", naming a fleet member/pane. Not for: opinions (→ consult), hetero review (→ hetero-review), new workers (→ /l4–/l6).
/auditCompare two existing implementations for feature parity and missing items. Use when: "compare X with Y", "verify X matches Y", "比對 X 和 Y". Not for: future plan review, single-bug debug, writing tests.
/brainstormPre-code Socratic design exploration that surfaces 2-3 approaches and gates coding until approved. Use when: "help me think through X", "還沒想清楚", "我不確定要怎麼做". Not for: existing options (→ think-tank), external research (→ survey), chosen approach/quick fix (→ dev-flow).
/ceo-agentFull delegation — you own the goal end-to-end, user just wants results. Triggers: "CEO mode", "get it done", "you decide", "handle everything", "I trust you", "take over", "full authority", "just do it", "搞定 X", "幫我處理", "全權處理", "你決定". Not for: research-only (→ survey), participatory planning (→ dev-flow), or parallel task dispatch.
/debugEvidence-first debugging for correctness bugs, crashes, and flaky tests. Use when: diagnosing bugs, crashes, or intermittent failures. Not for: performance/latency/memory issues (→ profiling).
/dev-flowStart here before writing any code — sizes the task (XS/S/M/L/XL, bug, urgent `!`), sets up branch and session rules. Use when: "I'm starting on X", "quick fix for Y", "continuing from yesterday", "hotfix needed", "let's implement X", "skip to coding", "我要開始做 X", "快速修一下", "接續昨天的進度", resuming a feature branch, or any task that touches code. Not for: debugging (→ debug), authoring a plan doc (→ references/plan-template.md), pre-code design exploration (→ brainstorm), or code review (→ quality-pipeline).
npx claudepluginhub cookys/autopilot --plugin autopilotOther plugins' skills for the same job