Andrey Markin
  • home
  • services
  • products
  • projects
  • blog
  • directory
    • Tool
    • Library
    • Repo
    • Article
    • XTweet
    • Guideline
    • Video
  • courses
  • resume
  • about
  • contact
  • meet

Mark Life Ltd

  1. Home
  2. Directory
  3. Context Doctor
Meet

Mark Life Ltd

BG208147965

HomeContactPrivacyLLM-friendlyBlog RSSDirectory RSS
  1. Directory
  2. context-doctor
GuidelineAI CodingDev Toolsagentscliobservability

context-doctor

Claude Code / Codex skill that audits the fixed context a coding agent auto-loads every session — tool/MCP definitions, connectors, plugins, skills, subagents, memory/rules files — and proposes ranked cuts to prune, gate, or route what's loaded but unused.

Added July 6, 2026
Visit guideline

Install it with:

bash
npx skills add Mark-Life/agent-skills -g --skill context-doctor

Then run it:

bash
claude /context-doctor

Every session opens with a fixed tax paid before you say anything: system prompt, tool definitions, MCP servers, connectors, plugins, skill descriptions, subagents, memory/rules files. Some is load-bearing; much is junk — loaded in every repo, used in none — quietly shrinking the window and feeding context rot. /context-doctor is the cleanup pass for "why is my context so full", token-budget triage, or after you connect a pile of tools/MCP/skills and want to know what's actually earning its keep.

The trick is that the agent is the instrument: it can read its own loaded context, so instead of guessing what the harness injects it inventories what it was actually given this session — tools grouped by origin, auto-loaded vs. invoke-only skills, MCP servers and where each is configured, subagents, and memory/rules in effect. It then correlates against real usage — scanning past transcripts and cross-checking the repo — because bloat is precisely what's loaded but unused: a Supabase or Vercel connector riding along in a repo with no trace of that service, a plugin's 40 tool defs never once invoked here.

Rather than silently editing your config, it presents a ranked table — surface → estimated saving → mechanism → scope → why safe — and for every cut spells out plainly what you'd give up, so you make an informed decision instead of just chasing a smaller number. The fixes it draws from cover the full stack: pruning synced connectors (per-server, not blanket), gating rarely-used skills behind explicit invocation (disable-model-invocation), routing monolithic skills into a tiny dispatch table with heavy content read on demand, relocating conditional rules into nested CLAUDE.md / AGENTS.md that load only when you touch that subtree, and downgrading heavy @import bodies to light pointers.

It's opinionated about guardrails, too: treat every flag and path as illustrative and confirm today's mechanism in the agent's own docs; propose, never apply, since config edits are durable and user-owned; and judge a cut by its reach — a .claude + .agents dual-home is intentional cross-harness support, and a global-vs-project duplicate is usually deliberate, not waste. Killing something load-bearing is worse than the bloat, so the win is a smaller context that can still do the job.

Related

  • exe.devCloud for you and your agents — disposable per-second sandboxes, persistent Linux VPS with SSH/HTTPS, and Devbox cloud dev environments.
  • integrations.shA registry of 5,700+ integration specs from Rhys Sullivan — the same builder behind Executor. Every service normalized into MCP, OpenAPI, GraphQL, and CLI form, each surface leading with a grounded, cited credential guide agents can act on.
  • memory-viewClaude Code / Codex skill that reads a project's auto-memory vault and generates a self-contained HTML explorer to visualize what the agent has remembered — MEMORY.md plus topic files — without editing or managing it.
  • session-reportClaude Code / Codex skill that generates a self-contained HTML report debugging what is in a session's context window and how every token is spent — context budget, retained thinking, the dumb-zone cutoff, loaded CLAUDE.md and skills, and full history.