[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EXM2Q2QNCM4FNHMBHYGMRG":3,"skill-same:01M7EXM2Q2QNCM4FNHMBHYGMRG":52},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7EXM2Q2QNCM4FNHMBHYGMRG","cache-efficiency",null,"Analyze prompt-cache effectiveness for Claude Code usage from the Agent Monitor dashboard — cache hit rate (total_cache_read \u002F (total_cache_read + total_input)), cache_write vs cache_read reuse, cache-read vs cache-write spend, and the sessions with the poorest reuse. Pulls token totals from \u002Fapi\u002Fanalytics, per-session detail from \u002Fapi\u002Fsessions, and dollar splits from \u002Fapi\u002Fpricing\u002Fcost. Use when diagnosing cache spend or deciding whether prompt caching is paying off.","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\u002F05-技能与代理开发\u002Fcache-efficiency\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cache-efficiency\ndescription: >\n  Analyze prompt-cache effectiveness for Claude Code usage from the Agent\n  Monitor dashboard — cache hit rate (total_cache_read \u002F (total_cache_read +\n  total_input)), cache_write vs cache_read reuse, cache-read vs cache-write\n  spend, and the sessions with the poorest reuse. Pulls token totals from\n  \u002Fapi\u002Fanalytics, per-session detail from \u002Fapi\u002Fsessions, and dollar splits\n  from \u002Fapi\u002Fpricing\u002Fcost. Use when diagnosing cache spend or deciding whether\n  prompt caching is paying off.\n---\n\n# Cache Efficiency\n\nDiagnose whether prompt caching is actually saving money, and where it is not.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be: empty (analyze the whole fleet), \"today\" \u002F \"this week\" \u002F a date range, a session ID to scope the analysis, or a target like \"hit rate > 80%\". When empty, analyze all data from `\u002Fapi\u002Fanalytics`.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET \u002Fapi\u002Fanalytics` | `tokens.total_input`, `tokens.total_output`, `tokens.total_cache_read`, `tokens.total_cache_write` (baselines pre-summed), plus `daily_sessions` |\n| `GET \u002Fapi\u002Fsessions?limit=200` | Session list — each has model, cwd, started_at, ended_at, inline `cost`, metadata (JSON: usage_extras with cache token detail) |\n| `GET \u002Fapi\u002Fsessions\u002F{id}` | Full session detail with nested agents and events, for drill-down on a flagged session |\n| `GET \u002Fapi\u002Fpricing\u002Fcost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — used to price cache read vs write spend |\n\n### How cache economics work\n\n```\ncache_hit_rate   = total_cache_read \u002F (total_cache_read + total_input)\ncache_reuse      = total_cache_read \u002F total_cache_write\ncache_read_cost  = (cache_read_tokens  \u002F 1M) × cache_read_per_mtok\ncache_write_cost = (cache_write_tokens \u002F 1M) × cache_write_per_mtok\n```\n\nCache writes cost more per token than cache reads (e.g. Sonnet $3.75 write vs $0.30 read per Mtok), and writes are billed even if the cached block is never reused. The payoff only arrives on subsequent reads — so a healthy fleet shows **cache_read_tokens far exceeding cache_write_tokens**. When `cache_reuse \u003C 1`, you are paying to cache context you barely re-read.\n\nToken counts are **effective totals** = `current + baseline` (baselines preserve pre-compaction tokens).\n\n## Report Sections\n\n### 1. Fleet Cache Hit Rate\nFrom `\u002Fapi\u002Fanalytics`: compute `cache_hit_rate × 100`. State raw `total_cache_read` and `total_input`. Benchmark: >70% strong, 40–70% moderate, \u003C40% weak prompt-cache utilization.\n\n### 2. Write vs Read Reuse\nCompute `cache_reuse = total_cache_read \u002F total_cache_write`. Show both token counts. Flag if reuse \u003C 1 (writing more cache than is ever read back).\n\n### 3. Cache Spend Split\nFrom `\u002Fapi\u002Fpricing\u002Fcost` breakdown, sum `cache_read_cost` and `cache_write_cost` across all models. Show the dollar split and what fraction of total cost is cache-write overhead vs cache-read savings.\n\n### 4. Sessions With Poor Reuse\nFrom `\u002Fapi\u002Fsessions?limit=200`, parse `metadata.usage_extras` for per-session cache read\u002Fwrite where available; rank sessions by lowest read\u002Fwrite reuse (and by cache_write-heavy cost). List the worst 10 with model, cost, and reuse ratio. Use `\u002Fapi\u002Fsessions\u002F{id}` to drill into any single flagged session.\n\n### 5. Recommendations\n- Sessions where `cache_write >> cache_read`: short or one-shot sessions rarely recoup cache writes — note them.\n- Stable, repeated context (system prompts, large files) should be cached once and reused; high churn defeats caching.\n- Estimate the dollar impact of raising the hit rate to the next benchmark tier.\n\n## Output\n\nStructured Markdown with tables. Currency as USD to 4 decimal places; rates as $\u002FMtok; percentages with ▲\u002F▼ for any trend. Token counts with thousands separators.\n","# Cache Efficiency\n\nDiagnose whether prompt caching is actually saving money, and where it is not.\n\n## Input\n\nThe user provides: **$ARGUMENTS**\n\nThis may be: empty (analyze the whole fleet), \"today\" \u002F \"this week\" \u002F a date range, a session ID to scope the analysis, or a target like \"hit rate > 80%\". When empty, analyze all data from `\u002Fapi\u002Fanalytics`.\n\n## Data Sources\n\n| Endpoint | Returns |\n|----------|---------|\n| `GET \u002Fapi\u002Fanalytics` | `tokens.total_input`, `tokens.total_output`, `tokens.total_cache_read`, `tokens.total_cache_write` (baselines pre-summed), plus `daily_sessions` |\n| `GET \u002Fapi\u002Fsessions?limit=200` | Session list — each has model, cwd, started_at, ended_at, inline `cost`, metadata (JSON: usage_extras with cache token detail) |\n| `GET \u002Fapi\u002Fsessions\u002F{id}` | Full session detail with nested agents and events, for drill-down on a flagged session |\n| `GET \u002Fapi\u002Fpricing\u002Fcost` | `{ total_cost, breakdown: [{ model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, cost, matched_rule }] }` — used to price cache read vs write spend |\n\n### How cache economics work\n\n```\ncache_hit_rate   = total_cache_read \u002F (total_cache_read + total_input)\ncache_reuse      = total_cache_read \u002F total_cache_write\ncache_read_cost  = (cache_read_tokens  \u002F 1M) × cache_read_per_mtok\ncache_write_cost = (cache_write_tokens \u002F 1M) × cache_write_per_mtok\n```\n\nCache writes cost more per token than cache reads (e.g. Sonnet $3.75 write vs $0.30 read per Mtok), and writes are billed even if the cached block is never reused. The payoff only arrives on subsequent reads — so a healthy fleet shows **cache_read_tokens far exceeding cache_write_tokens**. When `cache_reuse \u003C 1`, you are paying to cache context you barely re-read.\n\nToken counts are **effective totals** = `current + baseline` (baselines preserve pre-compaction tokens).\n\n## Report Sections\n\n### 1. Fleet Cache Hit Rate\nFrom `\u002Fapi\u002Fanalytics`: compute `cache_hit_rate × 100`. State raw `total_cache_read` and `total_input`. Benchmark: >70% strong, 40–70% moderate, \u003C40% weak prompt-cache utilization.\n\n### 2. Write vs Read Reuse\nCompute `cache_reuse = total_cache_read \u002F total_cache_write`. Show both token counts. Flag if reuse \u003C 1 (writing more cache than is ever read back).\n\n### 3. Cache Spend Split\nFrom `\u002Fapi\u002Fpricing\u002Fcost` breakdown, sum `cache_read_cost` and `cache_write_cost` across all models. Show the dollar split and what fraction of total cost is cache-write overhead vs cache-read savings.\n\n### 4. Sessions With Poor Reuse\nFrom `\u002Fapi\u002Fsessions?limit=200`, parse `metadata.usage_extras` for per-session cache read\u002Fwrite where available; rank sessions by lowest read\u002Fwrite reuse (and by cache_write-heavy cost). List the worst 10 with model, cost, and reuse ratio. Use `\u002Fapi\u002Fsessions\u002F{id}` to drill into any single flagged session.\n\n### 5. Recommendations\n- Sessions where `cache_write >> cache_read`: short or one-shot sessions rarely recoup cache writes — note them.\n- Stable, repeated context (system prompts, large files) should be cached once and reused; high churn defeats caching.\n- Estimate the dollar impact of raising the hit rate to the next benchmark tier.\n\n## Output\n\nStructured Markdown with tables. Currency as USD to 4 decimal places; rates as $\u002FMtok; percentages with ▲\u002F▼ for any trend. Token counts with thousands separators.\n",{"name":5,"description":7},"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fcache-efficiency",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":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill cache-efficiency",{"tool":38,"command":39},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill cache-efficiency",{"tool":41,"command":42},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill cache-efficiency","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fcache-efficiency\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"agents\u002Fopenai.yaml","REFERENCE","参考文档",269,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fcache-efficiency\u002Fagents\u002Fopenai.yaml",[53,61,66,73,80,87],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":60},"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":62,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":60},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":60},"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":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":60},"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":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":60},"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":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":60},"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",[],[]]