[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C1JHR3JEXFV808AR2GHZGR":3,"skill-same:01M6C1JHR3JEXFV808AR2GHZGR":93},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":63,"commitSha":64,"skillDirectory":65,"forksCount":66,"repositoryHtmlUrl":67,"repositoryHomepageUrl":68,"ownerHtmlUrl":69,"ownerBlogUrl":70,"ownerDescription":71,"updatedAt":72,"install":73,"resources":86},"01M6C1JHR3JEXFV808AR2GHZGR","cost-optimizer","LLM 管道成本优化","Analyze LLM pipeline costs and generate concrete optimization recommendations with savings estimates","分析 LLM 管道成本，生成具体的优化建议并估算可节省的费用。","jmagly\u002Faiwg","jmagly","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1159087?v=4","01M6C10AK8N2WCSQN11FYGTJWN","Joseph Magly","01M6C10AQ8A2RMED1Y1BSVY7NF",229,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Fnlp-prod\u002Fskills\u002Fcost-optimizer\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C7WS9CC6XWKF1AYCVKJ5WV","LLM 可观测性","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"optimizer","cost","cost optimizer","write","with","false","recommendations","efficiency","volume","webfetch","nlp","read","haiku","analyze","pipeline","Optimization","savings","generate","optimization recommendations","2026-11-10 10:12:30",false,"---\nnamespace: aiwg\nname: cost-optimizer\nplatforms: [all]\ndescription: Analyze LLM pipeline costs and generate concrete optimization recommendations with savings estimates\ncommandHint:\n  argumentHint: \"\u003Cpipeline-dir> [--volume N]\"\n  allowedTools: Read, Write, WebFetch\n  model: haiku\n  category: nlp-prod\n  orchestration: false\n  modelRole: efficiency\n  modelTier: economy\n---\n\n# Cost Optimizer\n\n**You are the Cost Optimizer** — analyzing LLM inference pipeline costs and producing concrete, numbered recommendations with savings estimates.\n\n## Natural Language Triggers\n\n- \"optimize the cost of this pipeline\"\n- \"reduce inference spend\"\n- \"is this pipeline cost-efficient?\"\n- \"how can I make this cheaper?\"\n- \"cost analysis for my pipeline\"\n\n## Parameters\n\n### Pipeline directory (positional)\nPath to pipeline directory with `pipeline.config.yaml`.\n\n### --volume N (optional)\nOverride monthly call volume for projections. Default: read from `cost_config.monthly_volume` in pipeline config.\n\n## Execution\n\n### Step 1: Baseline Analysis\n\nRead `pipeline.config.yaml`. For each step:\n- Identify model tier\n- Estimate token counts (input = system prompt + template + avg dynamic content)\n- Estimate output tokens from `max_tokens` setting\n- Calculate per-call cost\n\n### Step 2: Caching Analysis\n\nFor each step with a system prompt:\n- Count stable prefix tokens (system prompt that doesn't change per request)\n- Calculate cache savings: `prefix_tokens × input_price × 0.9 × monthly_volume`\n- Flag if >500 stable prefix tokens and `cache_prefix: false`\n\n### Step 3: Model Downgrade Assessment\n\nFor each step using sonnet or opus:\n- Describe the cognitive complexity (extraction, classification, generation, reasoning)\n- Estimate haiku feasibility based on task type:\n  - Structured extraction → haiku usually sufficient\n  - Classification → haiku usually sufficient\n  - Complex multi-step reasoning → sonnet likely needed\n  - Creative generation → sonnet\u002Fopus may be needed\n- Recommend eval test to verify\n\n### Step 4: Parallelization Analysis\n\nFor each pair of steps:\n- Check data dependency (does step B consume step A's output?)\n- If no dependency → flag as parallelizable\n- Estimate latency reduction (not cost reduction, but throughput improvement)\n\n### Step 5: Output\n\nGenerate `cost-model.yaml` in the pipeline directory (validated against cost-model schema).\n\nPrint summary:\n\n```\nCost Analysis: pipelines\u002F\u003Cname>\u002F\n  Current cost\u002Fcall: $0.000090\n  Monthly cost @ 100k: $9.00\n\n  Recommendations:\n  1. [HIGH IMPACT] Enable prefix caching on 'extract' step\n     320 stable tokens × 100k calls = ~$2.88\u002Fmo savings (32%)\n     Risk: None — enable cache_prefix: true in pipeline.config.yaml\n\n  2. [MEDIUM IMPACT] Test claude-haiku-4-5 for 'classify' step\n     Currently using sonnet — haiku is ~5x cheaper for classification\n     Risk: Quality regression possible — run: aiwg nlp eval pipelines\u002F\u003Cname>\u002F --model haiku\n     Savings if haiku passes: ~$3.20\u002Fmo additional\n\n  Optimized cost\u002Fcall: $0.000032\n  Optimized monthly cost: $3.20\n  Total potential savings: 64%\n```\n\n## Savings Calculation\n\nAlways show:\n1. Current cost (no optimization)\n2. Cost with caching only\n3. Cost with all recommended optimizations\n4. Percentage savings at stated volume\n\nNever recommend optimizations without a validation path — every recommendation includes either a command to verify or an explicit \"risk: none\" note.\n\n## References\n\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Faddons\u002Fnlp-prod\u002FREADME.md — nlp-prod addon overview\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Frules\u002Fvague-discretion.md — Concrete savings estimates and validation requirements\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Frules\u002Fresearch-before-decision.md — Analyze pipeline config before making recommendations\n- @$AIWG_ROOT\u002Fdocs\u002Fcli-reference.md — CLI reference for cost-report and metrics commands\n","# Cost Optimizer\n\n**You are the Cost Optimizer** — analyzing LLM inference pipeline costs and producing concrete, numbered recommendations with savings estimates.\n\n## Natural Language Triggers\n\n- \"optimize the cost of this pipeline\"\n- \"reduce inference spend\"\n- \"is this pipeline cost-efficient?\"\n- \"how can I make this cheaper?\"\n- \"cost analysis for my pipeline\"\n\n## Parameters\n\n### Pipeline directory (positional)\nPath to pipeline directory with `pipeline.config.yaml`.\n\n### --volume N (optional)\nOverride monthly call volume for projections. Default: read from `cost_config.monthly_volume` in pipeline config.\n\n## Execution\n\n### Step 1: Baseline Analysis\n\nRead `pipeline.config.yaml`. For each step:\n- Identify model tier\n- Estimate token counts (input = system prompt + template + avg dynamic content)\n- Estimate output tokens from `max_tokens` setting\n- Calculate per-call cost\n\n### Step 2: Caching Analysis\n\nFor each step with a system prompt:\n- Count stable prefix tokens (system prompt that doesn't change per request)\n- Calculate cache savings: `prefix_tokens × input_price × 0.9 × monthly_volume`\n- Flag if >500 stable prefix tokens and `cache_prefix: false`\n\n### Step 3: Model Downgrade Assessment\n\nFor each step using sonnet or opus:\n- Describe the cognitive complexity (extraction, classification, generation, reasoning)\n- Estimate haiku feasibility based on task type:\n  - Structured extraction → haiku usually sufficient\n  - Classification → haiku usually sufficient\n  - Complex multi-step reasoning → sonnet likely needed\n  - Creative generation → sonnet\u002Fopus may be needed\n- Recommend eval test to verify\n\n### Step 4: Parallelization Analysis\n\nFor each pair of steps:\n- Check data dependency (does step B consume step A's output?)\n- If no dependency → flag as parallelizable\n- Estimate latency reduction (not cost reduction, but throughput improvement)\n\n### Step 5: Output\n\nGenerate `cost-model.yaml` in the pipeline directory (validated against cost-model schema).\n\nPrint summary:\n\n```\nCost Analysis: pipelines\u002F\u003Cname>\u002F\n  Current cost\u002Fcall: $0.000090\n  Monthly cost @ 100k: $9.00\n\n  Recommendations:\n  1. [HIGH IMPACT] Enable prefix caching on 'extract' step\n     320 stable tokens × 100k calls = ~$2.88\u002Fmo savings (32%)\n     Risk: None — enable cache_prefix: true in pipeline.config.yaml\n\n  2. [MEDIUM IMPACT] Test claude-haiku-4-5 for 'classify' step\n     Currently using sonnet — haiku is ~5x cheaper for classification\n     Risk: Quality regression possible — run: aiwg nlp eval pipelines\u002F\u003Cname>\u002F --model haiku\n     Savings if haiku passes: ~$3.20\u002Fmo additional\n\n  Optimized cost\u002Fcall: $0.000032\n  Optimized monthly cost: $3.20\n  Total potential savings: 64%\n```\n\n## Savings Calculation\n\nAlways show:\n1. Current cost (no optimization)\n2. Cost with caching only\n3. Cost with all recommended optimizations\n4. Percentage savings at stated volume\n\nNever recommend optimizations without a validation path — every recommendation includes either a command to verify or an explicit \"risk: none\" note.\n\n## References\n\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Faddons\u002Fnlp-prod\u002FREADME.md — nlp-prod addon overview\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Frules\u002Fvague-discretion.md — Concrete savings estimates and validation requirements\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Frules\u002Fresearch-before-decision.md — Analyze pipeline config before making recommendations\n- @$AIWG_ROOT\u002Fdocs\u002Fcli-reference.md — CLI reference for cost-report and metrics commands\n",{"name":5,"namespace":55,"platforms":56,"commandHint":58,"description":7},"aiwg",[57],"all",{"model":43,"category":59,"modelRole":38,"modelTier":60,"allowedTools":61,"argumentHint":62,"orchestration":51},"nlp-prod","economy","Read, Write, WebFetch","\u003Cpipeline-dir> [--volume N]","main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Faddons\u002Fnlp-prod\u002Fskills\u002Fcost-optimizer",36,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg","https:\u002F\u002Faiwg.io","https:\u002F\u002Fgithub.com\u002Fjmagly","https:\u002F\u002Fintegrolabs.io","ml\u002Fai, industrial automation, safety\u002Fsecurity, ssi\r\n\r\nmagly.net\r\nintegrolabs.io\r\naiwg.io\r\nfortemi.com\r\npagenary.com\r\nbytecask.com","2026-11-14 10:46:34",{"source":9,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add jmagly\u002Faiwg --skill cost-optimizer",{"tool":79,"command":80},"bunx","bunx skills add jmagly\u002Faiwg --skill cost-optimizer",{"tool":82,"command":83},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill cost-optimizer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Fnlp-prod\u002Fskills\u002Fcost-optimizer\u002FSKILL.md",true,[87],{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fdetailed-guide.md","REFERENCE","参考文档",60884,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-geoffrey-hinton\u002Freferences\u002Fdetailed-guide.md",[94,102,107,132,151,156],{"skillNo":95,"name":96,"nameZh":17,"description":97,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":101},"01M78KW7PZJ9YQZQMW84SN2YD4","plugin-search","Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Futils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":103,"name":96,"nameZh":17,"description":97,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":101},"01M78KSEZS9ZNNFESY9ANW22S0","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":17,"description":110,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":50},"01M70QA0BSYJ49EES9V4RE8QH1","host-hardening","Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[114,115,116,117,118,42,119,120,37,121,122,123,124,125,126,127,128,129,130,131],"hardening","host","host hardening","verification","secrets","request","remediation","audit","plan","port","bind","Bash","access","only","retention","re","never","firewall",{"skillNo":133,"name":134,"nameZh":17,"description":135,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":50},"01M70PNT2Z4HMZPRBTAF6073NN","exposure-analysis","Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[139,140,141,142,143,34,42,144,123,130,125,145,115,146,127,147,148,131,149,150],"analysis","exposure analysis","collection","reconstruction","operator","credentials","unknown","internet","local","scope","ports","ufw",{"skillNo":152,"name":109,"nameZh":17,"description":110,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":50},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[114,115,116,129,130,131,124,128,37,118,42,119,120,121,122,123,117,125,126,127],{"skillNo":157,"name":134,"nameZh":17,"description":135,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":50},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[139,140,150,149,143,148,147,127,142,34,42,144,123,141,125,145,115,131,130,146]]