[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C17X7AV90C1MVM0WD650MP":3,"skill-same:01M6C17X7AV90C1MVM0WD650MP":73},{"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":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M6C17X7AV90C1MVM0WD650MP","cost-report","AIWG会话成本报告","Generate a cost report for an AIWG session or observe per-bot OpenRouter fleet spend","为 AIWG 会话生成成本报告，或观察每个 bot 的 OpenRouter 集群支出。","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\u002Faiwg-utils\u002Fskills\u002Fcost-report\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BW60ZFWDZV0VMGET8T2FHG","云成本管理与优化","SCENARIO","使用场景",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C0Z3CMNEXQ8ZT006T59HDX","预算分析师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39,40],"report","cost report","cost","bot","generate","openrouter","session","observe","fleet","for","2026-11-10 10:12:30",false,"---\nnamespace: aiwg\nname: cost-report\nplatforms: [all]\ndescription: Generate a cost report for an AIWG session or observe per-bot OpenRouter fleet spend\n\n---\n\n# cost-report\n\nYou generate a cost and token-spending report for the current or most recent workflow session. You read accumulated token usage data from `.aiwg\u002Fralph\u002Fcost-tracking.json` and present a breakdown by operation, model, and time period.\n\n## Triggers\n\nAlternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):\n\n- \"how much did that cost\" → report for most recent session\n- \"what did this iteration cost\" → report scoped to current agent loop\n- \"token breakdown\" → report with per-model detail\n- \"did we stay in budget\" → report with budget threshold comparison\n\n## Trigger Patterns Reference\n\n| Pattern | Example | Action |\n|---------|---------|--------|\n| Session cost | \"cost report\" | `aiwg cost-report` |\n| Current loop cost | \"how much has this session cost so far\" | `aiwg cost-report --session current` |\n| Named session | \"cost for the greenfield run\" | `aiwg cost-report --session greenfield` |\n| Model breakdown | \"show costs by model\" | `aiwg cost-report --by-model` |\n| Budget check | \"are we over budget\" | `aiwg cost-report --budget \u003CN>` |\n| Fleet spend | \"show fleet spend\" | `aiwg cost-report --fleet` |\n\n## Behavior\n\nWhen triggered:\n\n### Fleet mode\n\nFor `--fleet`, run the native CLI handler. It reads `~\u002F.config\u002Faiwg\u002Ffleet.yaml`, resolves each `key_ref` only from `~\u002F.config\u002Faiwg\u002Fkeys\u002F` or `AIWG_OPENROUTER_KEY_*`, and reports `bot | machine | spend MTD | cap | % used | top-3 expensive sessions`.\n\nFleet manifests contain references only. Never read a credential from a project manifest, print a credential, or copy one into an artifact. AIWG observes and correlates spend; OpenRouter enforces all limits and caps. Session\u002Fmodel correlation is optional and uses locally recorded `bot=`, `session=`, and `generation_id=` tags in `.aiwg\u002Factivity.log`.\n\n```bash\naiwg cost-report --fleet\naiwg cost-report --fleet --json\naiwg cost-report --key \u003Ckey_ref> --monthly-cap 10\n```\n\nFor setup and security details, see `@$AIWG_ROOT\u002Fdocs\u002Fguides\u002Fopenrouter-fleet-costs.md`.\n\n### Session mode\n\n1. **Determine scope**:\n   - Default: most recent completed session\n   - `--session current`: running session (live data)\n   - `--session \u003Cname>`: named session from history\n\n2. **Read cost tracking data**:\n   - Primary source: `.aiwg\u002Fralph\u002Fcost-tracking.json`\n   - Fallback: aggregate from `.aiwg\u002Fralph\u002Fsessions\u002F*\u002Fmetrics.json`\n\n3. **Compute the report**:\n   - Total tokens (input + output)\n   - Estimated cost using model pricing table\n   - Breakdown by workflow step and model\n   - Comparison to MetaGPT baseline (124 tokens\u002Fline, REF-013)\n\n4. **Run the command**:\n\n   ```bash\n   # Default report (most recent session)\n   aiwg cost-report\n\n   # Current running session\n   aiwg cost-report --session current\n\n   # JSON output (for scripting)\n   aiwg cost-report --json\n\n   # Filter to specific model\n   aiwg cost-report --model claude-sonnet-5\n\n   # Budget threshold check\n   aiwg cost-report --budget 5.00\n   ```\n\n## Report Format\n\n### Standard Output\n\n```\nCost Report — Session: sdlc-review-20260401-143022\nDuration: 4m 12s\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nToken Usage\n  Input tokens:   42,310\n  Output tokens:  18,940\n  Total tokens:   61,250\n\nEstimated Cost\n  claude-sonnet-4-5:  $0.18  (61,250 tokens)\n  Total:              $0.18\n\nEfficiency vs Benchmark\n  Tokens\u002Fline:    112  (MetaGPT baseline: 124)  [green]\n  vs baseline:    -9.7%  (better than benchmark)\n\nSteps\n  architecture-designer  →  18,200 tokens  $0.07\n  security-architect     →  14,600 tokens  $0.06\n  test-architect         →  13,100 tokens  $0.05\n  technical-writer       →  15,350 tokens  $0.06 (incl. synthesis)\n```\n\n### Budget Check Output\n\n```\nBudget: $5.00\nUsed:   $0.18  (3.6% of budget)\nStatus: Within budget\n```\n\n## Data Sources\n\n| Source | Contents |\n|--------|----------|\n| `.aiwg\u002Fralph\u002Fcost-tracking.json` | Aggregated session costs |\n| `.aiwg\u002Fralph\u002Fsessions\u002F*\u002Fmetrics.json` | Per-session detailed metrics |\n| `src\u002Fmetrics\u002Ftoken-counter.ts` | Token estimation logic (4 chars\u002Ftoken) |\n\n## Examples\n\n### Example 1: Quick session report\n\n**User**: \"How much did that cost?\"\n\n**Extraction**: Cost report for most recent session\n\n**Action**:\n```bash\naiwg cost-report\n```\n\n**Response**: Session report with token totals, estimated cost, and efficiency rating against the MetaGPT baseline.\n\n### Example 2: Budget check mid-session\n\n**User**: \"Are we over the $2 budget for this run?\"\n\n**Extraction**: Budget comparison for current session\n\n**Action**:\n```bash\naiwg cost-report --session current --budget 2.00\n```\n\n**Response**:\n```\nBudget: $2.00\nUsed:   $0.43  (21.5% of budget)\nStatus: Within budget\nProjected total (at current rate): $0.71\n```\n\n### Example 3: Model breakdown\n\n**User**: \"Show me costs broken down by model\"\n\n**Action**:\n```bash\naiwg cost-report --by-model\n```\n\n**Response**:\n```\nCost by Model\n  claude-sonnet-4-5:   $0.12  (38,400 tokens)\n  claude-haiku-3-5:    $0.02   (6,200 tokens)\n  Total:               $0.14  (44,600 tokens)\n```\n\n## Clarification Prompts\n\nIf the session is ambiguous:\n\n- \"Should I report on the current session or the most recent completed session?\"\n\n## References\n\n- @$AIWG_ROOT\u002Fsrc\u002Fcli\u002Fhandlers\u002Fsubcommands.ts — Cost report handler\n- @$AIWG_ROOT\u002Fsrc\u002Fmetrics\u002Ftoken-counter.ts — Token counting and MetaGPT baseline (REF-013)\n- @$AIWG_ROOT\u002Fdocs\u002Fcli-reference.md — CLI reference\n- @$AIWG_ROOT\u002Fdocs\u002Fguides\u002Fopenrouter-fleet-costs.md — OpenRouter fleet configuration and security contract\n","# cost-report\n\nYou generate a cost and token-spending report for the current or most recent workflow session. You read accumulated token usage data from `.aiwg\u002Fralph\u002Fcost-tracking.json` and present a breakdown by operation, model, and time period.\n\n## Triggers\n\nAlternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):\n\n- \"how much did that cost\" → report for most recent session\n- \"what did this iteration cost\" → report scoped to current agent loop\n- \"token breakdown\" → report with per-model detail\n- \"did we stay in budget\" → report with budget threshold comparison\n\n## Trigger Patterns Reference\n\n| Pattern | Example | Action |\n|---------|---------|--------|\n| Session cost | \"cost report\" | `aiwg cost-report` |\n| Current loop cost | \"how much has this session cost so far\" | `aiwg cost-report --session current` |\n| Named session | \"cost for the greenfield run\" | `aiwg cost-report --session greenfield` |\n| Model breakdown | \"show costs by model\" | `aiwg cost-report --by-model` |\n| Budget check | \"are we over budget\" | `aiwg cost-report --budget \u003CN>` |\n| Fleet spend | \"show fleet spend\" | `aiwg cost-report --fleet` |\n\n## Behavior\n\nWhen triggered:\n\n### Fleet mode\n\nFor `--fleet`, run the native CLI handler. It reads `~\u002F.config\u002Faiwg\u002Ffleet.yaml`, resolves each `key_ref` only from `~\u002F.config\u002Faiwg\u002Fkeys\u002F` or `AIWG_OPENROUTER_KEY_*`, and reports `bot | machine | spend MTD | cap | % used | top-3 expensive sessions`.\n\nFleet manifests contain references only. Never read a credential from a project manifest, print a credential, or copy one into an artifact. AIWG observes and correlates spend; OpenRouter enforces all limits and caps. Session\u002Fmodel correlation is optional and uses locally recorded `bot=`, `session=`, and `generation_id=` tags in `.aiwg\u002Factivity.log`.\n\n```bash\naiwg cost-report --fleet\naiwg cost-report --fleet --json\naiwg cost-report --key \u003Ckey_ref> --monthly-cap 10\n```\n\nFor setup and security details, see `@$AIWG_ROOT\u002Fdocs\u002Fguides\u002Fopenrouter-fleet-costs.md`.\n\n### Session mode\n\n1. **Determine scope**:\n   - Default: most recent completed session\n   - `--session current`: running session (live data)\n   - `--session \u003Cname>`: named session from history\n\n2. **Read cost tracking data**:\n   - Primary source: `.aiwg\u002Fralph\u002Fcost-tracking.json`\n   - Fallback: aggregate from `.aiwg\u002Fralph\u002Fsessions\u002F*\u002Fmetrics.json`\n\n3. **Compute the report**:\n   - Total tokens (input + output)\n   - Estimated cost using model pricing table\n   - Breakdown by workflow step and model\n   - Comparison to MetaGPT baseline (124 tokens\u002Fline, REF-013)\n\n4. **Run the command**:\n\n   ```bash\n   # Default report (most recent session)\n   aiwg cost-report\n\n   # Current running session\n   aiwg cost-report --session current\n\n   # JSON output (for scripting)\n   aiwg cost-report --json\n\n   # Filter to specific model\n   aiwg cost-report --model claude-sonnet-5\n\n   # Budget threshold check\n   aiwg cost-report --budget 5.00\n   ```\n\n## Report Format\n\n### Standard Output\n\n```\nCost Report — Session: sdlc-review-20260401-143022\nDuration: 4m 12s\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nToken Usage\n  Input tokens:   42,310\n  Output tokens:  18,940\n  Total tokens:   61,250\n\nEstimated Cost\n  claude-sonnet-4-5:  $0.18  (61,250 tokens)\n  Total:              $0.18\n\nEfficiency vs Benchmark\n  Tokens\u002Fline:    112  (MetaGPT baseline: 124)  [green]\n  vs baseline:    -9.7%  (better than benchmark)\n\nSteps\n  architecture-designer  →  18,200 tokens  $0.07\n  security-architect     →  14,600 tokens  $0.06\n  test-architect         →  13,100 tokens  $0.05\n  technical-writer       →  15,350 tokens  $0.06 (incl. synthesis)\n```\n\n### Budget Check Output\n\n```\nBudget: $5.00\nUsed:   $0.18  (3.6% of budget)\nStatus: Within budget\n```\n\n## Data Sources\n\n| Source | Contents |\n|--------|----------|\n| `.aiwg\u002Fralph\u002Fcost-tracking.json` | Aggregated session costs |\n| `.aiwg\u002Fralph\u002Fsessions\u002F*\u002Fmetrics.json` | Per-session detailed metrics |\n| `src\u002Fmetrics\u002Ftoken-counter.ts` | Token estimation logic (4 chars\u002Ftoken) |\n\n## Examples\n\n### Example 1: Quick session report\n\n**User**: \"How much did that cost?\"\n\n**Extraction**: Cost report for most recent session\n\n**Action**:\n```bash\naiwg cost-report\n```\n\n**Response**: Session report with token totals, estimated cost, and efficiency rating against the MetaGPT baseline.\n\n### Example 2: Budget check mid-session\n\n**User**: \"Are we over the $2 budget for this run?\"\n\n**Extraction**: Budget comparison for current session\n\n**Action**:\n```bash\naiwg cost-report --session current --budget 2.00\n```\n\n**Response**:\n```\nBudget: $2.00\nUsed:   $0.43  (21.5% of budget)\nStatus: Within budget\nProjected total (at current rate): $0.71\n```\n\n### Example 3: Model breakdown\n\n**User**: \"Show me costs broken down by model\"\n\n**Action**:\n```bash\naiwg cost-report --by-model\n```\n\n**Response**:\n```\nCost by Model\n  claude-sonnet-4-5:   $0.12  (38,400 tokens)\n  claude-haiku-3-5:    $0.02   (6,200 tokens)\n  Total:               $0.14  (44,600 tokens)\n```\n\n## Clarification Prompts\n\nIf the session is ambiguous:\n\n- \"Should I report on the current session or the most recent completed session?\"\n\n## References\n\n- @$AIWG_ROOT\u002Fsrc\u002Fcli\u002Fhandlers\u002Fsubcommands.ts — Cost report handler\n- @$AIWG_ROOT\u002Fsrc\u002Fmetrics\u002Ftoken-counter.ts — Token counting and MetaGPT baseline (REF-013)\n- @$AIWG_ROOT\u002Fdocs\u002Fcli-reference.md — CLI reference\n- @$AIWG_ROOT\u002Fdocs\u002Fguides\u002Fopenrouter-fleet-costs.md — OpenRouter fleet configuration and security contract\n",{"name":5,"namespace":46,"platforms":47,"description":7},"aiwg",[48],"all","main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fcost-report",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":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add jmagly\u002Faiwg --skill cost-report",{"tool":65,"command":66},"bunx","bunx skills add jmagly\u002Faiwg --skill cost-report",{"tool":68,"command":69},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill cost-report","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fcost-report\u002FSKILL.md",true,[],[74,82,87,114,134,139],{"skillNo":75,"name":76,"nameZh":17,"description":77,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"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":83,"name":76,"nameZh":17,"description":77,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":81},"01M78KSEZS9ZNNFESY9ANW22S0","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":17,"description":90,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":41},"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",[],[94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],"hardening","host","host hardening","verification","secrets","read","request","remediation","recommendations","audit","plan","port","bind","Bash","access","only","retention","re","never","firewall",{"skillNo":115,"name":116,"nameZh":17,"description":117,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":41},"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",[],[121,122,123,124,125,126,99,127,105,112,107,128,95,129,109,130,131,113,132,133],"analysis","exposure analysis","collection","reconstruction","operator","write","credentials","unknown","internet","local","scope","ports","ufw",{"skillNo":135,"name":89,"nameZh":17,"description":90,"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":41},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[94,95,96,111,112,113,106,110,102,98,99,100,101,103,104,105,97,107,108,109],{"skillNo":140,"name":116,"nameZh":17,"description":117,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":41},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[121,122,133,132,125,131,130,109,124,126,99,127,105,123,107,128,95,113,112,129]]