[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ERHWRET2XTNPZX9M05PXG6":3,"skill-same:01M7ERHWRET2XTNPZX9M05PXG6":48},{"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":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7ERHWRET2XTNPZX9M05PXG6","cost-counterfactual",null,"Multi-baseline counterfactual cost analysis. Compares actual session spend to hypothetical always-haiku \u002F always-sonnet \u002F always-opus routing baselines. Answers \"is the routing earning its keep?\" Negative savings flag over-escalation; positive savings quantify the router's win.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fruflo\u002Fplugins\u002Fruflo-cost-tracker\u002Fskills\u002Fcost-counterfactual\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cost-counterfactual\ndescription: Multi-baseline counterfactual cost analysis. Compares actual session spend to hypothetical always-haiku \u002F always-sonnet \u002F always-opus routing baselines. Answers \"is the routing earning its keep?\" Negative savings flag over-escalation; positive savings quantify the router's win.\nargument-hint: \"[--since 7d] [--baseline always-haiku|always-sonnet|always-opus|all] [--format table|json]\"\nallowed-tools: Bash\n---\n\nMulti-baseline counterfactual cost analysis. Pairs with the existing observability surface:\n\n- **`cost-budget-check`** — \"have we crossed a threshold?\" (reactive)\n- **`cost-projection`** — \"when will we cross a threshold?\" (predictive)\n- **`cost-counterfactual`** — \"is the routing earning its keep?\" (comparative) ← this one\n\n## Algorithm\n\n1. Read all `session-*` records from the `cost-tracking` namespace.\n2. Apply `--since` window filter (default all-time).\n3. Sum tokens across `byModel[*]` entries for each session.\n4. For each requested baseline (default: all three):\n   - `counterfactualUsd = (input × tier.input + output × tier.output + cache_write × tier.cache_write + cache_read × tier.cache_read) \u002F 1M`\n5. Compute `savings = counterfactualUsd − actualUsd`.\n6. Emit per-baseline totals + savings % across the comparison set.\n\n## Smoke transcript (2 sessions: 50K haiku tokens + 50K sonnet tokens)\n\n```\n| Sessions considered | 2 |\n| Total input tokens  | 100,000 |\n| Actual spend        | $0.162500 |\n\n| Baseline           | Hypothetical | Actual    | Savings    | %       |\n| `always-haiku`     | $0.025000    | $0.162500 | -$0.137500 | -550.00% |\n| `always-sonnet`    | $0.300000    | $0.162500 | +$0.137500 |   45.83% |\n| `always-opus`      | $1.500000    | $0.162500 | +$1.337500 |   89.17% |\n```\n\n## How to read negative savings\n\nA negative `always-haiku` result means **the router chose more-expensive models than haiku** on tasks haiku could have handled. That's an over-escalation signal:\n- Maybe qualityBar is set too high\n- Maybe the sonnet\u002Fopus session was warranted by complexity but the baseline doesn't know that\n- Run `cost optimize` (or inspect specific sessions via `cost conversation`) to investigate\n\nPositive savings quantify the router's win against that baseline. The most informative number is usually `always-sonnet` — it's the standard \"safe default\" baseline most teams would pick if they didn't have routing.\n\n## When to use\n\n- **Quarterly cost review**: \"We saved $X vs always-Sonnet — here's the proof.\"\n- **CI gate**: `cost counterfactual --format json | jq '.baselines[1].savingsPct > 30'` — fail builds if routing isn't saving ≥30% vs sonnet baseline (workload-shift detector).\n- **Routing-config validation**: When introducing a new qualityBar or cost-ceiling, re-run counterfactual to confirm savings didn't regress.\n\n## Stationarity caveat\n\nLike all counterfactual analyses, this assumes the same tokens at the same complexity would have produced the same outcome from the baseline model. That's an upper bound — the baseline might have failed and required retries, which the math doesn't capture. Treat the numbers as a quality-blind ceiling.\n","Multi-baseline counterfactual cost analysis. Pairs with the existing observability surface:\n\n- **`cost-budget-check`** — \"have we crossed a threshold?\" (reactive)\n- **`cost-projection`** — \"when will we cross a threshold?\" (predictive)\n- **`cost-counterfactual`** — \"is the routing earning its keep?\" (comparative) ← this one\n\n## Algorithm\n\n1. Read all `session-*` records from the `cost-tracking` namespace.\n2. Apply `--since` window filter (default all-time).\n3. Sum tokens across `byModel[*]` entries for each session.\n4. For each requested baseline (default: all three):\n   - `counterfactualUsd = (input × tier.input + output × tier.output + cache_write × tier.cache_write + cache_read × tier.cache_read) \u002F 1M`\n5. Compute `savings = counterfactualUsd − actualUsd`.\n6. Emit per-baseline totals + savings % across the comparison set.\n\n## Smoke transcript (2 sessions: 50K haiku tokens + 50K sonnet tokens)\n\n```\n| Sessions considered | 2 |\n| Total input tokens  | 100,000 |\n| Actual spend        | $0.162500 |\n\n| Baseline           | Hypothetical | Actual    | Savings    | %       |\n| `always-haiku`     | $0.025000    | $0.162500 | -$0.137500 | -550.00% |\n| `always-sonnet`    | $0.300000    | $0.162500 | +$0.137500 |   45.83% |\n| `always-opus`      | $1.500000    | $0.162500 | +$1.337500 |   89.17% |\n```\n\n## How to read negative savings\n\nA negative `always-haiku` result means **the router chose more-expensive models than haiku** on tasks haiku could have handled. That's an over-escalation signal:\n- Maybe qualityBar is set too high\n- Maybe the sonnet\u002Fopus session was warranted by complexity but the baseline doesn't know that\n- Run `cost optimize` (or inspect specific sessions via `cost conversation`) to investigate\n\nPositive savings quantify the router's win against that baseline. The most informative number is usually `always-sonnet` — it's the standard \"safe default\" baseline most teams would pick if they didn't have routing.\n\n## When to use\n\n- **Quarterly cost review**: \"We saved $X vs always-Sonnet — here's the proof.\"\n- **CI gate**: `cost counterfactual --format json | jq '.baselines[1].savingsPct > 30'` — fail builds if routing isn't saving ≥30% vs sonnet baseline (workload-shift detector).\n- **Routing-config validation**: When introducing a new qualityBar or cost-ceiling, re-run counterfactual to confirm savings didn't regress.\n\n## Stationarity caveat\n\nLike all counterfactual analyses, this assumes the same tokens at the same complexity would have produced the same outcome from the baseline model. That's an upper bound — the baseline might have failed and required retries, which the math doesn't capture. Treat the numbers as a quality-blind ceiling.\n",{"name":5,"description":7,"allowed-tools":24,"argument-hint":25},"Bash","[--since 7d] [--baseline always-haiku|always-sonnet|always-opus|all] [--format table|json]","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fruflo\u002Fplugins\u002Fruflo-cost-tracker\u002Fskills\u002Fcost-counterfactual",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill cost-counterfactual",{"tool":40,"command":41},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill cost-counterfactual",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill cost-counterfactual","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fruflo\u002Fplugins\u002Fruflo-cost-tracker\u002Fskills\u002Fcost-counterfactual\u002FSKILL.md",true,[],[49,57,62,69,76,83],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":56},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":58,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":56},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":56},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":56},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":56},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":56},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]