[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6N05GSF2FT8BTTHJ57QJPH7":3,"skill-same:01M6N05GSF2FT8BTTHJ57QJPH7":93},{"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":23,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":6,"ownerHtmlUrl":69,"ownerBlogUrl":70,"ownerDescription":71,"updatedAt":72,"install":73,"resources":86},"01M6N05GSF2FT8BTTHJ57QJPH7","context-audit",null,"Token-hygiene audit of the always-loaded context stack — CLAUDE.md,\nAGENTS.md, auto-memory MEMORY.md, and the bootstrap-rendered identity files\n(SOUL.md, USER.md, ACCESS_POLICY.md, HEARTBEAT.md) or their harness\nequivalents. Finds redundancy, contradictions, stale content, compression\ncandidates, and skill-extraction candidates; produces a ranked action list\nsorted by token savings with a risk class per finding. REPORT-ONLY: this\nskill never edits any audited file. Recommendations for bootstrap-rendered\nfiles target the interview answer bank \u002F templates, never the rendered\noutput. Judging routes through `gbrain eval cross-modal` (single cheap\nmodel by default; full multi-model panel is explicit opt-in).","garrytan\u002Fgbrain","garrytan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F19957?v=4","01M6DJCCDDG53MTYYRTXAXFG17","Garry Tan","01M6MZQZCEN3RRMD33E1X9ZZR9",32683,"MIT","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Fcontext-audit\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"audit","context audit","context","when","memory","reduce","system prompt","SOUL.md","false","recommendations","soul","default","files","only","never","auto","read","eval","model","stack","access","2026-11-10 10:12:30",false,"---\nname: context-audit\nversion: 1.0.0\ndescription: |\n  Token-hygiene audit of the always-loaded context stack — CLAUDE.md,\n  AGENTS.md, auto-memory MEMORY.md, and the bootstrap-rendered identity files\n  (SOUL.md, USER.md, ACCESS_POLICY.md, HEARTBEAT.md) or their harness\n  equivalents. Finds redundancy, contradictions, stale content, compression\n  candidates, and skill-extraction candidates; produces a ranked action list\n  sorted by token savings with a risk class per finding. REPORT-ONLY: this\n  skill never edits any audited file. Recommendations for bootstrap-rendered\n  files target the interview answer bank \u002F templates, never the rendered\n  output. Judging routes through `gbrain eval cross-modal` (single cheap\n  model by default; full multi-model panel is explicit opt-in).\ntriggers:\n  - \"context audit\"\n  - \"context diet\"\n  - \"system prompt audit\"\n  - \"prompt compression\"\n  - \"reduce context size\"\n  - \"audit my context stack\"\n  - \"context is too big\"\n  - \"token hygiene\"\ntools:\n  - shell\n  - read\nmutating: false\nwrites_pages: false\nupstream: context-audit@fc834ee\nwhen_to_use: \"Use when the user asks: \\\"context audit\\\", \\\"context diet\\\", \\\"system prompt audit\\\", \\\"prompt compression\\\", \\\"reduce context size\\\".\"\n---\n\n# context-audit — Token Hygiene for the Always-Loaded Context Stack\n\n> **Convention:** see [conventions\u002Fbrain-first.md](..\u002Fconventions\u002Fbrain-first.md)\n> — before running a fresh audit, check the brain for prior audit reports\n> (`gbrain recall \"context audit report\"`) so you can compute token DRIFT since\n> the last run and avoid re-flagging findings the user already declined.\n>\n> **Convention:** see [conventions\u002Fquality.md](..\u002Fconventions\u002Fquality.md) —\n> every finding cites its file and evidence; no unsourced claims.\n\n## What this is\n\nEvery file that loads on every turn is a per-turn tax: tokens, latency, and —\npast a point — instruction-following quality. Always-loaded files accrete\n(append-only release notes, promoted memory blocks nobody re-reads, rules\nrestated in three files that drift into contradiction). This skill audits the\nwhole always-loaded stack at once and returns a ranked, evidence-cited action\nlist sorted by token savings.\n\nIt is an auditor, not a surgeon. It measures, finds, ranks, and recommends.\nThe user (or a skill the user explicitly invokes afterward) applies changes.\n\n## Scope: what counts as \"always-loaded\"\n\nEnumerate what THIS harness actually loads every turn — do not assume a fixed\nlist. Typical stack:\n\n| File | Role | Fix belongs in |\n|---|---|---|\n| project `CLAUDE.md` \u002F `AGENTS.md` | orientation, routing, invariants | the file itself (source-editable) |\n| user-global `CLAUDE.md` | cross-project instructions | the file itself (source-editable) |\n| auto-memory `MEMORY.md` | promoted memory blocks | the memory store (demote\u002Fexpire) |\n| `SOUL.md`, `USER.md`, `ACCESS_POLICY.md`, `HEARTBEAT.md`, rendered `AGENTS.md` | bootstrap-rendered identity files | the interview answer bank \u002F templates — NEVER the rendered file |\n| harness system-prompt fragments (identity\u002Ftools files) | per-harness | wherever that harness sources them |\n\nSkills, reference docs, and anything loaded on demand are OUT of scope as\naudit subjects — but they are the DESTINATION for skill-extraction findings\n(content that only matters for one workflow should move out of the\nalways-loaded stack into a skill).\n\n## Contract\n\nThis skill guarantees:\n\n- **Report-only.** No audited file is edited, no page is written, nothing is\n  auto-fixed — including ? zero-risk findings. The output is a\n  recommendation list the user applies deliberately.\n- **Rendered-file safety.** Any recommendation touching a bootstrap-rendered\n  file is expressed as an answer-bank or template change\n  (`gbrain bootstrap interview --set KEY \"...\"` then\n  `gbrain bootstrap render --only \u003CFILE> --force`), never as a direct edit.\n  See [skills\u002Fsoul-audit\u002FSKILL.md](..\u002Fsoul-audit\u002FSKILL.md) for the mechanics.\n- **Estimated with a stated basis, never invented.** Token figures come from\n  the deterministic pre-pass (`wc -c` bytes\u002F2.8 — Claude-family tokenizers\n  run ~2.6-3.5 bytes\u002Ftoken on markdown dense with paths and code spans; 2.8 is\n  the calibrated midpoint of measured always-loaded markdown, see #4988). The\n  report prints the divisor so a reader can\n  re-derive every number. If the host client reports an exact per-category\n  context breakdown (e.g. Claude Code `\u002Fcontext`), that figure outranks the\n  estimate — quote it and use it for the stack total.\n- **Native judging.** The draft report is quality-gated through\n  `gbrain eval cross-modal` — no raw model API calls, no hardcoded model IDs.\n- **Cost line.** Default judging is ONE cheap model (the user's utility-tier\n  model, all three slots, `--cycles 1` — a few cents). The full\n  three-provider frontier panel runs only when the user explicitly asks for\n  a \"full\" or \"multi-model\" audit (~3x+ the cost per cycle).\n\n## Procedure\n\n### 1. Enumerate the stack (deterministic)\n\nList the always-loaded files for this harness and measure each:\n\n```bash\n# bytes\u002F2.8 (calibrated for Claude-family tokenizers on markdown, #4988); integer ceil: (n*10+27)\u002F28\nfor f in CLAUDE.md AGENTS.md SOUL.md USER.md ACCESS_POLICY.md HEARTBEAT.md MEMORY.md; do\n  [ -f \"$f\" ] && echo \"$f: $(wc -c \u003C \"$f\") bytes (~$(( ( $(wc -c \u003C \"$f\") * 10 + 27 ) \u002F 28 )) tokens)\"\ndone\n```\n\nRecord the total. If a prior audit report exists in the brain, compute drift\n(net tokens grown\u002Fshrunk since last run, which files moved).\n\n### 2. Read and analyze (the agent does this — no model calls yet)\n\nRead every file in the stack in full. Evaluate against six dimensions:\n\n1. **Token efficiency** — tokens spent per unit of behavioral value\n2. **Redundancy** — the same rule\u002Ffact stated in more than one file\n3. **Contradictions** — conflicting rules, numbers, or policies across files\n4. **Skill-worthiness** — content that only matters for a specific workflow\n   (extraction candidate: move to a skill, load on demand)\n5. **Staleness** — outdated facts, references to removed features, promoted\n   memory blocks that no longer earn their slot\n6. **Clarity** — instructions compressible without behavior change, or\n   ambiguous enough to misfire\n\n### 3. Classify every finding by risk\n\n- ? **Zero risk** — pure deletion of exact redundancy or dead content\n- ? **Low risk** — compression or skill extraction with a clear trigger\n- ? **Medium risk** — changes that could shift edge-case behavior\n\nAll three classes are recommendations. The risk class tells the user how much\ncare to apply — it does not authorize this skill to act.\n\n### 4. Judge the draft through the native eval runner\n\nWrite the draft report to a temp file, then gate it:\n\n```bash\n# Resolve the cheap judge from the user's model tiers — never hardcode an ID.\n# (`gbrain models` shows all resolved tiers if the config key is unset.)\nJUDGE=$(gbrain config get models.tier.utility)\n\ngbrain eval cross-modal \\\n  --task \"Context-stack token-hygiene audit: every finding cites file + quoted evidence; savings are estimated (bytes\u002F2.8, divisor stated in the report), never invented; findings ranked by token savings; every rendered-file recommendation targets the interview answer bank or template, never a direct edit; risk class on every row\" \\\n  --output \u002Ftmp\u002Fcontext-audit-draft.md \\\n  --slug context-audit-report \\\n  --cycles 1 \\\n  --slot-a-model \"$JUDGE\" --slot-b-model \"$JUDGE\" --slot-c-model \"$JUDGE\"\n```\n\nFull multi-model panel (explicit opt-in only — the user asked for a\n\"full\" \u002F \"multi-model\" audit): omit the `--slot-*-model` overrides so the\nrunner's native three-provider defaults apply.\n\nExit codes: `0` PASS — deliver. `1` FAIL — fix the flagged weaknesses in the\ndraft (usually: an unquoted claim or a rendered-file edit recommendation) and\nre-judge. `2` INCONCLUSIVE (provider\u002Fkey trouble) — deliver the report but\nlabel it \"unjudged\" prominently.\n\n### 5. Deliver\n\nPrint the report in the conversation (see Output Format). If the user wants\nit persisted, hand off to the brain-ops skill to file it under `openclaw\u002F`\n(agent-state notes) — this skill does not write pages itself.\n\nRe-running after major edits to the stack, or on a schedule, is a\nharness-routing convention the user can set up (see the cron-scheduler skill)\n— nothing here runs automatically or guarantees a cadence.\n\n## Output Format\n\n```\n# Context Audit — YYYY-MM-DD\n\nStack total: ~NN,NNN tokens across N files (drift since last audit: +\u002F-N,NNN)\nEstimate basis: bytes\u002F2.8 | host-reported exact total (e.g. `\u002Fcontext`): NN,NNN or n\u002Fa\nFindings: N (~NN,NNN tokens recoverable) | Contradictions: N\nJudge verdict: PASS (single-model, utility tier) | receipt: \u003Cpath>\n\n| # | Save (tok) | Risk | File | Finding | Evidence | Recommended fix (and WHERE it lives) |\n|---|-----------|------|------|---------|----------|--------------------------------------|\n| 1 | ~2,400    | ?   | ...  | redundancy: X restated | \"quoted line\" | delete from A; canonical copy stays in B |\n| 2 | ~1,100    | ?   | SOUL.md | stale: ... | \"quoted line\" | update answer bank key VOICE_REGISTER, re-render — NOT a SOUL.md edit |\n...\n\n## Contradictions (fix these first, savings aside)\n- FILE-A says \"...\" but FILE-B says \"...\" — resolve toward \u003Cone>, delete the other.\n\n## Skill-extraction candidates\n- \u003Ccontent> only matters when \u003Cworkflow> — extract via skill-creator, load on demand.\n```\n\nSorted by token savings, descending — except contradictions, which are called\nout first regardless of size (they cost correctness, not just tokens). Every\nrow carries evidence (a quote or line reference) and names WHERE the fix\nbelongs: source file, answer bank\u002Ftemplate, memory store, or a new skill.\n\n## When it fails\n\nFollow the [agent operator protocol](..\u002Fconventions\u002Fagent-operator-protocol.md) for any gbrain error `code`, exit code, `[AGENT]` block or notice block. Specific to this skill:\n\n- `gbrain eval cross-modal` exits 1 (FAIL): fix the flagged weaknesses and re-run; do not deliver a failed audit as passing.\n- No judge model or provider key is configured: say the audit ran structure-only and name the missing key; do not fabricate scores.\n- A paid multi-model audit hits `no_pricing` or a cost cap: fall back to the default single cheap judge and tell the user why.\n\n## Anti-Patterns\n\n- **Editing any audited file.** Report-only — even ? zero-risk deletions are\n  recommendations, not actions. \"Auto-fix\" promises contradict the\n  rendered-file guard and are out of contract.\n- **Recommending a direct edit to a rendered file.** SOUL.md \u002F USER.md \u002F\n  ACCESS_POLICY.md \u002F HEARTBEAT.md edits are overwritten by the next\n  `gbrain bootstrap render`. Target the answer bank or template, then\n  re-render.\n- **Raw model API calls for judging.** The eval runner owns provider config,\n  receipts, and verdict aggregation — route through `gbrain eval cross-modal`.\n- **Hardcoding model IDs.** Resolve the judge from the user's model tiers;\n  model names in a skill body rot.\n- **Running the full multi-model panel by default.** It is an explicit opt-in;\n  the single-cheap-model pass is the default for cost reasons.\n- **Auditing on-demand content as if always-loaded.** Skills and reference\n  docs don't pay the per-turn tax; flagging them inflates savings numbers.\n- **Inventing token counts.** Run the pre-pass; estimates are labeled `~N`\n  with the divisor stated, and a host-reported exact figure always wins.\n- **Rewriting identity content yourself.** If a finding is about WHAT an\n  identity file says (wrong persona, outdated profile), route to soul-audit —\n  the interview is the only author of that content.\n\n## Dedup\n\n- **soul-audit** — identity CONTENT via interview: what SOUL.md\u002FUSER.md\n  should SAY, sourced from the user's own words. context-audit is\n  token\u002Fstructure hygiene: what the stack COSTS per turn, where it repeats or\n  contradicts itself. A finding like \"USER.md's profile is outdated\" hands\n  off to soul-audit; \"USER.md restates 800 tokens already in SOUL.md\" stays\n  here. Both respect the same rendered-file rule.\n- **skill-optimizer** — tunes ONE skill's body against a benchmark and can\n  mutate it. context-audit never mutates and looks only at always-loaded\n  files; skills appear only as extraction destinations.\n- **functional-area-resolver** — the compression TECHNIQUE for oversized\n  routing tables (>=12KB). context-audit may cite it as the recommended fix\n  when a routing section is the finding; it never applies it.\n- **skillpack-check** — install\u002Fruntime health (DB, worker, migrations), not\n  context size or prompt content.\n- **cross-modal-review** — general second-opinion gate on arbitrary work\n  products. context-audit uses the same underlying runner but as its own\n  fixed judging step with audit-specific pass criteria; asking for \"a second\n  opinion on this code\" routes there, not here.\n","# context-audit — Token Hygiene for the Always-Loaded Context Stack\n\n> **Convention:** see [conventions\u002Fbrain-first.md](..\u002Fconventions\u002Fbrain-first.md)\n> — before running a fresh audit, check the brain for prior audit reports\n> (`gbrain recall \"context audit report\"`) so you can compute token DRIFT since\n> the last run and avoid re-flagging findings the user already declined.\n>\n> **Convention:** see [conventions\u002Fquality.md](..\u002Fconventions\u002Fquality.md) —\n> every finding cites its file and evidence; no unsourced claims.\n\n## What this is\n\nEvery file that loads on every turn is a per-turn tax: tokens, latency, and —\npast a point — instruction-following quality. Always-loaded files accrete\n(append-only release notes, promoted memory blocks nobody re-reads, rules\nrestated in three files that drift into contradiction). This skill audits the\nwhole always-loaded stack at once and returns a ranked, evidence-cited action\nlist sorted by token savings.\n\nIt is an auditor, not a surgeon. It measures, finds, ranks, and recommends.\nThe user (or a skill the user explicitly invokes afterward) applies changes.\n\n## Scope: what counts as \"always-loaded\"\n\nEnumerate what THIS harness actually loads every turn — do not assume a fixed\nlist. Typical stack:\n\n| File | Role | Fix belongs in |\n|---|---|---|\n| project `CLAUDE.md` \u002F `AGENTS.md` | orientation, routing, invariants | the file itself (source-editable) |\n| user-global `CLAUDE.md` | cross-project instructions | the file itself (source-editable) |\n| auto-memory `MEMORY.md` | promoted memory blocks | the memory store (demote\u002Fexpire) |\n| `SOUL.md`, `USER.md`, `ACCESS_POLICY.md`, `HEARTBEAT.md`, rendered `AGENTS.md` | bootstrap-rendered identity files | the interview answer bank \u002F templates — NEVER the rendered file |\n| harness system-prompt fragments (identity\u002Ftools files) | per-harness | wherever that harness sources them |\n\nSkills, reference docs, and anything loaded on demand are OUT of scope as\naudit subjects — but they are the DESTINATION for skill-extraction findings\n(content that only matters for one workflow should move out of the\nalways-loaded stack into a skill).\n\n## Contract\n\nThis skill guarantees:\n\n- **Report-only.** No audited file is edited, no page is written, nothing is\n  auto-fixed — including ? zero-risk findings. The output is a\n  recommendation list the user applies deliberately.\n- **Rendered-file safety.** Any recommendation touching a bootstrap-rendered\n  file is expressed as an answer-bank or template change\n  (`gbrain bootstrap interview --set KEY \"...\"` then\n  `gbrain bootstrap render --only \u003CFILE> --force`), never as a direct edit.\n  See [skills\u002Fsoul-audit\u002FSKILL.md](..\u002Fsoul-audit\u002FSKILL.md) for the mechanics.\n- **Estimated with a stated basis, never invented.** Token figures come from\n  the deterministic pre-pass (`wc -c` bytes\u002F2.8 — Claude-family tokenizers\n  run ~2.6-3.5 bytes\u002Ftoken on markdown dense with paths and code spans; 2.8 is\n  the calibrated midpoint of measured always-loaded markdown, see #4988). The\n  report prints the divisor so a reader can\n  re-derive every number. If the host client reports an exact per-category\n  context breakdown (e.g. Claude Code `\u002Fcontext`), that figure outranks the\n  estimate — quote it and use it for the stack total.\n- **Native judging.** The draft report is quality-gated through\n  `gbrain eval cross-modal` — no raw model API calls, no hardcoded model IDs.\n- **Cost line.** Default judging is ONE cheap model (the user's utility-tier\n  model, all three slots, `--cycles 1` — a few cents). The full\n  three-provider frontier panel runs only when the user explicitly asks for\n  a \"full\" or \"multi-model\" audit (~3x+ the cost per cycle).\n\n## Procedure\n\n### 1. Enumerate the stack (deterministic)\n\nList the always-loaded files for this harness and measure each:\n\n```bash\n# bytes\u002F2.8 (calibrated for Claude-family tokenizers on markdown, #4988); integer ceil: (n*10+27)\u002F28\nfor f in CLAUDE.md AGENTS.md SOUL.md USER.md ACCESS_POLICY.md HEARTBEAT.md MEMORY.md; do\n  [ -f \"$f\" ] && echo \"$f: $(wc -c \u003C \"$f\") bytes (~$(( ( $(wc -c \u003C \"$f\") * 10 + 27 ) \u002F 28 )) tokens)\"\ndone\n```\n\nRecord the total. If a prior audit report exists in the brain, compute drift\n(net tokens grown\u002Fshrunk since last run, which files moved).\n\n### 2. Read and analyze (the agent does this — no model calls yet)\n\nRead every file in the stack in full. Evaluate against six dimensions:\n\n1. **Token efficiency** — tokens spent per unit of behavioral value\n2. **Redundancy** — the same rule\u002Ffact stated in more than one file\n3. **Contradictions** — conflicting rules, numbers, or policies across files\n4. **Skill-worthiness** — content that only matters for a specific workflow\n   (extraction candidate: move to a skill, load on demand)\n5. **Staleness** — outdated facts, references to removed features, promoted\n   memory blocks that no longer earn their slot\n6. **Clarity** — instructions compressible without behavior change, or\n   ambiguous enough to misfire\n\n### 3. Classify every finding by risk\n\n- ? **Zero risk** — pure deletion of exact redundancy or dead content\n- ? **Low risk** — compression or skill extraction with a clear trigger\n- ? **Medium risk** — changes that could shift edge-case behavior\n\nAll three classes are recommendations. The risk class tells the user how much\ncare to apply — it does not authorize this skill to act.\n\n### 4. Judge the draft through the native eval runner\n\nWrite the draft report to a temp file, then gate it:\n\n```bash\n# Resolve the cheap judge from the user's model tiers — never hardcode an ID.\n# (`gbrain models` shows all resolved tiers if the config key is unset.)\nJUDGE=$(gbrain config get models.tier.utility)\n\ngbrain eval cross-modal \\\n  --task \"Context-stack token-hygiene audit: every finding cites file + quoted evidence; savings are estimated (bytes\u002F2.8, divisor stated in the report), never invented; findings ranked by token savings; every rendered-file recommendation targets the interview answer bank or template, never a direct edit; risk class on every row\" \\\n  --output \u002Ftmp\u002Fcontext-audit-draft.md \\\n  --slug context-audit-report \\\n  --cycles 1 \\\n  --slot-a-model \"$JUDGE\" --slot-b-model \"$JUDGE\" --slot-c-model \"$JUDGE\"\n```\n\nFull multi-model panel (explicit opt-in only — the user asked for a\n\"full\" \u002F \"multi-model\" audit): omit the `--slot-*-model` overrides so the\nrunner's native three-provider defaults apply.\n\nExit codes: `0` PASS — deliver. `1` FAIL — fix the flagged weaknesses in the\ndraft (usually: an unquoted claim or a rendered-file edit recommendation) and\nre-judge. `2` INCONCLUSIVE (provider\u002Fkey trouble) — deliver the report but\nlabel it \"unjudged\" prominently.\n\n### 5. Deliver\n\nPrint the report in the conversation (see Output Format). If the user wants\nit persisted, hand off to the brain-ops skill to file it under `openclaw\u002F`\n(agent-state notes) — this skill does not write pages itself.\n\nRe-running after major edits to the stack, or on a schedule, is a\nharness-routing convention the user can set up (see the cron-scheduler skill)\n— nothing here runs automatically or guarantees a cadence.\n\n## Output Format\n\n```\n# Context Audit — YYYY-MM-DD\n\nStack total: ~NN,NNN tokens across N files (drift since last audit: +\u002F-N,NNN)\nEstimate basis: bytes\u002F2.8 | host-reported exact total (e.g. `\u002Fcontext`): NN,NNN or n\u002Fa\nFindings: N (~NN,NNN tokens recoverable) | Contradictions: N\nJudge verdict: PASS (single-model, utility tier) | receipt: \u003Cpath>\n\n| # | Save (tok) | Risk | File | Finding | Evidence | Recommended fix (and WHERE it lives) |\n|---|-----------|------|------|---------|----------|--------------------------------------|\n| 1 | ~2,400    | ?   | ...  | redundancy: X restated | \"quoted line\" | delete from A; canonical copy stays in B |\n| 2 | ~1,100    | ?   | SOUL.md | stale: ... | \"quoted line\" | update answer bank key VOICE_REGISTER, re-render — NOT a SOUL.md edit |\n...\n\n## Contradictions (fix these first, savings aside)\n- FILE-A says \"...\" but FILE-B says \"...\" — resolve toward \u003Cone>, delete the other.\n\n## Skill-extraction candidates\n- \u003Ccontent> only matters when \u003Cworkflow> — extract via skill-creator, load on demand.\n```\n\nSorted by token savings, descending — except contradictions, which are called\nout first regardless of size (they cost correctness, not just tokens). Every\nrow carries evidence (a quote or line reference) and names WHERE the fix\nbelongs: source file, answer bank\u002Ftemplate, memory store, or a new skill.\n\n## When it fails\n\nFollow the [agent operator protocol](..\u002Fconventions\u002Fagent-operator-protocol.md) for any gbrain error `code`, exit code, `[AGENT]` block or notice block. Specific to this skill:\n\n- `gbrain eval cross-modal` exits 1 (FAIL): fix the flagged weaknesses and re-run; do not deliver a failed audit as passing.\n- No judge model or provider key is configured: say the audit ran structure-only and name the missing key; do not fabricate scores.\n- A paid multi-model audit hits `no_pricing` or a cost cap: fall back to the default single cheap judge and tell the user why.\n\n## Anti-Patterns\n\n- **Editing any audited file.** Report-only — even ? zero-risk deletions are\n  recommendations, not actions. \"Auto-fix\" promises contradict the\n  rendered-file guard and are out of contract.\n- **Recommending a direct edit to a rendered file.** SOUL.md \u002F USER.md \u002F\n  ACCESS_POLICY.md \u002F HEARTBEAT.md edits are overwritten by the next\n  `gbrain bootstrap render`. Target the answer bank or template, then\n  re-render.\n- **Raw model API calls for judging.** The eval runner owns provider config,\n  receipts, and verdict aggregation — route through `gbrain eval cross-modal`.\n- **Hardcoding model IDs.** Resolve the judge from the user's model tiers;\n  model names in a skill body rot.\n- **Running the full multi-model panel by default.** It is an explicit opt-in;\n  the single-cheap-model pass is the default for cost reasons.\n- **Auditing on-demand content as if always-loaded.** Skills and reference\n  docs don't pay the per-turn tax; flagging them inflates savings numbers.\n- **Inventing token counts.** Run the pre-pass; estimates are labeled `~N`\n  with the divisor stated, and a host-reported exact figure always wins.\n- **Rewriting identity content yourself.** If a finding is about WHAT an\n  identity file says (wrong persona, outdated profile), route to soul-audit —\n  the interview is the only author of that content.\n\n## Dedup\n\n- **soul-audit** — identity CONTENT via interview: what SOUL.md\u002FUSER.md\n  should SAY, sourced from the user's own words. context-audit is\n  token\u002Fstructure hygiene: what the stack COSTS per turn, where it repeats or\n  contradicts itself. A finding like \"USER.md's profile is outdated\" hands\n  off to soul-audit; \"USER.md restates 800 tokens already in SOUL.md\" stays\n  here. Both respect the same rendered-file rule.\n- **skill-optimizer** — tunes ONE skill's body against a benchmark and can\n  mutate it. context-audit never mutates and looks only at always-loaded\n  files; skills appear only as extraction destinations.\n- **functional-area-resolver** — the compression TECHNIQUE for oversized\n  routing tables (>=12KB). context-audit may cite it as the recommended fix\n  when a routing section is the finding; it never applies it.\n- **skillpack-check** — install\u002Fruntime health (DB, worker, migrations), not\n  context size or prompt content.\n- **cross-modal-review** — general second-opinion gate on arbitrary work\n  products. context-audit uses the same underlying runner but as its own\n  fixed judging step with audit-specific pass criteria; asking for \"a second\n  opinion on this code\" routes there, not here.\n",{"name":5,"tools":50,"version":52,"mutating":46,"triggers":53,"upstream":61,"description":62,"when_to_use":63,"writes_pages":46},[51,40],"shell","1.0.0",[25,54,55,56,57,58,59,60],"context diet","system prompt audit","prompt compression","reduce context size","audit my context stack","context is too big","token hygiene","context-audit@fc834ee","Token-hygiene audit of the always-loaded context stack — CLAUDE.md,\nAGENTS.md, auto-memory MEMORY.md, and the bootstrap-rendered identity files\n(SOUL.md, USER.md, ACCESS_POLICY.md, HEARTBEAT.md) or their harness\nequivalents. Finds redundancy, contradictions, stale content, compression\ncandidates, and skill-extraction candidates; produces a ranked action list\nsorted by token savings with a risk class per finding. REPORT-ONLY: this\nskill never edits any audited file. Recommendations for bootstrap-rendered\nfiles target the interview answer bank \u002F templates, never the rendered\noutput. Judging routes through `gbrain eval cross-modal` (single cheap\nmodel by default; full multi-model panel is explicit opt-in).\n","Use when the user asks: \"context audit\", \"context diet\", \"system prompt audit\", \"prompt compression\", \"reduce context size\".","master","074ec301549ded4930f04d2c3b22d709a6c095cc","plugin\u002Fskills\u002Fcontext-audit",4871,"https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain","https:\u002F\u002Fgithub.com\u002Fgarrytan","https:\u002F\u002Fblog.garrytan.com","Writes software, dreams. ","2026-11-12 04:41:06",{"source":8,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add garrytan\u002Fgbrain --skill context-audit",{"tool":79,"command":80},"bunx","bunx skills add garrytan\u002Fgbrain --skill context-audit",{"tool":82,"command":83},"pnpm","pnpm dlx skills add garrytan\u002Fgbrain --skill context-audit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Fcontext-audit\u002FSKILL.md",true,[87],{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"routing-eval.jsonl","OTHER","其他",1781,"https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Fcontext-audit\u002Frouting-eval.jsonl",[94,106,112,134,161,175],{"skillNo":95,"name":96,"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":97,"categories":98,"keywords":99,"publishedAt":45},"01M6N109FNGH1PK49T734PZXGB","query-helper","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fquery-helper\u002FSKILL.md",[],[100,101,102,103,104,105,32],"query helper","helper","query","search","page","find",{"skillNo":107,"name":108,"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":109,"categories":110,"keywords":111,"publishedAt":45},"01M6N108A23GW6NGQEQ0E7GV0A","broken","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbroken\u002FSKILL.md",[],[108],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":45},"01M6N105E88C5K2H03H0CC79G1","brain-ops","Read, enrich, and write brain pages with source attribution.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbrain-ops\u002FSKILL.md",[],[119,120,121,122,123,104,40,124,125,126,102,127,128,129,130,131,132,133,103],"brain ops","brain","ops","true","attribution","write","up","look","pages","people","with","enrich","web","path","source",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":145,"publishedAt":45},"01M6N102GRMF22TVCNT6RK5MRD","meeting-prep","Build a briefing before you meet someone, from their recent threads, open loops and what they care about.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Fmeeting-prep\u002FSKILL.md",[140],{"categoryNo":141,"categoryName":142,"taxonomyType":143,"taxonomyTypeDesc":144},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[146,147,148,149,150,103,151,152,153,102,32,154,155,156,157,158,159,160],"meeting","prep","meeting prep","me","prepare","brief","open","build","loops","about","you","briefing","threads","for","Meet",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":45},"01M6N1005QK7REHX5KGMNR5PF0","inbox-zero","Triage the inbox into replies, delegations and archives.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Finbox-zero\u002FSKILL.md",[],[168,169,170,103,171,32,172,173,174],"inbox zero","ZeRO","inbox","clear","replies","my","triage",{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":45},"01M6N0ZXQ8RRRW71PNV61T57GP","deal-memo","Draft an investment memo from the deal pages and the founder history already in the brain.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Fdeal-memo\u002FSKILL.md",[],[182,183,184,127,120,185,186,124,187,122,103,188],"deal memo","deal","memo","draft","investment","history","founder"]