[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6X7YRP6QTX33C4EVT4VHWM9":3,"skill-same:01M6X7YRP6QTX33C4EVT4VHWM9":80},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":62,"ownerHtmlUrl":63,"ownerBlogUrl":62,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M6X7YRP6QTX33C4EVT4VHWM9","token-optimizer",null,"Use BEFORE any verbose CLI run, large file read, doc conversion, or near-context handoff — decision tree keyed by intent citing the canonical token-saving asset.","event4u-app\u002Fagent-config","event4u-app","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F199339632?v=4","01M6X5TWBNCQCE1VDKT4E9KF7N","event4u.app","01M6X5TWF4HRM266RG2Q5VVH1X",19,"MIT","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Ftoken-optimizer\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"token","optimizer","token optimizer","context","context handoff","near","canonical","asset","intent","conversion","cli","write","read","command","decision","doc","Meta","run","config","handoff","2026-11-10 10:12:30",false,"---\nmodel_tier: medium\nname: token-optimizer\ndescription: \"Use BEFORE any verbose CLI run, large file read, doc conversion, or near-context handoff — decision tree keyed by intent citing the canonical token-saving asset.\"\ndomain: process\nscope:\n  write: []\n  verification_reason: \"an index-and-routing skill — it names other artefacts to load and writes nothing. Absence of a write is not something a command can prove.\"\nexecution:\n  type: assisted\n  handler: shell\n  allowed_tools: []\nworkspaces:\n  - agent-config-maintainer\npacks:\n  - meta\n---\n\n# Token Optimizer — decision tree + catalog\n\n## Iron Law\n\n```\nCONSULT THIS SKILL BEFORE THE ACTION, NOT AFTER.\nTHE TREE NAMES THE CANONICAL ASSET — DO NOT RESTATE OR DUPLICATE IT.\n```\n\n## When to use\n\nProactively, BEFORE you:\n\n- Run a verbose CLI command (tests, linters, build, git log, large `grep`)\n- Read or paste a large document, log, or tool dump\n- Repeat the same tool call across many files \u002F records\n- Approach the context-window limit and need to hand off\n- Make a cost-aware decision (which model, which budget, when to stop)\n\nReactively when output already burned tokens — record the lesson, do\nnot re-explore. Cite the leaf, move on.\n\n## Procedure\n\n1. **Classify intent** — match the situation to one branch of the tree below.\n2. **Cite the leaf** — name the canonical asset (rule, skill, or upstream link).\n3. **Apply** — execute the cited asset's contract; do NOT inline its content.\n4. **Verify** — output respects the cited Iron Law (redirect, wrap, batch, etc.).\n\n### Decision tree\n\n```\nINTENT\n├── Verbose CLI output incoming\n│     → cite [cli-output-handling](..\u002F..\u002Frules\u002Fcli-output-handling.md)\n│       (Iron Law: redirect \u002F tail \u002F grep \u002F wrap)\n│     → cite [rtk-output-filtering](..\u002Frtk-output-filtering\u002FSKILL.md)\n│       (rtk wrapper — upstream reports 60-90% on tests\u002Flinters\u002Fgit)\n│\n├── Large document or paste (PDF, DOCX, HTML, transcript)\n│     → cite markitdown (upstream: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmarkitdown)\n│       Convert FIRST, then read the markdown — never paste raw binary.\n│\n├── Large file read (source \u002F data \u002F log already in the tree, > 800 lines)\n│     → cite [token-efficiency § Size-gated reads](..\u002F..\u002Frules\u002Ftoken-efficiency.md)\n│       (size → structural grep → bounded slice; never a full read on spec)\n│\n├── Repeated tool-call across N targets\n│     → cite [token-efficiency](..\u002F..\u002Frules\u002Ftoken-efficiency.md)\n│       (batch, parallelize, prune; one tool call > many)\n│\n├── Near context limit, work not finished\n│     → cite [agent-handoff](..\u002F..\u002Fdomains\u002Fmeta\u002Fagent-handoff\u002Fcommand.md)\n│       (session picker + generated handoff; auto-seeds the fresh chat)\n│\n├── Cost-aware decision (model pick, budget, stop-criterion)\n│     → cite \u002Fcost:report (when shipped) — until then, fall back to\n│       [token-efficiency](..\u002F..\u002Frules\u002Ftoken-efficiency.md) and\n│       [direct-answers § Brevity by Default](..\u002F..\u002Frules\u002Fdirect-answers.md)\n│\n└── API-bill lever (stable prefix reused across calls · non-interactive\n    bulk cohort · model\u002Feffort pick against the paid Anthropic bill)\n      → cite [api-cost-levers](..\u002F..\u002F..\u002Fdocs\u002Fguidelines\u002Fagent-infra\u002Fapi-cost-levers.md)\n        (prompt caching ~0.1x reads · Batch -50% · model tiering · effort)\n```\n\n## Catalog\n\n| Asset | Path | Trigger keywords | What it does |\n|---|---|---|---|\n| `cli-output-handling` | `src\u002Frules\u002Fcli-output-handling.md` | `verbose`, `tail`, `grep`, `CLI` | Wrap-tail-grep contract for any verbose command |\n| `rtk-output-filtering` | `src\u002Fskills\u002Frtk-output-filtering\u002FSKILL.md` | `rtk`, `verbose`, `filter`, `wrap` | Project-local rtk filters; wrapper command |\n| `token-efficiency` | `src\u002Frules\u002Ftoken-efficiency.md` | `redirect`, `verbose`, `concise`, `tool`, `large file` | Batch + parallelize tool calls; brevity floor; size-gated reads (probe → grep → slice above 800 lines) |\n| `agent-handoff` | `src\u002Fdomains\u002Fmeta\u002Fagent-handoff\u002Fcommand.md` | `handoff`, `fresh`, `chat`, `context`, `resume`, `session` | Session picker + generated handoff auto-seeding the next session |\n| `direct-answers` | `src\u002Frules\u002Fdirect-answers.md` | `brevity`, `flattery`, `severity`, `tiered` | Iron-Law brevity floor (kernel) |\n| `markitdown` | upstream: github.com\u002Fmicrosoft\u002Fmarkitdown | `PDF`, `DOCX`, `HTML`, `convert` | Document → markdown converter (authoritative-link only) |\n| `\u002Fcost:report` | TBD — an internal roadmap (local-only) § P1.2` | `cost`, `model spend`, `budget` | Per-session cost telemetry (planned) |\n| `api-cost-levers` | `docs\u002Fguidelines\u002Fagent-infra\u002Fapi-cost-levers.md` | `cache`, `caching`, `batch`, `tiering`, `effort` | Anthropic billing levers: prompt caching, Batch API, model tiering, effort\u002Foutput right-sizing |\n\n## Output format\n\n1. Name the cited asset by its leaf id (e.g. `cli-output-handling`, `rtk-output-filtering`).\n2. State the Iron Law in one line; do NOT inline the asset's body.\n3. If multiple branches match, cite all relevant leaves (no merge, no rewrite).\n4. End with the action you take next, citing the asset that authorizes it.\n\n## Gotcha\n\n- Catalog rows live and die with their target asset. If you edit a\n  cited asset's trigger keywords or scope, update the matching row in\n  this skill in the same commit (enforced by\n  [`token-optimizer-maintenance`](..\u002F..\u002Frules\u002Ftoken-optimizer-maintenance.md)\n  rule + `scripts\u002Fcheck_token_optimizer_freshness.ts` CI gate).\n- Tree must stay scannable (≤ 50 lines incl. labels). Catalog rows\n  carry the long form.\n- Authoritative-link assets (`rtk` upstream, `markitdown` upstream,\n  pricing constants) are never copied — always linked.\n\n## Do NOT\n\n- Do NOT inline content from a cited asset. If the leaf is \"rtk does X\",\n  the agent reads `rtk-output-filtering`. Duplication = drift = stale.\n- Do NOT replace any rule. The rules carry the Iron Laws; this skill\n  carries the lookup index.\n- Do NOT define new policies — every leaf must cite an existing rule,\n  skill, or upstream asset.\n- Do NOT consult this skill AFTER tokens were already burned — record\n  the lesson and move on.\n\n\u003C!-- TELEMETRY: consulted=[uncomment + ISO timestamp on each consult] context=[CLI|doc|repeat|handoff|cost] -->\n","# Token Optimizer — decision tree + catalog\n\n## Iron Law\n\n```\nCONSULT THIS SKILL BEFORE THE ACTION, NOT AFTER.\nTHE TREE NAMES THE CANONICAL ASSET — DO NOT RESTATE OR DUPLICATE IT.\n```\n\n## When to use\n\nProactively, BEFORE you:\n\n- Run a verbose CLI command (tests, linters, build, git log, large `grep`)\n- Read or paste a large document, log, or tool dump\n- Repeat the same tool call across many files \u002F records\n- Approach the context-window limit and need to hand off\n- Make a cost-aware decision (which model, which budget, when to stop)\n\nReactively when output already burned tokens — record the lesson, do\nnot re-explore. Cite the leaf, move on.\n\n## Procedure\n\n1. **Classify intent** — match the situation to one branch of the tree below.\n2. **Cite the leaf** — name the canonical asset (rule, skill, or upstream link).\n3. **Apply** — execute the cited asset's contract; do NOT inline its content.\n4. **Verify** — output respects the cited Iron Law (redirect, wrap, batch, etc.).\n\n### Decision tree\n\n```\nINTENT\n├── Verbose CLI output incoming\n│     → cite [cli-output-handling](..\u002F..\u002Frules\u002Fcli-output-handling.md)\n│       (Iron Law: redirect \u002F tail \u002F grep \u002F wrap)\n│     → cite [rtk-output-filtering](..\u002Frtk-output-filtering\u002FSKILL.md)\n│       (rtk wrapper — upstream reports 60-90% on tests\u002Flinters\u002Fgit)\n│\n├── Large document or paste (PDF, DOCX, HTML, transcript)\n│     → cite markitdown (upstream: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmarkitdown)\n│       Convert FIRST, then read the markdown — never paste raw binary.\n│\n├── Large file read (source \u002F data \u002F log already in the tree, > 800 lines)\n│     → cite [token-efficiency § Size-gated reads](..\u002F..\u002Frules\u002Ftoken-efficiency.md)\n│       (size → structural grep → bounded slice; never a full read on spec)\n│\n├── Repeated tool-call across N targets\n│     → cite [token-efficiency](..\u002F..\u002Frules\u002Ftoken-efficiency.md)\n│       (batch, parallelize, prune; one tool call > many)\n│\n├── Near context limit, work not finished\n│     → cite [agent-handoff](..\u002F..\u002Fdomains\u002Fmeta\u002Fagent-handoff\u002Fcommand.md)\n│       (session picker + generated handoff; auto-seeds the fresh chat)\n│\n├── Cost-aware decision (model pick, budget, stop-criterion)\n│     → cite \u002Fcost:report (when shipped) — until then, fall back to\n│       [token-efficiency](..\u002F..\u002Frules\u002Ftoken-efficiency.md) and\n│       [direct-answers § Brevity by Default](..\u002F..\u002Frules\u002Fdirect-answers.md)\n│\n└── API-bill lever (stable prefix reused across calls · non-interactive\n    bulk cohort · model\u002Feffort pick against the paid Anthropic bill)\n      → cite [api-cost-levers](..\u002F..\u002F..\u002Fdocs\u002Fguidelines\u002Fagent-infra\u002Fapi-cost-levers.md)\n        (prompt caching ~0.1x reads · Batch -50% · model tiering · effort)\n```\n\n## Catalog\n\n| Asset | Path | Trigger keywords | What it does |\n|---|---|---|---|\n| `cli-output-handling` | `src\u002Frules\u002Fcli-output-handling.md` | `verbose`, `tail`, `grep`, `CLI` | Wrap-tail-grep contract for any verbose command |\n| `rtk-output-filtering` | `src\u002Fskills\u002Frtk-output-filtering\u002FSKILL.md` | `rtk`, `verbose`, `filter`, `wrap` | Project-local rtk filters; wrapper command |\n| `token-efficiency` | `src\u002Frules\u002Ftoken-efficiency.md` | `redirect`, `verbose`, `concise`, `tool`, `large file` | Batch + parallelize tool calls; brevity floor; size-gated reads (probe → grep → slice above 800 lines) |\n| `agent-handoff` | `src\u002Fdomains\u002Fmeta\u002Fagent-handoff\u002Fcommand.md` | `handoff`, `fresh`, `chat`, `context`, `resume`, `session` | Session picker + generated handoff auto-seeding the next session |\n| `direct-answers` | `src\u002Frules\u002Fdirect-answers.md` | `brevity`, `flattery`, `severity`, `tiered` | Iron-Law brevity floor (kernel) |\n| `markitdown` | upstream: github.com\u002Fmicrosoft\u002Fmarkitdown | `PDF`, `DOCX`, `HTML`, `convert` | Document → markdown converter (authoritative-link only) |\n| `\u002Fcost:report` | TBD — an internal roadmap (local-only) § P1.2` | `cost`, `model spend`, `budget` | Per-session cost telemetry (planned) |\n| `api-cost-levers` | `docs\u002Fguidelines\u002Fagent-infra\u002Fapi-cost-levers.md` | `cache`, `caching`, `batch`, `tiering`, `effort` | Anthropic billing levers: prompt caching, Batch API, model tiering, effort\u002Foutput right-sizing |\n\n## Output format\n\n1. Name the cited asset by its leaf id (e.g. `cli-output-handling`, `rtk-output-filtering`).\n2. State the Iron Law in one line; do NOT inline the asset's body.\n3. If multiple branches match, cite all relevant leaves (no merge, no rewrite).\n4. End with the action you take next, citing the asset that authorizes it.\n\n## Gotcha\n\n- Catalog rows live and die with their target asset. If you edit a\n  cited asset's trigger keywords or scope, update the matching row in\n  this skill in the same commit (enforced by\n  [`token-optimizer-maintenance`](..\u002F..\u002Frules\u002Ftoken-optimizer-maintenance.md)\n  rule + `scripts\u002Fcheck_token_optimizer_freshness.ts` CI gate).\n- Tree must stay scannable (≤ 50 lines incl. labels). Catalog rows\n  carry the long form.\n- Authoritative-link assets (`rtk` upstream, `markitdown` upstream,\n  pricing constants) are never copied — always linked.\n\n## Do NOT\n\n- Do NOT inline content from a cited asset. If the leaf is \"rtk does X\",\n  the agent reads `rtk-output-filtering`. Duplication = drift = stale.\n- Do NOT replace any rule. The rules carry the Iron Laws; this skill\n  carries the lookup index.\n- Do NOT define new policies — every leaf must cite an existing rule,\n  skill, or upstream asset.\n- Do NOT consult this skill AFTER tokens were already burned — record\n  the lesson and move on.\n\n\u003C!-- TELEMETRY: consulted=[uncomment + ISO timestamp on each consult] context=[CLI|doc|repeat|handoff|cost] -->\n",{"name":5,"packs":44,"scope":46,"domain":49,"execution":50,"model_tier":54,"workspaces":55,"description":7},[45],"meta",{"write":47,"verification_reason":48},[],"an index-and-routing skill — it names other artefacts to load and writes nothing. Absence of a write is not something a command can prove.","process",{"type":51,"handler":52,"allowed_tools":53},"assisted","shell",[],"medium",[56],"agent-config-maintainer","main","12bd765ce1d800501d45dfb8232102793af01290","src\u002Fskills\u002Ftoken-optimizer",1,"https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config","https:\u002F\u002Fevent4u.app","https:\u002F\u002Fgithub.com\u002Fevent4u-app","Your events in your hand","2026-11-14 02:29:41",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add event4u-app\u002Fagent-config --skill token-optimizer",{"tool":72,"command":73},"bunx","bunx skills add event4u-app\u002Fagent-config --skill token-optimizer",{"tool":75,"command":76},"pnpm","pnpm dlx skills add event4u-app\u002Fagent-config --skill token-optimizer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Fsrc\u002Fskills\u002Ftoken-optimizer\u002FSKILL.md",true,[],[81,94,106,117,128,137],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":39},"01M6X84PK96XBPENXH66JCTSD1","unknown-key-fixture","Declares a key the schema does not know.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Funknown-key\u002FSKILL.md",[],[88,89,90,91,92,93],"unknown key fixture","Unknown key","fixture","unknown","schema","package",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M6X84HW7NAHZ7GZMQ9RXK1XJ","portable-fixture","Declares only semantics the MCP-lite carrier transports whole.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Fportable\u002FSKILL.md",[],[90,101,102,103,104,93,105],"portable","portable fixture","engineer","only","MCP",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":39},"01M6X84F29FE0RGGZ1ZTFGZTX2","non-portable-fixture","Declares a runtime semantic the carrier drops.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Fscripts\u002Ffixtures\u002Fbody-portable\u002Fnon-portable\u002FSKILL.md",[],[102,113,101,90,114,115,116,93],"non portable fixture","semantic","high","runtime",{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":39},"01M6X848F706PT9MDCX75JKJ6B","candidate-zero-width","A candidate whose prose carries an invisible joiner.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fzero-width-injection\u002FSKILL.md",[],[124,125,126,127],"candidate zero width","candidate","ZeRO","prose",{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":39},"01M6X841SSC2T31VDF41SA6DG1","candidate-disclosure-suppression","A candidate whose prose tells the agent to withhold from the user.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fdisclosure-suppression\u002FSKILL.md",[],[135,125,127,136],"candidate disclosure suppression","user",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":39},"01M6X83TFS5AGPBPVTQNWP0BB3","candidate-dangerous-frontmatter","A candidate claiming an unscoped tool grant and a permission bypass.","https:\u002F\u002Fgithub.com\u002Fevent4u-app\u002Fagent-config\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskill-scout-candidates\u002Fdangerous-frontmatter\u002FSKILL.md",[],[144,125,145,52,146,147],"candidate dangerous frontmatter","frontmatter","permission","tool"]