[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C37SM151ATMQ1X5PZNN2XS":3,"skill-same:01M6C37SM151ATMQ1X5PZNN2XS":87},{"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},"01M6C37SM151ATMQ1X5PZNN2XS","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\u002Fplugins\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},"01M8BW60ZFWDZV0VMGET8T2FHG","云成本管理与优化","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\u002F${CLAUDE_PLUGIN_ROOT}\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\u002F${CLAUDE_PLUGIN_ROOT}\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\u002Fplugins\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\u002Fplugins\u002Fnlp-prod\u002Fskills\u002Fcost-optimizer\u002FSKILL.md",true,[],[88,96,101,126,145,150],{"skillNo":89,"name":90,"nameZh":17,"description":91,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":95},"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":97,"name":90,"nameZh":17,"description":91,"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":95},"01M78KSEZS9ZNNFESY9ANW22S0","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":17,"description":104,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":105,"categories":106,"keywords":107,"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",[],[108,109,110,111,112,42,113,114,37,115,116,117,118,119,120,121,122,123,124,125],"hardening","host","host hardening","verification","secrets","request","remediation","audit","plan","port","bind","Bash","access","only","retention","re","never","firewall",{"skillNo":127,"name":128,"nameZh":17,"description":129,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":130,"categories":131,"keywords":132,"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",[],[133,134,135,136,137,34,42,138,117,124,119,139,109,140,121,141,142,125,143,144],"analysis","exposure analysis","collection","reconstruction","operator","credentials","unknown","internet","local","scope","ports","ufw",{"skillNo":146,"name":103,"nameZh":17,"description":104,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":50},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[108,109,110,123,124,125,118,122,37,112,42,113,114,115,116,117,111,119,120,121],{"skillNo":151,"name":128,"nameZh":17,"description":129,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":50},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[133,134,144,143,137,142,141,121,136,34,42,138,117,135,119,139,109,125,124,140]]