doctor

A diagnostic workflow for checking an agent workspace and its supporting systems. It examines areas such as configuration, memory, scheduled tasks, hooks, the HTTP connection, messaging plugins, and background activity.

In plain words
What is it for?
Use it for an agent health check after setup or when something stops working. With the fix option, it can apply listed safe repairs before checking again.
Why use it?
It helps locate common reasons an agent is broken, cannot find memories, misses scheduled work, or cannot connect to its browser or messaging bridge.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/crisandrews/clawcode/doctor
Any agent
npx skills add crisandrews/ClawCode --skill doctor
Clone the repo
git clone --depth 1 https://github.com/crisandrews/ClawCode

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,219 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00062 $0.01219
Opus 5 $0.00031 $0.00609
Sonnet 5 $0.00012 $0.00244
Haiku 4.5 $0.00006 $0.00122

Measured 2d ago against content hash d4e040e9dc19, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

doctor scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/doctor/SKILL.md · 111 lines

How it starts

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

Doctor

Health check for this agent. Inspects config, identity, memory, SQLite index, QMD, crons, hooks, HTTP bridge, messaging plugins, and dreaming. When invoked with --fix, applies safe auto-repairs (create memory dir, sync index, delete stale BOOTSTRAP.md) before re-running checks.

This is a CORE feature — always available. See docs/doctor.md for the full list of checks and auto-fixes.

When to use

  • Right after /agent:create or /agent:import — verify setup is clean
  • When memory search returns nothing or feels wrong — check SQLite integrity
  • When heartbeats don't seem to fire — verify crons and active hours
  • When you enabled the HTTP bridge but the browser can't connect — probe it
  • Anytime something feels off

How it works

  1. Refresh the cron audit FIRST — CronListwriteback.sh audit — so the registry's .audit state is current
  2. Call the MCP tool agent_doctor with action='check' (or action='fix' when the user passes --fix); its cron-registry check reads the .audit you just refreshed
  3. The tool returns a structured report; pass it through as-is (the tool already formats a card)
  4. Supplement with cron status rendered from the same CronList output — the MCP server cannot see Claude Code's cron state

Steps

Step 1 — Detect mode

  • If the user's message contains --fix or /agent:doctor fix or says "arreglar" / "auto-fix" / "repara" → mode is fix
  • Otherwise → mode is check

Step 2 — Refresh the cron audit (BEFORE the card)

The agent_doctor card reads the registry's persisted .audit offline. Refresh it first, or the card may render stale/contradictory cron state.

CronList is a deferred tool. Load it first:

ToolSearch(query='select:CronList')

Call CronList() and pipe its FULL output (verbatim, including a literal No scheduled jobs.) to the mechanical auditor:

printf '%s\n' "<full CronList output>" | bash "$CLAUDE_PLUGIN_ROOT/skills/crons/writeback.sh" audit

(Exit 4 = CronList format drift — remember it and report it as its own ⚠️ line in Step 4.) Keep the CronList output for Step 4.

Read the full file on GitHub · 111 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. 2d ago First seen · 111 lines · 62 tokens per session scan A d4e040e9dc19

Subscribe to this mod's changes

doctor is a skill published in the GitHub repository crisandrews/ClawCode (62 stars, last pushed 3d ago), licensed MIT. It adds 62 tokens to every session and 1,219 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

meta-optimize

Analyze ARIS usage logs and propose optimizations to SKILL.md files, reviewer prompts, and workflow defaults. Outer-loop harness optimization inspired by Meta-Harness (Lee et al., 2026). Use when user says "优化技能", "meta optimize", "improve skills", "分析使用记录", or wants to optimize ARIS's own harness components based on…

wanshuiyin/Auto-claude-code-research-in-sleep · 81 tokens

meta-apply

Privileged applier that LANDS meta-optimize / corpus-audit patches the user approved — the ONLY skill permitted to mutate the skill corpus from a self-modification proposal, with cross-model jury and human approval at landing. Use when the user says "meta apply", "/meta-apply", "land the staged patches", "应用优化", after…

wanshuiyin/Auto-claude-code-research-in-sleep · 81 tokens

auto-review-loop-minimax

Autonomous multi-round research review loop using MiniMax API. Use when you want to use MiniMax instead of Codex MCP for external review. Trigger with "auto review loop minimax" or "minimax review".

wanshuiyin/Auto-claude-code-research-in-sleep · 50 tokens

flow-next-prospect

Generate ranked candidate ideas grounded in the repo. Use when asked what to build next.

gmickel/flow-next · 22 tokens

flow-next-export-context

Export RepoPrompt context to a markdown file for review with an external LLM (ChatGPT, Claude web, etc.). Use when you want Carmack-level review but prefer an external model. Triggers on "export context", "export for external review", "export plan for ChatGPT", "export impl review context", "review with an external…

gmickel/flow-next · 81 tokens

genesis-development

This skill should be used when developing, debugging, refactoring, or building Genesis itself — tasks like "fix this in Genesis", "add a new MCP tool", "wire up the runtime", "Genesis won't start", "create a worktree", "debug the bridge", or "add a capability". Applies to any task modifying files under src/, .claude/…

WingedGuardian/GENesis-AGI · 115 tokens