From agent
Runs diagnostic checks on agent workspace: config, identity, memory, SQLite index, crons, hooks, HTTP bridge, messaging plugins, and dreaming. Supports --fix for safe auto-repairs. Use after agent create/import or when something feels off.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agent:doctorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
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.
/agent:create or /agent:import — verify setup is cleanCronList → writeback.sh audit — so the registry's .audit state is currentagent_doctor with action='check' (or action='fix' when the user passes --fix); its cron-registry check reads the .audit you just refreshedCronList output — the MCP server cannot see Claude Code's cron state--fix or /agent:doctor fix or says "arreglar" / "auto-fix" / "repara" → mode is fixcheckThe 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.
Call:
agent_doctor(action='<mode>')
Print the returned card verbatim.
Append a cron section rendered from the Step 2 CronList output (do not call it again):
prompt contains /agent:heartbeat → report scheduleprompt contains dream → report schedule⚠️ and suggest: "Missing cron — run the default crons flow (see AGENTS.md)"orphaned>0, add: ⚠️ <N> registry reminder(s) not firing — run /agent:crons reconcileblocked key= lines, add: ⚠️ <B> reminder(s) with ambiguous live duplicates — review with /agent:crons listFormat:
Crons:
✅ Heartbeat: */30 * * * *
✅ Dreaming: 0 3 * * *
✅ Registry audit: alive=5/5
If the diagnostic card includes any → hint: lines, those are already rendered. Do not repeat them; the user has what they need.
fix mode, remind the user to reloadAfter a fix run, if any fix was applied or any hook-related issue remains, recommend /mcp to reload the MCP server. Example:
Some changes take effect only after reloading the MCP server. Run `/mcp` to apply.
✅ Config · ✅ Identity · ⏸️ HTTP · ℹ️ Dreaming · ... — full card is too wide for mobile./agent:doctor, only check. Only apply fixes on --fix or when the user explicitly asks to repair.lib/doctor.ts. If they ask about something not covered (e.g. "check my OpenAI API key"), say the doctor doesn't cover that yet — or consult docs/doctor.md for the current check list.docs/doctor.md — full feature documentationlib/doctor.ts — implementation (checks + fixes)docs/INDEX.md — master feature indexnpx claudepluginhub crisandrews/clawcode --plugin agentAudits Claude Code agents for violations, gaps, and improvements across 7 dimensions like description quality and frontmatter, outputting structured repair plans.
Runs periodic agent heartbeat checks including cron health, memory consolidation, and proactive work. Useful for maintaining long-running sessions and repairing orphaned cron tasks.
Diagnoses 12-layer agent stack failures including wrapper regression, memory pollution, tool discipline issues, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code fixes.