[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CAVSZN90Z5KNWMMQCGQFYS":3,"skill-same:01M6CAVSZN90Z5KNWMMQCGQFYS":89},{"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":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M6CAVSZN90Z5KNWMMQCGQFYS","cost-history","工作流成本趋势分析","Show cost trends across multiple workflow sessions, surfacing expensive operations, spending patterns, and outliers","展示多个工作流会话的成本趋势，凸显高成本操作、支出模式和异常值","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\u002Futils\u002Fskills\u002Fcost-history\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5CX980XNXCJKQF70BY","数据分析师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRYS21JX3JFDVCQ5GG4TFK","AI 平台资源管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41],"history","cost history","cost","workflow","sessions","operations","show","patterns","across","trends","spending","2026-11-10 10:12:30",false,"---\nnamespace: aiwg\nname: cost-history\nplatforms: [all]\ndescription: Show cost trends across multiple workflow sessions, surfacing expensive operations, spending patterns, and outliers\n---\n\n# cost-history\n\nYou show cost trends across multiple workflow sessions. You read historical cost records from `.aiwg\u002Fralph\u002Fsessions\u002F` and surface patterns — which operations are expensive, how spending has changed over time, and which sessions were outliers.\n\nFor questions about what happened in historical conversations, use\n`session-explore`. When explaining a cost outlier, correlate the cost record with\ncatalog tool\u002Fsession evidence only through a reliable identity mapping. Catalog\ntool-call\u002Fresult counts and timeline duration are not token usage or billed spend;\nreport an unavailable correlation rather than joining by a similar title.\n## Triggers\n\nAlternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):\n\n- \"what have I spent overall\" → full history summary\n- \"are costs going up or down\" → trend analysis\n- \"most expensive sessions\" → sorted history by cost\n- \"cost this week\" \u002F \"cost this month\" → time-windowed history\n\n## Trigger Patterns Reference\n\n| Pattern | Example | Action |\n|---------|---------|--------|\n| Full history | \"show cost history\" | `aiwg cost-history` |\n| Recent sessions | \"last 5 sessions\" | `aiwg cost-history --last 5` |\n| Time window | \"costs this week\" | `aiwg cost-history --since 7d` |\n| Trend summary | \"are my costs trending up\" | `aiwg cost-history --trend` |\n| Sorted by cost | \"most expensive sessions\" | `aiwg cost-history --sort cost` |\n\n## Behavior\n\nWhen triggered:\n\n1. **Determine scope**:\n   - Default: all recorded sessions, newest first\n   - `--last N`: most recent N sessions\n   - `--since \u003Cduration>`: sessions within the time window (e.g., `7d`, `30d`, `2026-03-01`)\n\n2. **Read session records**:\n   - `.aiwg\u002Fralph\u002Fsessions\u002F*\u002Fmetrics.json` — per-session cost records\n   - `.aiwg\u002Fralph\u002Fcost-tracking.json` — aggregated history index\n\n3. **Compute trend data**:\n   - Session-over-session delta\n   - Rolling 7-session average\n   - Outlier detection (sessions > 2x average)\n\n4. **Run the command**:\n\n   ```bash\n   # All sessions, newest first\n   aiwg cost-history\n\n   # Most recent 10 sessions\n   aiwg cost-history --last 10\n\n   # Sessions in the past 30 days\n   aiwg cost-history --since 30d\n\n   # Trend analysis\n   aiwg cost-history --trend\n\n   # Sorted by cost descending\n   aiwg cost-history --sort cost\n\n   # JSON output\n   aiwg cost-history --json\n   ```\n\n## Report Format\n\n### Standard History Output\n\n```\nCost History (12 sessions)\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nDate        Session                     Tokens    Cost    Status\n──────────  ──────────────────────────  ────────  ──────  ──────\n2026-04-01  sdlc-review-143022          61,250    $0.18   green\n2026-03-31  greenfield-092211           94,800    $0.28   green\n2026-03-30  security-review-174503     118,400    $0.36   yellow\n2026-03-28  api-development-110022      52,100    $0.15   green\n2026-03-26  full-stack-iteration-3     201,700    $0.61   red *outlier\n...\n\nTotals (12 sessions)\n  Total tokens: 842,100\n  Total cost:   $2.54\n  Avg\u002Fsession:  $0.21\n\n7-session rolling average: $0.23\nTrend: stable (±8% over last 7 sessions)\n```\n\n### Trend Output (`--trend`)\n\n```\nCost Trend — Last 7 Sessions\n  Session 6 (oldest):  $0.28\n  Session 5:           $0.22\n  Session 4:           $0.36\n  Session 3:           $0.15\n  Session 2:           $0.61  ← outlier (full-stack-iteration-3)\n  Session 1:           $0.18\n  Current avg:         $0.23\n\nDirection: stable\nOutliers:  1 (full-stack-iteration-3 — 2.6x average)\n```\n\n## Efficiency Thresholds\n\nSessions are color-coded by tokens\u002Fline ratio against the MetaGPT 124 tokens\u002Fline benchmark (REF-013):\n\n| Status | Tokens\u002FLine | Meaning |\n|--------|-------------|---------|\n| green | ≤ 124 | At or below MetaGPT benchmark |\n| yellow | 125–150 | Above benchmark, acceptable |\n| red | > 150 | Significantly above benchmark — review recommended |\n\n## Examples\n\n### Example 1: Quick history overview\n\n**User**: \"Show cost history\"\n\n**Action**:\n```bash\naiwg cost-history\n```\n\n**Response**: Full session history table with totals, rolling average, and trend direction.\n\n### Example 2: Recent session costs\n\n**User**: \"What did the last 3 sessions cost?\"\n\n**Extraction**: `--last 3`\n\n**Action**:\n```bash\naiwg cost-history --last 3\n```\n\n**Response**:\n```\nCost History (last 3 sessions)\n\nDate        Session                  Tokens   Cost\n──────────  ───────────────────────  ───────  ────\n2026-04-01  sdlc-review-143022       61,250   $0.18\n2026-03-31  greenfield-092211        94,800   $0.28\n2026-03-30  security-review-174503  118,400   $0.36\n\nTotal: $0.82 over 3 sessions  (avg: $0.27)\n```\n\n### Example 3: Identifying expensive outliers\n\n**User**: \"Which sessions were most expensive?\"\n\n**Action**:\n```bash\naiwg cost-history --sort cost\n```\n\n**Response**: History table sorted by cost descending, with outlier flag on sessions more than 2x the rolling average.\n\n## Clarification Prompts\n\nIf a time window is ambiguous:\n\n- \"Should I show all-time history or a specific window? (e.g., last 7 days, last 30 days)\"\n\n## References\n\n- @$AIWG_ROOT\u002Fsrc\u002Fcli\u002Fhandlers\u002Fsubcommands.ts — Cost history 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","# cost-history\n\nYou show cost trends across multiple workflow sessions. You read historical cost records from `.aiwg\u002Fralph\u002Fsessions\u002F` and surface patterns — which operations are expensive, how spending has changed over time, and which sessions were outliers.\n\nFor questions about what happened in historical conversations, use\n`session-explore`. When explaining a cost outlier, correlate the cost record with\ncatalog tool\u002Fsession evidence only through a reliable identity mapping. Catalog\ntool-call\u002Fresult counts and timeline duration are not token usage or billed spend;\nreport an unavailable correlation rather than joining by a similar title.\n## Triggers\n\nAlternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):\n\n- \"what have I spent overall\" → full history summary\n- \"are costs going up or down\" → trend analysis\n- \"most expensive sessions\" → sorted history by cost\n- \"cost this week\" \u002F \"cost this month\" → time-windowed history\n\n## Trigger Patterns Reference\n\n| Pattern | Example | Action |\n|---------|---------|--------|\n| Full history | \"show cost history\" | `aiwg cost-history` |\n| Recent sessions | \"last 5 sessions\" | `aiwg cost-history --last 5` |\n| Time window | \"costs this week\" | `aiwg cost-history --since 7d` |\n| Trend summary | \"are my costs trending up\" | `aiwg cost-history --trend` |\n| Sorted by cost | \"most expensive sessions\" | `aiwg cost-history --sort cost` |\n\n## Behavior\n\nWhen triggered:\n\n1. **Determine scope**:\n   - Default: all recorded sessions, newest first\n   - `--last N`: most recent N sessions\n   - `--since \u003Cduration>`: sessions within the time window (e.g., `7d`, `30d`, `2026-03-01`)\n\n2. **Read session records**:\n   - `.aiwg\u002Fralph\u002Fsessions\u002F*\u002Fmetrics.json` — per-session cost records\n   - `.aiwg\u002Fralph\u002Fcost-tracking.json` — aggregated history index\n\n3. **Compute trend data**:\n   - Session-over-session delta\n   - Rolling 7-session average\n   - Outlier detection (sessions > 2x average)\n\n4. **Run the command**:\n\n   ```bash\n   # All sessions, newest first\n   aiwg cost-history\n\n   # Most recent 10 sessions\n   aiwg cost-history --last 10\n\n   # Sessions in the past 30 days\n   aiwg cost-history --since 30d\n\n   # Trend analysis\n   aiwg cost-history --trend\n\n   # Sorted by cost descending\n   aiwg cost-history --sort cost\n\n   # JSON output\n   aiwg cost-history --json\n   ```\n\n## Report Format\n\n### Standard History Output\n\n```\nCost History (12 sessions)\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nDate        Session                     Tokens    Cost    Status\n──────────  ──────────────────────────  ────────  ──────  ──────\n2026-04-01  sdlc-review-143022          61,250    $0.18   green\n2026-03-31  greenfield-092211           94,800    $0.28   green\n2026-03-30  security-review-174503     118,400    $0.36   yellow\n2026-03-28  api-development-110022      52,100    $0.15   green\n2026-03-26  full-stack-iteration-3     201,700    $0.61   red *outlier\n...\n\nTotals (12 sessions)\n  Total tokens: 842,100\n  Total cost:   $2.54\n  Avg\u002Fsession:  $0.21\n\n7-session rolling average: $0.23\nTrend: stable (±8% over last 7 sessions)\n```\n\n### Trend Output (`--trend`)\n\n```\nCost Trend — Last 7 Sessions\n  Session 6 (oldest):  $0.28\n  Session 5:           $0.22\n  Session 4:           $0.36\n  Session 3:           $0.15\n  Session 2:           $0.61  ← outlier (full-stack-iteration-3)\n  Session 1:           $0.18\n  Current avg:         $0.23\n\nDirection: stable\nOutliers:  1 (full-stack-iteration-3 — 2.6x average)\n```\n\n## Efficiency Thresholds\n\nSessions are color-coded by tokens\u002Fline ratio against the MetaGPT 124 tokens\u002Fline benchmark (REF-013):\n\n| Status | Tokens\u002FLine | Meaning |\n|--------|-------------|---------|\n| green | ≤ 124 | At or below MetaGPT benchmark |\n| yellow | 125–150 | Above benchmark, acceptable |\n| red | > 150 | Significantly above benchmark — review recommended |\n\n## Examples\n\n### Example 1: Quick history overview\n\n**User**: \"Show cost history\"\n\n**Action**:\n```bash\naiwg cost-history\n```\n\n**Response**: Full session history table with totals, rolling average, and trend direction.\n\n### Example 2: Recent session costs\n\n**User**: \"What did the last 3 sessions cost?\"\n\n**Extraction**: `--last 3`\n\n**Action**:\n```bash\naiwg cost-history --last 3\n```\n\n**Response**:\n```\nCost History (last 3 sessions)\n\nDate        Session                  Tokens   Cost\n──────────  ───────────────────────  ───────  ────\n2026-04-01  sdlc-review-143022       61,250   $0.18\n2026-03-31  greenfield-092211        94,800   $0.28\n2026-03-30  security-review-174503  118,400   $0.36\n\nTotal: $0.82 over 3 sessions  (avg: $0.27)\n```\n\n### Example 3: Identifying expensive outliers\n\n**User**: \"Which sessions were most expensive?\"\n\n**Action**:\n```bash\naiwg cost-history --sort cost\n```\n\n**Response**: History table sorted by cost descending, with outlier flag on sessions more than 2x the rolling average.\n\n## Clarification Prompts\n\nIf a time window is ambiguous:\n\n- \"Should I show all-time history or a specific window? (e.g., last 7 days, last 30 days)\"\n\n## References\n\n- @$AIWG_ROOT\u002Fsrc\u002Fcli\u002Fhandlers\u002Fsubcommands.ts — Cost history 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",{"name":5,"namespace":47,"platforms":48,"description":7},"aiwg",[49],"all","main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Fplugins\u002Futils\u002Fskills\u002Fcost-history",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":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add jmagly\u002Faiwg --skill cost-history",{"tool":66,"command":67},"bunx","bunx skills add jmagly\u002Faiwg --skill cost-history",{"tool":69,"command":70},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill cost-history","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Futils\u002Fskills\u002Fcost-history\u002FSKILL.md",true,[74,79,85],{"path":75,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"LICENSE","许可证",10770,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-custom-domains\u002FLICENSE",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"SOURCE.md","REFERENCE","参考文档",332,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-custom-domains\u002FSOURCE.md",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"TRUST.auto.yaml",2197,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-custom-domains\u002FTRUST.auto.yaml",[90,98,103,130,150,155],{"skillNo":91,"name":92,"nameZh":17,"description":93,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":97},"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":99,"name":92,"nameZh":17,"description":93,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":97},"01M78KSEZS9ZNNFESY9ANW22S0","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":17,"description":106,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":42},"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",[],[110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129],"hardening","host","host hardening","verification","secrets","read","request","remediation","recommendations","audit","plan","port","bind","Bash","access","only","retention","re","never","firewall",{"skillNo":131,"name":132,"nameZh":17,"description":133,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":42},"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",[],[137,138,139,140,141,142,115,143,121,128,123,144,111,145,125,146,147,129,148,149],"analysis","exposure analysis","collection","reconstruction","operator","write","credentials","unknown","internet","local","scope","ports","ufw",{"skillNo":151,"name":105,"nameZh":17,"description":106,"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":42},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[110,111,112,127,128,129,122,126,118,114,115,116,117,119,120,121,113,123,124,125],{"skillNo":156,"name":132,"nameZh":17,"description":133,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":42},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[137,138,149,148,141,147,146,125,140,142,115,143,121,139,123,144,111,129,128,145]]