doctor
Run `routekit doctor` against the invoking shell's child-project ecosystem and surface per-child outcomes. Default mode is detect + auto-fix across all registered children. Pass `--dry-run` to inspect the fix plan without mutating anything. Non-recoverable findings (pinned-but-drifted children) are reported but not repaired.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-13
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- doctor
- verbosity
- silent
- description
- Run `routekit doctor` against the invoking shell's child-project ecosystem and surface per-child outcomes. Default mode is detect + auto-fix across all registered children. Pass `--dry-run` to inspect the fix plan without mutating anything. Non-recoverable findings (pinned-but-drifted children) are reported but not repaired.
- user-invocable
- true
- disable-model-invocation
- false
03 SKILL.md 正文
/doctor — diagnose + auto-fix the child-project ecosystem
This skill wraps routekit doctor — a single CLI verb that diagnoses every
registered child project across five drift conditions and applies the matching
fixers by default.
When this skill runs
The user invokes /doctor (with optional --dry-run) to verify the ecosystem
is healthy after a shell upgrade or to repair drift before launching feature
work in child projects. The skill is a thin wrapper — every detection and
repair lives in routekit doctor itself.
What it checks
- Shell template drift —
packages/hooks/vstemplates/generic/.routekit/hooks/. - Per-child hooks drift — child's
.routekit/hooks/vs the shell's template. - Per-child
.mcp.jsonpointer —mcpServers.rks.args[0]must point under the invoking shell. A child can opt out of auto-repair by settingpinned: truein.rks/project.json; such drift is reported as non-recoverable. - Per-child registry presence — child registered in the invoking shell's
projects/index.jsonl. - Per-child schema version —
routekit/project.jsonschemaVersion vs the latest known migration.
What it does NOT touch: the shell itself
routekit doctor walks the shell's registry, and the shell registers itself in
that registry (npm run setup does this so rag init can find it). Doctor
therefore skips its own record explicitly — a shell is not one of its own
children.
This is load-bearing, not tidiness. Every fixer above takes projectRoot, and
handing the shell's own root to syncProject syncs a directory from itself:
each skill is deleted to make room for the copy, the copy then finds nothing to
copy, and the whole thing exits 0. A clean-machine UAT lost all 17 distributable
skills exactly this way — and preflight reported healthy the entire time, because
until now nothing checked that the skills were still there.
If you need to update the shell, use git. routekit project sync / upgrade /
doctor are for child projects, and they now refuse a self-targeted run outright
rather than silently eating it.
Arguments
Parse $ARGUMENTS for an optional --dry-run flag.
Instructions
Step 1: Invoke routekit doctor via Bash
Run the CLI verb exactly once per skill invocation — no loops, no retries:
routekit doctor [--dry-run]
If the user passed --dry-run in $ARGUMENTS, forward it. Otherwise invoke
the default (auto-fix) mode.
Step 2: Report outcomes
Surface the per-child outcomes from the CLI's stdout to the user, with particular emphasis on:
- The total
fixers appliedcount and thesucceeded/failedbreakdown. - Each
NON-RECOVERABLEline — these are findings the doctor refused to repair (most commonlypinned: truechildren with stale.mcp.jsonpointers). The user must decide whether to clear the pin and re-run, or leave the child intentionally pinned to a different shell. - The exit code. A non-zero exit means at least one fixer failed or at least one non-recoverable finding remains.
Step 3: Honor the verbosity contract
This skill defaults to silent verbosity. Do not narrate steps or restate
what the CLI already printed. If the exit code is 0 and no non-recoverable
findings exist, a one-line confirmation is enough.
What this skill does NOT do
- It does not invoke any internal helper directly.
routekit doctoralready composes the underlying fixers internally; the skill never bypasses the CLI to call them. - It does not launch a Governor. The skill is a thin Dispatcher-side wrapper over a single CLI invocation — no orchestration is required.
- It does not iterate per-child in the skill body. The CLI handles the batch; the skill just runs the CLI once and reads the result.
04 同仓库更多 Skills
skills-telemetry
Use when the user asks about recent activity, failures, build history, or wants to query telemetry events. Calls MCP telemetry tools directly — no Task subagent needed. $ARGUMENTS can be: summary, failures, or an event type filter string.
skills-telemetry-export
Use when the user wants to EXPORT/SHARE a project's telemetry — e.g. for a UAT report or to attach to a GitHub issue. Produces a redacted .json + .md bundle via an MCP tool; no Task subagent or Governor is launched. $ARGUMENTS may be a storyId to scope the export.
skills-ship
Use when the user wants to commit and ship uncommitted changes. Accepts an optional commit message as $ARGUMENTS. Launches the Ship Governor via Task subagent. Handles both 2-branch (push → PR → merge) and 3-branch (local merge, no PR) workflows automatically based on project config.
skills-rks-welcome
Alias for /rks-onboard — same guided first-run tour through rks stories, permissions, cost, and first PR.
skills-rks-onboard
Run the rks onboarder — guided first-run tour through stories, permissions, cost, and first PR. Resumes from last completed stage if a session exists. Use when the user types /rks-onboard or asks to start onboarding.
skills-research
Use when the user wants to design, research, or document something — OR asks a question about the codebase, backlog, or how anything in this project works. This is the ONLY way to answer questions about rks internals. Do NOT answer from memory or call MCP tools directly — always use this skill. Questions get a direct answer. Everything else produces a report in notes/.