ctx-doctor — Claude Code skill: what it does, how to install
Runs context-mode health checks directly inside your agent session. It inspects runtimes, hooks, FTS5, and package versions to troubleshoot setup issues.
npx skills add mksglu/context-mode --skill ctx-doctor -a claude-codeWhat ctx-doctor does
The skill queries the server-side ctx_doctor MCP tool to produce a status log. Each diagnostic check gets marked with [OK], [FAIL], or [WARN] text tags. The output avoids markdown task-list syntax deliberately, so clients like Z.ai GLM render the output without broken widgets. It tests runtime components, plugin registration, hooks, FTS5 database support, plus npm and marketplace version parity.
When the MCP tool call fails, the skill switches to a Bash fallback. It navigates two folders up to locate the plugin root, then runs node against cli.bundle.mjs or build/cli.js. Because the fallback relies on Node.js directly on your path, a missing runtime will break offline troubleshooting.
What it helps with
- verify context-mode plugin registration and active hooks
- check sqlite FTS5 availability in the current environment
- compare installed npm package versions against the marketplace
- run offline health checks via the local Node.js CLI when MCP fails
Example prompts for the agent
- /context-mode:ctx-doctor
- Run health checks for context-mode using /context-mode:ctx-doctor
- Check FTS5 and hook status with /context-mode:ctx-doctor
How to install ctx-doctor
1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-doctor -a claude-code2Manually: put the files in place
~/.claude/skills/ctx-doctor/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ctx-doctor/
1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-doctor -a codex2Manually: put the files in place
.agents/skills/ctx-doctor/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-doctor -a cursor2Manually: put the files in place
.cursor/skills/ctx-doctor/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install mksglu/context-mode ctx-doctor2Manually: put the files in place
.github/skills/ctx-doctor/SKILL.md1Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-doctor -a gemini-cli2Platform CLI
gemini skills install https://github.com/mksglu/context-mode --path skills/ctx-doctorManually: put the files in place
.devin/skills/ctx-doctor/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add mksglu/context-mode --skill ctx-doctor -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set7
The whole set →Similar
Questions about ctx-doctor
How do I install ctx-doctor in Claude Code?
Run npx skills add mksglu/context-mode --skill ctx-doctor -a claude-code in your terminal.
What does ctx-doctor verify?
It validates environment runtimes, active hooks, sqlite FTS5 capabilities, plugin registration, and version matching between npm and the marketplace.
What happens if the ctx_doctor MCP tool fails?
The skill falls back to executing node <PLUGIN_ROOT>/cli.bundle.mjs doctor or build/cli.js via Bash to print the same text report.