doctor

doctor is a command for Claude Code from sdsrss/gsd-lite. It costs 12 tokens per session (2,548 once invoked), scanned B, original, MIT.

A diagnostic command for checking whether a GSD-Lite installation and its project are healthy.

In plain words
What is it for?
Troubleshooting GSD-Lite setup and checking project health.
Why use it?
It helps identify installation or project problems from one check.

Command for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions Claude Code.

Part of the gsd plugin — 6 commands, 4 agents, 3 hooks shipped together

Good fit Troubleshooting GSD-Lite setup and checking project health.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sdsrss/gsd-lite/doctor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/sdsrss/gsd-lite

Made for: Claude Code.

Or install gsd, the plugin that ships this one along with the rest of its 6 commands, 4 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doctor

README.md
[![agentmods](https://agentmods.dev/badge/commands/sdsrss/gsd-lite/doctor/github.svg)](https://agentmods.dev/commands/sdsrss/gsd-lite/doctor)
Your own site
<a href="https://agentmods.dev/commands/sdsrss/gsd-lite/doctor"><img src="https://agentmods.dev/badge/commands/sdsrss/gsd-lite/doctor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for doctor

Your own site · 80×15
<a href="https://agentmods.dev/commands/sdsrss/gsd-lite/doctor"><img src="https://agentmods.dev/badge/commands/sdsrss/gsd-lite/doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,548 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.02548
Opus 5.5 $0.00005 $0.01019
Sonnet 5.5 $0.00002 $0.00510
Haiku 4.5 $0.00001 $0.00255

Measured 5d ago against content hash 772e4dba6718, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

doctor scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Read `~/.claude/settings.json` (or `~/.claude/settings.local.json`)
commands/doctor.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

STEP 1: State File Check

Check if .gsd/state.json exists:

  • If exists: parse it as JSON
    • Valid JSON: record PASS with project name and workflow_mode
    • Invalid JSON (parse error): record FAIL with error details
  • If not exists: record INFO "No active project (state.json not found)"

STEP 2: MCP Server Health

Call the health MCP tool:

  • If returns status: "ok": record PASS with server version
  • If returns error or unreachable: record FAIL with error message
  • Note: if MCP server is not available at all (tool not found), record FAIL "MCP server not registered". Fix by install mode (STEP 3 says which): plugin — update or re-enable the gsd plugin; npx/manual — run npx gsd-lite install, which registers the server with Claude Code at user scope (claude mcp add -s user gsd …, needs claude on PATH) and prints the command to run by hand when it cannot. claude mcp list shows gsd once registered. Releases before 0.19.0 wrote the server only into settings.json, which Claude Code does not read MCP servers from, so an npx install from then has no gsd tools until it is reinstalled.

STEP 3: Hooks Registration

Check if GSD hooks are registered in Claude settings:

  • Read ~/.claude/settings.json (or ~/.claude/settings.local.json)
  • StatusLine check (registered if ANY path matches):
    1. Direct: statusLine.command contains gsd-statusline
    2. Composite cache registry: ~/.cache/code-graph/statusline-registry.json — any entry whose command contains gsd-statusline
    3. Composite backup mirror: ~/.claude/statusline-providers.json — same match rule (durable mirror written by code-graph's chain CLI)
    • Any path present: StatusLine = registered
  • Determine the install mode first — hooks are registered in a different place for each, and checking only one reports a healthy install as broken:
    • Plugin: ~/.claude/plugins/installed_plugins.json lists gsd@gsd with a record that applies to this project (no scope, user or managed scope, or project / local scope whose projectPath is this project; a record for another project serves that project only), and enabledPlugins["gsd@gsd"] is not false in ~/.claude/settings.json or the project's .claude/settings.json / settings.local.json. Claude Code loads the three hooks from hooks/hooks.json in the plugin cache; nothing appears in settings.json and nothing is copied to ~/.claude/hooks/.
    • npx / manual: the three hooks are registered in settings.hooks and the five scripts sit in ~/.claude/hooks/.
    • Both can be true at once, and that is supported. The ~/.claude/hooks copies stand down, so each hook fires once, only when the files show the plugin serving this directory: the first entry under gsd@gsd (without one, under the first gsd@… id) is unscoped, at user scope, or at project / local scope for this directory; enabledPlugins["gsd@gsd"] is true in ~/.claude/settings.json or the project's .claude/settings.json / settings.local.json, and no other of them says otherwise; and the plugin's hooks/hooks.json declares the hook. Otherwise both copies run and each hook fires twice: record INFO "hooks from both the plugin and the npx install run", not a failure. A plugin installed by policy (managed scope) is enabled by managed settings these files do not show, so beside one both copies run.
  • Plugin mode — read hooks/hooks.json from the entry's installPath and check it declares SessionStart, PostToolUse and Stop:
    • All three declared: record PASS "hooks served by the plugin"
    • Partial or the file missing/unparseable: record FAIL naming what is absent, fix: update the plugin — in a session /plugin → Installed → gsd → Update now, or from a shell claude plugin update gsd@gsd — then restart Claude Code
  • npx/manual mode — check the three hook arrays in settings.hooks:
    • PostToolUse entry referencing gsd-context-monitor
    • SessionStart entry referencing gsd-session-init
    • Stop entry referencing gsd-session-stop
    • All three present: record PASS
    • Partial: record WARN naming each missing hook, fix npx gsd-lite install
  • Neither mode registers all three: record FAIL "No GSD hooks registered"
  • StatusLine: PASS if registered by any path above. Absent on a plugin-only install is expected, not a failure — a plugin may not write the top-level statusLine key. Record INFO "StatusLine needs npx gsd-lite install".

Read the full file on GitHub · 168 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · +24 lines 772e4dba6718
  2. 6d ago Changed · +10 lines 8cf44c582cd6
  3. 1mo ago Changed · +22 lines bf232190e317
  4. 1mo ago First seen · 112 lines · 12 tokens per session scan B 858604612e3a

Subscribe to this mod's changes

doctor is a command published in the GitHub repository sdsrss/gsd-lite (4 stars, last pushed 4d ago), licensed MIT. It adds 12 tokens to every session and 2,548 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other commands, from other repositories

fix-issue

Fixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to…

yonatangross/orchestkit · 82 tokens

ci-sentinel

Daily autonomous classifier for failing PRs across your repos. Runs /ci-debug headless against every open PR with red required checks, posts the verdict as a collapsed PR comment, and appends to a per-repo .sentinel/ledger.jsonl. v1 is propose-don't-apply — NEVER auto-pushes a fix. Use when you're tired of /status…

yonatangross/orchestkit · 94 tokens

ci-debug

Diagnose a failing CI run against an 11-pattern playbook. Classifies the failure, cites the relevant memory entry, proposes the exact fix command — but NEVER applies without explicit user approval. Use when a specific PR check or GitHub Actions run failed and you want a diagnosis instead of speculation. Don't use for…

yonatangross/orchestkit · 92 tokens

doctor

Runs diagnostic checks against a Vendure project and prints an actionable report. Use it for broken projects, upgrade verification, new-machine setup, or CI guard rails.

vendurehq/vendure · 0 tokens

debloat

Retroactive whole-repo bloat removal (spec H-2ii). Scores an existing repo on the deterministic bloat axes, writes BLOAT-REPORT.md, and — only behind a passing test-suite safety oracle — proposes gated refactor waves as a PR. The zero-risk adoption hook.

randomittin/heimdall · 62 tokens

maintain

Run automated maintenance — seeker finds bugs from pod logs and raises GitHub issues, fixer picks them up and creates PRs. Can run as a one-shot or scheduled via /schedule.

randomittin/heimdall · 40 tokens