[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75JGZ5310K9WQGKC12D77GD":3,"skill-same:01M75JGZ5310K9WQGKC12D77GD":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":36,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M75JGZ5310K9WQGKC12D77GD","context-doctor",null,"Audits a repo's agent context — system prompt, CLAUDE.md\u002FAGENTS.md, skills, and references — against context-engineering lessons for Claude 4\u002F5 models (model detected from the running session, or set via --model), then writes claude-optimization.md with a Summary table. Use to right-size an agent setup, cutting over-constraint, redundancy, always-upfront context, and conflicting instructions.","sunitghub\u002Fcanon-skills","sunitghub","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F154850182?v=4","01M75JGBZ2TQM1BG49YHTRGHZR","Sunit Joshi","01M75JGC05YY1W8RW5SJAWWTB8",9,"MIT","https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcontext-doctor\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: context-doctor\ndescription: Audits a repo's agent context — system prompt, CLAUDE.md\u002FAGENTS.md, skills, and references — against context-engineering lessons for Claude 4\u002F5 models (model detected from the running session, or set via --model), then writes claude-optimization.md with a Summary table. Use to right-size an agent setup, cutting over-constraint, redundancy, always-upfront context, and conflicting instructions.\ncategory: agent-ops\ntags: [context, prompt, skills, audit, optimization]\n---\n\n# Context Doctor\n\nStatic audit of a repository's **agent context** — everything a coding agent loads before it sees a\nuser prompt: `CLAUDE.md`\u002F`AGENTS.md`, skill and command files, tool descriptions, and referenced\nspecs\u002Fmockups. Rates each of seven lenses, prints a **Summary table**, and writes\n`claude-optimization.md` at the repo root. Human-facing name: **Context Doctor**.\n\nThe seven lenses come from Anthropic's guidance on context engineering for modern Claude models:\nhttps:\u002F\u002Fclaude.com\u002Fblog\u002Fthe-new-rules-of-context-engineering-for-claude-5-generation-models — the\nsame lessons behind removing ~80% of Claude Code's system prompt. This skill is a portable checkup\nagainst those lessons.\n\n**Self-contained.** It depends on nothing outside this folder — no build tools, no other skills, no\nnetwork. Drop it into any repo's `.claude\u002Fskills\u002F` or upload it to Claude Desktop and run it.\n\n## When to use\n\nTriggers: \"audit my agent setup\", \"is my CLAUDE.md bloated\", \"right-size my skills\", \"check my\ncontext for over-constraint \u002F conflicting instructions\", \"run context-doctor\". Run it periodically,\nor after a CLAUDE.md\u002Fskills grow large.\n\nNot for: running or testing the target app (static read only), general code review, or a single\nsprint diff.\n\n## Target model\n\nTwo checkup modes, gating which Claude-5-specific checks run:\n\n- **`5`** (default) — full checkup for a Fable 5\u002F5.1 or Opus 5.5 target: the seven lenses below,\n  plus four checks (reasoning-extraction avoidance, effort-default guidance, checkpoint\u002Fpause\n  discipline, progress-claim grounding). A repo targeting Opus 5 also runs in `5`, but check 10 is\n  not raised for it and check 11 uses the `high` default.\n- **`4`** — the seven lenses only, plus the two checks that are model-agnostic (checkpoint\u002Fpause\n  discipline, progress-claim grounding). Skip reasoning-extraction avoidance and effort-default\n  guidance — those failure modes are specific to Claude 5-generation models and would be false\n  positives for a repo targeting Opus 4.8.\n\nDetect the default from the running session's own model identity (stated in the system prompt).\nOverride with `--model 4` or `--model 5` when the repo's target differs from the session model —\ne.g. auditing on Sonnet 5 a repo whose skills are written for an Opus 4.8 production deploy. State\nwhich mode was used, and how it was determined (detected vs. `--model` override), in the report\nheader.\n\n## Operating constraints\n\n- **Static analysis only.** Read the context files. Never run the repo, execute skills, or call a\n  model. No dynamic probing.\n- **Judgement, not a checklist score.** Report a per-lens status and one overall verdict — **never a\n  numeric score or percentage**. A number hides which lens is weak.\n- **Evidence, not theory.** Cite `file:line` (or `file` + a short quote) for every finding. Flag a\n  lens `action`\u002F`advisory` only with a concrete instance, not a hypothetical.\n- **Repo-agnostic + graceful.** If an artifact is absent (`CLAUDE.md`, `.claude\u002Fskills\u002F`, etc.), say\n  so and continue — an absent file is a valid result, not a finding.\n- **Read, don't rewrite.** This skill diagnoses and recommends. It does not edit the audited files;\n  it only writes the one report.\n\n## What to inspect\n\nGather the context artifacts that exist in the target repo (skip any that are absent, note which):\n\n- `CLAUDE.md` (repo root and any nested), `AGENTS.md`, `.cursorrules`\u002Fother agent-instruction files\n- `.claude\u002Fskills\u002F` (or `skills\u002F`) — each `SKILL.md`, plus any `reference\u002F`\u002F`gates\u002F` sub-files\n- Tool\u002Fcommand definitions and their descriptions\n- `@`-imported or referenced standards\u002Fconfig injected into every session\n- Referenced specs, plans, mockups (are they prose, or code\u002FHTML\u002Ftests?)\n\nLine counts are a proxy for context weight, not exact tokens.\n\n## The seven lenses\n\nRate each: **aligned** (follows the lesson), **advisory** (minor drift, worth trimming), or\n**action** (clear instance to fix). Cite evidence.\n\n1. **Rules → judgement.** Blanket prohibitions\u002Fmandates a capable model handles via judgment.\n   - Check for absolute rules that are wrong in some cases: \"never write comments\", \"always\n     do X\", rigid formatting dictates. Prefer judgment-framed guidance (\"match the surrounding\n     code's comment density, naming, and idiom\").\n   - `action` when a blanket rule would produce wrong behavior for a reasonable subset of tasks.\n\n2. **Examples → interface design.** Over-reliance on usage examples where an expressive interface\n   would guide better.\n   - Check tool\u002Fcommand definitions: do they lean on long \"here's how to call it\" examples, or do\n     clear parameter names, enums, and defaults make correct use obvious?\n   - `advisory` when examples substitute for a self-describing interface.\n\n3. **Upfront → progressive disclosure.** Context injected on every session that is only\n   conditionally needed.\n   - Check for always-loaded content used by a minority of tasks (verification\u002Freview steps, rare\n     workflows, deep references). Recommend moving it behind on-demand skills\u002Freference files loaded\n     when needed. Note oversized always-on files (a long root `CLAUDE.md`, a monolithic SKILL.md).\n   - `action` when a large block is always injected but rarely used.\n\n4. **Repeat yourself → simple descriptions.** The same instruction duplicated across places.\n   - Check for guidance repeated in the system prompt\u002F`CLAUDE.md` *and* a tool\u002Fskill description, or\n     the same rule copied across files. Recommend one owner; put tool usage in the tool description.\n   - `advisory`\u002F`action` per how much duplication and drift risk exists.\n\n5. **Memory: manual → durable.** How cross-session knowledge is captured.\n   - Check for heavy manual \"save this to memory\" instructions. Note that modern harnesses can\n     auto-capture relevant memory. Portable, repo-native memory (decision logs, handoff notes) is a\n     legitimate deliberate choice — flag only redundant manual bookkeeping, not durable records.\n   - Usually `advisory`.\n\n6. **Simple specs → rich references.** Fidelity of the references the agent works from.\n   - Check whether specs\u002Fdesigns are prose or screenshots where a higher-fidelity reference exists:\n     a code file to port, a test suite as the spec, an HTML mockup instead of a description or\n     screenshot, or a rubric a verifier can check against. Recommend code\u002FHTML\u002Ftest references.\n   - `advisory`\u002F`action` when a prose\u002Fscreenshot reference could be a code\u002FHTML\u002Ftest artifact.\n\n7. **Conflicting instructions.** Contradictory directives across the loaded context.\n   - Cross-read the artifacts for clashes (e.g. \"leave documentation as appropriate\" vs \"DO NOT add\n     comments\"; \"keep it minimal\" vs \"be thorough\"). Contradictions force the model to spend\n     reasoning reconciling them. Quote both sides.\n   - `action` for any direct contradiction; `advisory` for tension worth clarifying.\n\n## Model-agnostic checks (both `4` and `5`)\n\n8. **Checkpoint\u002Fpause discipline.** Instructions that make Claude stop or ask permission more than\n   the task needs.\n   - Check for guidance that would block on \"Want me to…?\"\u002F\"Shall I…?\" for reversible, in-scope\n     actions, or that omits when pausing is actually warranted (destructive\u002Firreversible actions,\n     real scope changes, input only the user can provide).\n   - `action` when a skill\u002FCLAUDE.md lacks any checkpoint guidance for a long-running or autonomous\n     workflow; `advisory` when guidance exists but is vague.\n\n9. **Progress-claim grounding.** Long-run status reporting that isn't tied to verifiable evidence.\n   - Check whether workflows that report progress (multi-step skills, autonomous loops) instruct\n     grounding each claim in a tool result from the session, and stating explicitly what wasn't\n     verified.\n   - `advisory` unless the repo has evidence of prior fabricated status reports, then `action`.\n\n## Claude 5-specific checks (`5` only)\n\nWhich model the repo targets decides the details of both checks. Take it from the model ids the\nrepo's own skills\u002Fagents\u002Fsettings name; if none, from the running session's model; if still unclear,\nreport both models' guidance as `advisory` rather than picking one. (Sources: Anthropic's\n[Prompting Claude Opus 5.5](https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fbuild-with-claude\u002Fprompt-engineering\u002Fprompting-claude-opus-5-5)\nand [Effort](https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fbuild-with-claude\u002Feffort) pages.)\n\n10. **Reasoning-extraction avoidance.** Instructions that ask Claude to echo, transcribe, or explain\n    its internal reasoning as response text.\n    - Check skills\u002FCLAUDE.md for \"explain your reasoning\", \"show your work\", or similar asked of the\n      *response* (not `thinking` blocks). This can trigger the `reasoning_extraction` refusal\n      category on **Fable 5 and Opus 5.5** (new on Opus 5.5 relative to Opus 5). Fix: drop the\n      instruction and read the reasoning from summarized thinking blocks instead. Server-side\n      fallback does not retry a `reasoning_extraction` decline on either model — it comes back to the\n      caller, so another model does not silently take over.\n    - `action` when found — do not raise this check in `4` mode, or for a repo targeting Opus 5\n      (which lacks the category); the Anthropic pages don't document it for earlier models, so\n      treat it as not applicable there rather than asserting it.\n\n11. **Effort-default guidance.** Whether effort-level usage matches the target model's cost\u002Flatency\n    curve. The defaults differ by model:\n    - **Fable 5 \u002F 5.1:** default `high`; `xhigh` for the most capability-sensitive workloads;\n      `medium`\u002F`low` for routine work.\n    - **Opus 5:** default `high`, like Fable.\n    - **Opus 5.5:** default `medium` (Opus 5 defaults to `high`, so a carried-over setting runs a\n      level off). Set effort explicitly, sweep levels against the repo's\n      own evals, and reserve `xhigh`\u002F`max` for work with a measured quality gain.\n    - Check for blanket `xhigh`\u002F`max` on routine work, or no effort guidance at all on a repo doing\n      capability-sensitive work, and for an Opus 5.5 repo that assumes `high` is the default.\n    - `advisory` — these are tuning recommendations, not a correctness bug; do not raise this check\n      in `4` mode, since Opus 4.8's effort\u002Fquality tradeoff differs. Judgement-heavy review gates\n      (canon's own reviewer\u002Fevaluator) can legitimately stay at `high`: the source itself says to\n      test before lowering effort.\n\n## Summary and verdict\n\nOpen the report with a Summary table — one row per lens:\n\n| Lens | Status | Evidence | Recommendation |\n|---|---|---|---|\n\nThen an overall posture verdict:\n\n| Verdict | Criteria |\n|---|---|\n| **lean** | No `action` lenses; at most minor `advisory` notes. Context is well right-sized. |\n| **trim** | One or more `action` lenses, each with a concrete, scoped fix. Worth a cleanup pass. |\n| **overloaded** | Multiple `action` lenses or a structural problem (large always-on context, several conflicts) needing a deliberate restructure. |\n\nNo numeric score. Any lens rated `action` forces at least **trim**.\n\n## Report\n\nPrint the Summary table inline. Then ask: `Write claude-optimization.md to the repo root? (y to confirm)`.\nDo not write without `y`. On confirmation, write `claude-optimization.md` at the repo root (overwrite\n— it is a point-in-time snapshot, not a log):\n\n```\ncontext-doctor run: MM-DD-YYYY hh:mm\nAudited against: Claude \u003C4|5> context-engineering guidance (\u003Cdetected from session | --model override>)\n\n## Context optimization: \u003Crepo-name>\nScope: \u003Cartifacts inspected; which were absent>\n\n| Lens | Status | Evidence | Recommendation |\n|---|---|---|---|\n| Rules → judgement | \u003Cstatus> | \u003Cfile:line or quote> | \u003Cone-line fix> |\n| Examples → interfaces | ... | ... | ... |\n| Upfront → progressive disclosure | ... | ... | ... |\n| Repeat → simple descriptions | ... | ... | ... |\n| Memory: manual → durable | ... | ... | ... |\n| Specs → rich references | ... | ... | ... |\n| Conflicting instructions | ... | ... | ... |\n| Checkpoint\u002Fpause discipline | ... | ... | ... |\n| Progress-claim grounding | ... | ... | ... |\n| Reasoning-extraction avoidance (5 only) | ... | ... | ... |\n| Effort-default guidance (5 only) | ... | ... | ... |\n\nOmit the last two rows entirely in `4` mode — don't print them as \"n\u002Fa\".\n\n### Details\n\u003Cone short paragraph per lens rated advisory\u002Faction, each with file:line evidence>\n\n### Not inspected\n- \u003Cartifact absent — why it was skipped>\n\ncontext-doctor verdict: lean | trim | overloaded\n```\n\nThe final `context-doctor verdict:` line is required.\n\n## Gotchas\n\n- **No context artifacts found?** If the repo has no `CLAUDE.md`\u002F`AGENTS.md`\u002Fskills\u002Fagent config,\n  say so and stop with a limited-scope note — do not invent findings. A repo with no agent context\n  is a valid, clean result.\n- **Durable memory is not clutter.** A decision log or handoff file is deliberate cross-session\n  memory, not the manual-bookkeeping the memory lens flags. Don't recommend deleting durable records.\n- **Don't over-apply \"rules → judgement\".** Constraints that guard genuinely dangerous or\n  irreversible actions (destructive commands, security boundaries, mandatory review gates) should\n  stay explicit — the lesson is to relax *advisory* over-constraint, not safety-critical rules.\n- **No numeric score.** If tempted to write \"7\u002F10\" or a percentage, stop — use per-lens status plus\n  the lean\u002Ftrim\u002Foverloaded verdict.\n- **Optional canon companion.** In a repo that uses canon, `context-check` gives a deeper always-on\n  *budget* audit (line-by-line size\u002Fredundancy). context-doctor does not require it and never calls\n  it — mention it only as a follow-up if present.\n","# Context Doctor\n\nStatic audit of a repository's **agent context** — everything a coding agent loads before it sees a\nuser prompt: `CLAUDE.md`\u002F`AGENTS.md`, skill and command files, tool descriptions, and referenced\nspecs\u002Fmockups. Rates each of seven lenses, prints a **Summary table**, and writes\n`claude-optimization.md` at the repo root. Human-facing name: **Context Doctor**.\n\nThe seven lenses come from Anthropic's guidance on context engineering for modern Claude models:\nhttps:\u002F\u002Fclaude.com\u002Fblog\u002Fthe-new-rules-of-context-engineering-for-claude-5-generation-models — the\nsame lessons behind removing ~80% of Claude Code's system prompt. This skill is a portable checkup\nagainst those lessons.\n\n**Self-contained.** It depends on nothing outside this folder — no build tools, no other skills, no\nnetwork. Drop it into any repo's `.claude\u002Fskills\u002F` or upload it to Claude Desktop and run it.\n\n## When to use\n\nTriggers: \"audit my agent setup\", \"is my CLAUDE.md bloated\", \"right-size my skills\", \"check my\ncontext for over-constraint \u002F conflicting instructions\", \"run context-doctor\". Run it periodically,\nor after a CLAUDE.md\u002Fskills grow large.\n\nNot for: running or testing the target app (static read only), general code review, or a single\nsprint diff.\n\n## Target model\n\nTwo checkup modes, gating which Claude-5-specific checks run:\n\n- **`5`** (default) — full checkup for a Fable 5\u002F5.1 or Opus 5.5 target: the seven lenses below,\n  plus four checks (reasoning-extraction avoidance, effort-default guidance, checkpoint\u002Fpause\n  discipline, progress-claim grounding). A repo targeting Opus 5 also runs in `5`, but check 10 is\n  not raised for it and check 11 uses the `high` default.\n- **`4`** — the seven lenses only, plus the two checks that are model-agnostic (checkpoint\u002Fpause\n  discipline, progress-claim grounding). Skip reasoning-extraction avoidance and effort-default\n  guidance — those failure modes are specific to Claude 5-generation models and would be false\n  positives for a repo targeting Opus 4.8.\n\nDetect the default from the running session's own model identity (stated in the system prompt).\nOverride with `--model 4` or `--model 5` when the repo's target differs from the session model —\ne.g. auditing on Sonnet 5 a repo whose skills are written for an Opus 4.8 production deploy. State\nwhich mode was used, and how it was determined (detected vs. `--model` override), in the report\nheader.\n\n## Operating constraints\n\n- **Static analysis only.** Read the context files. Never run the repo, execute skills, or call a\n  model. No dynamic probing.\n- **Judgement, not a checklist score.** Report a per-lens status and one overall verdict — **never a\n  numeric score or percentage**. A number hides which lens is weak.\n- **Evidence, not theory.** Cite `file:line` (or `file` + a short quote) for every finding. Flag a\n  lens `action`\u002F`advisory` only with a concrete instance, not a hypothetical.\n- **Repo-agnostic + graceful.** If an artifact is absent (`CLAUDE.md`, `.claude\u002Fskills\u002F`, etc.), say\n  so and continue — an absent file is a valid result, not a finding.\n- **Read, don't rewrite.** This skill diagnoses and recommends. It does not edit the audited files;\n  it only writes the one report.\n\n## What to inspect\n\nGather the context artifacts that exist in the target repo (skip any that are absent, note which):\n\n- `CLAUDE.md` (repo root and any nested), `AGENTS.md`, `.cursorrules`\u002Fother agent-instruction files\n- `.claude\u002Fskills\u002F` (or `skills\u002F`) — each `SKILL.md`, plus any `reference\u002F`\u002F`gates\u002F` sub-files\n- Tool\u002Fcommand definitions and their descriptions\n- `@`-imported or referenced standards\u002Fconfig injected into every session\n- Referenced specs, plans, mockups (are they prose, or code\u002FHTML\u002Ftests?)\n\nLine counts are a proxy for context weight, not exact tokens.\n\n## The seven lenses\n\nRate each: **aligned** (follows the lesson), **advisory** (minor drift, worth trimming), or\n**action** (clear instance to fix). Cite evidence.\n\n1. **Rules → judgement.** Blanket prohibitions\u002Fmandates a capable model handles via judgment.\n   - Check for absolute rules that are wrong in some cases: \"never write comments\", \"always\n     do X\", rigid formatting dictates. Prefer judgment-framed guidance (\"match the surrounding\n     code's comment density, naming, and idiom\").\n   - `action` when a blanket rule would produce wrong behavior for a reasonable subset of tasks.\n\n2. **Examples → interface design.** Over-reliance on usage examples where an expressive interface\n   would guide better.\n   - Check tool\u002Fcommand definitions: do they lean on long \"here's how to call it\" examples, or do\n     clear parameter names, enums, and defaults make correct use obvious?\n   - `advisory` when examples substitute for a self-describing interface.\n\n3. **Upfront → progressive disclosure.** Context injected on every session that is only\n   conditionally needed.\n   - Check for always-loaded content used by a minority of tasks (verification\u002Freview steps, rare\n     workflows, deep references). Recommend moving it behind on-demand skills\u002Freference files loaded\n     when needed. Note oversized always-on files (a long root `CLAUDE.md`, a monolithic SKILL.md).\n   - `action` when a large block is always injected but rarely used.\n\n4. **Repeat yourself → simple descriptions.** The same instruction duplicated across places.\n   - Check for guidance repeated in the system prompt\u002F`CLAUDE.md` *and* a tool\u002Fskill description, or\n     the same rule copied across files. Recommend one owner; put tool usage in the tool description.\n   - `advisory`\u002F`action` per how much duplication and drift risk exists.\n\n5. **Memory: manual → durable.** How cross-session knowledge is captured.\n   - Check for heavy manual \"save this to memory\" instructions. Note that modern harnesses can\n     auto-capture relevant memory. Portable, repo-native memory (decision logs, handoff notes) is a\n     legitimate deliberate choice — flag only redundant manual bookkeeping, not durable records.\n   - Usually `advisory`.\n\n6. **Simple specs → rich references.** Fidelity of the references the agent works from.\n   - Check whether specs\u002Fdesigns are prose or screenshots where a higher-fidelity reference exists:\n     a code file to port, a test suite as the spec, an HTML mockup instead of a description or\n     screenshot, or a rubric a verifier can check against. Recommend code\u002FHTML\u002Ftest references.\n   - `advisory`\u002F`action` when a prose\u002Fscreenshot reference could be a code\u002FHTML\u002Ftest artifact.\n\n7. **Conflicting instructions.** Contradictory directives across the loaded context.\n   - Cross-read the artifacts for clashes (e.g. \"leave documentation as appropriate\" vs \"DO NOT add\n     comments\"; \"keep it minimal\" vs \"be thorough\"). Contradictions force the model to spend\n     reasoning reconciling them. Quote both sides.\n   - `action` for any direct contradiction; `advisory` for tension worth clarifying.\n\n## Model-agnostic checks (both `4` and `5`)\n\n8. **Checkpoint\u002Fpause discipline.** Instructions that make Claude stop or ask permission more than\n   the task needs.\n   - Check for guidance that would block on \"Want me to…?\"\u002F\"Shall I…?\" for reversible, in-scope\n     actions, or that omits when pausing is actually warranted (destructive\u002Firreversible actions,\n     real scope changes, input only the user can provide).\n   - `action` when a skill\u002FCLAUDE.md lacks any checkpoint guidance for a long-running or autonomous\n     workflow; `advisory` when guidance exists but is vague.\n\n9. **Progress-claim grounding.** Long-run status reporting that isn't tied to verifiable evidence.\n   - Check whether workflows that report progress (multi-step skills, autonomous loops) instruct\n     grounding each claim in a tool result from the session, and stating explicitly what wasn't\n     verified.\n   - `advisory` unless the repo has evidence of prior fabricated status reports, then `action`.\n\n## Claude 5-specific checks (`5` only)\n\nWhich model the repo targets decides the details of both checks. Take it from the model ids the\nrepo's own skills\u002Fagents\u002Fsettings name; if none, from the running session's model; if still unclear,\nreport both models' guidance as `advisory` rather than picking one. (Sources: Anthropic's\n[Prompting Claude Opus 5.5](https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fbuild-with-claude\u002Fprompt-engineering\u002Fprompting-claude-opus-5-5)\nand [Effort](https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fbuild-with-claude\u002Feffort) pages.)\n\n10. **Reasoning-extraction avoidance.** Instructions that ask Claude to echo, transcribe, or explain\n    its internal reasoning as response text.\n    - Check skills\u002FCLAUDE.md for \"explain your reasoning\", \"show your work\", or similar asked of the\n      *response* (not `thinking` blocks). This can trigger the `reasoning_extraction` refusal\n      category on **Fable 5 and Opus 5.5** (new on Opus 5.5 relative to Opus 5). Fix: drop the\n      instruction and read the reasoning from summarized thinking blocks instead. Server-side\n      fallback does not retry a `reasoning_extraction` decline on either model — it comes back to the\n      caller, so another model does not silently take over.\n    - `action` when found — do not raise this check in `4` mode, or for a repo targeting Opus 5\n      (which lacks the category); the Anthropic pages don't document it for earlier models, so\n      treat it as not applicable there rather than asserting it.\n\n11. **Effort-default guidance.** Whether effort-level usage matches the target model's cost\u002Flatency\n    curve. The defaults differ by model:\n    - **Fable 5 \u002F 5.1:** default `high`; `xhigh` for the most capability-sensitive workloads;\n      `medium`\u002F`low` for routine work.\n    - **Opus 5:** default `high`, like Fable.\n    - **Opus 5.5:** default `medium` (Opus 5 defaults to `high`, so a carried-over setting runs a\n      level off). Set effort explicitly, sweep levels against the repo's\n      own evals, and reserve `xhigh`\u002F`max` for work with a measured quality gain.\n    - Check for blanket `xhigh`\u002F`max` on routine work, or no effort guidance at all on a repo doing\n      capability-sensitive work, and for an Opus 5.5 repo that assumes `high` is the default.\n    - `advisory` — these are tuning recommendations, not a correctness bug; do not raise this check\n      in `4` mode, since Opus 4.8's effort\u002Fquality tradeoff differs. Judgement-heavy review gates\n      (canon's own reviewer\u002Fevaluator) can legitimately stay at `high`: the source itself says to\n      test before lowering effort.\n\n## Summary and verdict\n\nOpen the report with a Summary table — one row per lens:\n\n| Lens | Status | Evidence | Recommendation |\n|---|---|---|---|\n\nThen an overall posture verdict:\n\n| Verdict | Criteria |\n|---|---|\n| **lean** | No `action` lenses; at most minor `advisory` notes. Context is well right-sized. |\n| **trim** | One or more `action` lenses, each with a concrete, scoped fix. Worth a cleanup pass. |\n| **overloaded** | Multiple `action` lenses or a structural problem (large always-on context, several conflicts) needing a deliberate restructure. |\n\nNo numeric score. Any lens rated `action` forces at least **trim**.\n\n## Report\n\nPrint the Summary table inline. Then ask: `Write claude-optimization.md to the repo root? (y to confirm)`.\nDo not write without `y`. On confirmation, write `claude-optimization.md` at the repo root (overwrite\n— it is a point-in-time snapshot, not a log):\n\n```\ncontext-doctor run: MM-DD-YYYY hh:mm\nAudited against: Claude \u003C4|5> context-engineering guidance (\u003Cdetected from session | --model override>)\n\n## Context optimization: \u003Crepo-name>\nScope: \u003Cartifacts inspected; which were absent>\n\n| Lens | Status | Evidence | Recommendation |\n|---|---|---|---|\n| Rules → judgement | \u003Cstatus> | \u003Cfile:line or quote> | \u003Cone-line fix> |\n| Examples → interfaces | ... | ... | ... |\n| Upfront → progressive disclosure | ... | ... | ... |\n| Repeat → simple descriptions | ... | ... | ... |\n| Memory: manual → durable | ... | ... | ... |\n| Specs → rich references | ... | ... | ... |\n| Conflicting instructions | ... | ... | ... |\n| Checkpoint\u002Fpause discipline | ... | ... | ... |\n| Progress-claim grounding | ... | ... | ... |\n| Reasoning-extraction avoidance (5 only) | ... | ... | ... |\n| Effort-default guidance (5 only) | ... | ... | ... |\n\nOmit the last two rows entirely in `4` mode — don't print them as \"n\u002Fa\".\n\n### Details\n\u003Cone short paragraph per lens rated advisory\u002Faction, each with file:line evidence>\n\n### Not inspected\n- \u003Cartifact absent — why it was skipped>\n\ncontext-doctor verdict: lean | trim | overloaded\n```\n\nThe final `context-doctor verdict:` line is required.\n\n## Gotchas\n\n- **No context artifacts found?** If the repo has no `CLAUDE.md`\u002F`AGENTS.md`\u002Fskills\u002Fagent config,\n  say so and stop with a limited-scope note — do not invent findings. A repo with no agent context\n  is a valid, clean result.\n- **Durable memory is not clutter.** A decision log or handoff file is deliberate cross-session\n  memory, not the manual-bookkeeping the memory lens flags. Don't recommend deleting durable records.\n- **Don't over-apply \"rules → judgement\".** Constraints that guard genuinely dangerous or\n  irreversible actions (destructive commands, security boundaries, mandatory review gates) should\n  stay explicit — the lesson is to relax *advisory* over-constraint, not safety-critical rules.\n- **No numeric score.** If tempted to write \"7\u002F10\" or a percentage, stop — use per-lens status plus\n  the lean\u002Ftrim\u002Foverloaded verdict.\n- **Optional canon companion.** In a repo that uses canon, `context-check` gives a deeper always-on\n  *budget* audit (line-by-line size\u002Fredundancy). context-doctor does not require it and never calls\n  it — mention it only as a follow-up if present.\n",{"name":5,"tags":24,"category":30,"description":7},[25,26,27,28,29],"context","prompt","skills","audit","optimization","agent-ops","main","3e6c9d35455e8e206133380135b560ddb8b58c0e","skills\u002Fcontext-doctor",1,"https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills","https:\u002F\u002Fgetcanon.dev","https:\u002F\u002Fgithub.com\u002Fsunitghub","2026-11-15 03:47:49",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add sunitghub\u002Fcanon-skills --skill context-doctor",{"tool":45,"command":46},"bunx","bunx skills add sunitghub\u002Fcanon-skills --skill context-doctor",{"tool":48,"command":49},"pnpm","pnpm dlx skills add sunitghub\u002Fcanon-skills --skill context-doctor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcontext-doctor\u002FSKILL.md",true,[53,59],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"evals\u002Fevals.json","REFERENCE","参考文档",5162,"https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcontext-doctor\u002Fevals\u002Fevals.json",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"README.md",2524,"https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcontext-doctor\u002FREADME.md",[64,71,78,85,91,98],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M75JK2VBM156TBGG9CM9RS34","no-evals","A skill with no evals folder.","https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-check\u002Fno-evals\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M75JK0PTGT7Y2HMWTGPVYT16","hooks","Registers a hook and pushes code.","https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-check\u002Fhooks\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M75JJYWMTD3CWT18DRYHG82H","good","Formats commit messages. Use when the user asks for a commit message.","https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-check\u002Fgood\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M75JJX1CRZJS5XJECST8QR9Q","bad-frontmatter","https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-check\u002Fbad-frontmatter\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M75JJTCMGGRFG5RNEJMKJ8AN","wrapup","Internal close-pipeline invoked by sprint complete — quality checks, code review, cleanup. Not for direct use; a normal\u002Fhigh-risk sprint's own \"sprint complete\" step calls this automatically.","https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwrapup\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M75JJP7CEJQDYQ490EEJKFCP","sprint","Manages the sprint workflow for focused changes. Use when asked to add, fix, update, implement, debug, or build — see the Workflow tiers section for what's out of scope.","https:\u002F\u002Fgithub.com\u002Fsunitghub\u002Fcanon-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsprint\u002FSKILL.md",[],[]]