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.
npx skills add Mark-Life/agent-skills --skill context-doctorgit clone --depth 1 https://github.com/Mark-Life/agent-skillsWrote 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.
[](https://agentmods.dev/skills/mark-life/agent-skills/context-doctor)<a href="https://agentmods.dev/skills/mark-life/agent-skills/context-doctor"><img src="https://agentmods.dev/badge/skills/mark-life/agent-skills/context-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.
<a href="https://agentmods.dev/skills/mark-life/agent-skills/context-doctor"><img src="https://agentmods.dev/badge/skills/mark-life/agent-skills/context-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00072 | $0.04678 |
| Opus 5 | $0.00036 | $0.02339 |
| Sonnet 5 | $0.00014 | $0.00936 |
| Haiku 4.5 | $0.00007 | $0.00468 |
Grade A, and why
context-doctor scanned grade A 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 10d 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 directorieslowAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
find ~/.claude/projects -type d -name workflows 2>/dev/null | head Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Doctor
Every session opens with a fixed tax paid before the user speaks: system prompt, tool definitions, MCP servers, plugins, skill descriptions, subagents, memory/rules files. Some is load-bearing; much is junk — unused in this repo yet shipped every turn, shrinking the window and feeding rot. This skill is the cleanup pass. Run it on "why is my context so full", token-budget triage, or after the user connects a pile of tools/MCP/skills.
You are the instrument — you can see your own loaded context. Read what you were actually given this session and cross-check it against real usage; don't guess what the harness injects.
The surfaces
Split by who controls it:
- Harness-injected — system prompt, the core-loop scaffolding, provider attachments. Mostly unchangeable; account for it. But less is truly fixed than it looks: on the Anthropic harness many built-in tools and whole feature subsystems are now switch-off-able — see Fix G.
- User-controlled (your target):
- Tool definitions — built-ins plus every MCP/connector tool. Usually the largest, most ignorable chunk. Built-in tools you never use in this repo (plan mode, notebooks, artifacts, cron, the ask-question UI…) can be denied by name.
- Feature subsystems — bundled-skill catalogues, the multi-agent workflow engine, remote control, connectors. Each ships its own tool defs; many drop with a single flag.
- MCP servers — project, user-level, and provider-synced "connectors" (enabled on a vendor site, synced down).
- Plugins — bundle their own tools/skills/MCP.
- Skills — each auto-loadable one spends its
name+descriptionevery turn just to stay discoverable. - Subagents — each definition costs tokens.
- Memory & rules —
CLAUDE.md/AGENTS.md/ memory indexes at every scope; always-on, paid every turn.
Method
1. Measure. Inventory your own context, concretely:
- tools grouped by origin (built-in vs. each MCP server / connector / plugin); flag namespaces you never call here.
- skills + descriptions; auto-loaded vs. invoke-only.
- MCP servers and where each is configured.
- subagents and memory/rules in effect.
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.
- 10d ago First seen · 199 lines · 72 tokens per session scan A f0bce12698a9
context-doctor is a skill published in the GitHub repository Mark-Life/agent-skills (2 stars, last pushed 26d ago), licensed MIT. It adds 72 tokens to every session and 4,678 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A 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.
Other skills, from other repositories
wiki
LLM Wiki — persistent markdown knowledge base that compounds across sessions (Karpathy model).
remember
Review reusable project knowledge and decide what belongs in project memory, notepad, or durable docs.
context-fundamentals
This skill should be used when the user asks to "understand context", "explain context windows", "design agent architecture", "debug context issues", "optimize context usage", or discusses context components, attention mechanics, progressive disclosure, or context budgeting. Provides foundational understanding of…
knowledge-steward
A knowledge-management helper that saves useful prompts, solutions, ideas, patterns, and workflow notes to an Obsidian knowledge base. Obsidian is a local app for organizing linked notes.
digital-brain
This skill should be used when the user asks to "write a post", "check my voice", "look up contact", "prepare for meeting", "weekly review", "track goals", or mentions personal brand, content creation, network management, or voice consistency.
moai-foundation-context
Manages context window optimization, session state persistence, and token budget allocation for multi-agent workflows. Use for token budget management, context limits, or session handoff across agents.