1

    Agent Context Budget Doctor — Diagnose and Fix Why Your Agent Is Slow, Expensive, or Forgetful

    by PubsProToolkit

    Diagnose and fix context-window problems in your agent setup. Inventories everything that loads — memory files, skills, MCP tool definitions, hooks — estimates where the budget goes, maps your symptoms to causes, and prescribes concrete trims, restructures, and session habits, rewriting the files where that's the fix.

    Updated Jul 2026
    Security scanned
    AGENTS.md

    $14

    · or 70 credits

    30-day refund guarantee

    Secure checkout via Stripe

    Also available in a bundle

    Included in download

    • Inventory total startup token usage across memory files and MCP tools.
    • Identify why an agent loses track of the plan after session compaction.
    • file_read, file_write automation included
    • Ready for AGENTS.md
    • Instant install

    Media gallery

    See it in action

    You say

    Audit my CLAUDE.md and list of active MCP servers. The agent is getting expensive and forgets the project roadmap after about 10 messages.

    Your agent does

    Analysis shows your 'startup rent' consumes 18k tokens. The 'aws-sdk' MCP server contributes 12k tokens via 40 unused tool definitions.

    Prescription:

    1. Move the 4-page roadmap from CLAUDE.md to roadmap.md; load it only when updating status.
    2. Disable the 'aws-sdk' server for this repo.

    About This Skill

    An agent's context window is a fixed budget, and most setups spend it like they haven't looked at the bill: a memory file that grew by accretion, a dozen always-loaded skills, MCP servers whose tool definitions cost tens of thousands of tokens before the first request, hooks that log every event — and then the actual work arrives to find the room half full. The symptoms are familiar: instructions ignored mid-session, quality that degrades as the conversation grows, surprise costs, and compaction that eats the plan. Agent Context Budget Doctor treats it like a clinician. Give it your CLAUDE.md or AGENTS.md, your skill list, MCP config, and hooks, plus the symptoms, and it produces a token-budget breakdown with the hogs flagged, a diagnosis mapping each symptom to its cause, and prescriptions ordered by payoff — including the rewritten memory file when trimming is the fix, a durable-state pattern that makes compaction a non-event, and the relapse-prevention habits that keep the setup lean. The download includes three reference files: the context-budget worksheet, the symptom-to-diagnosis guide, and the trimming playbook. It audits what you provide; it does not execute your agent or measure live sessions, and token figures are estimates. Works with Claude Code, Cursor, Codex CLI, Gemini CLI, and any SKILL.md agent.

    Use Cases

    • Inventory total startup token usage across memory files and MCP tools.
    • Identify why an agent loses track of the plan after session compaction.
    • Rewrite bloated memory files to prioritize active project rules.
    • Reduce recurring session costs by pruning unused tool definitions.

    Reviews

    No reviews yet - be the first to share your experience.

    Only users who have downloaded or purchased this skill can leave a review.

    Security Scanned

    Passed automated security review

    Permissions

    Read Files
    Write Files

    File Scopes

    references/**

    This skill reads the config and files you provide — CLAUDE.md/AGENTS.md, skill list, MCP config, hooks — plus its own bundled reference templates, and writes a diagnosis report and rewritten/optimized files. It does not run shell commands, open a browser, make network calls, or read environment variables, it connects to no external hosts, and it does not attach to or measure a live agent session (token figures are estimates from the files you supply).

    Audits the config and files you provide (CLAUDE.md/AGENTS.md, skill list, MCP config, hooks) and writes a diagnosis plus rewritten files. Runs in any SKILL.md-compatible agent (Claude Code, Cursor, Codex CLI, Gemini CLI). No runtime, API key, or install required, and it does not attach to or measure a live session — token figures are estimates from the files you supply.

    Creator

    PubsProToolkit builds rigor-first skills for AI agents — they write your docs and content properly, then adversarially review them to catch what's wrong before it ships. The result: cleaner output and a hard quality gate in one toolkit. Built by a CMPP-certified, PhD medical writer who brings regulated-industry standards to developer docs, content, compliance, and research integrity.

    Frequently Asked Questions

    More Premium Skills

    $14