[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M737YRMW331V8ZYGZGVD1MZ1":3,"skill-same:01M737YRMW331V8ZYGZGVD1MZ1":51},{"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":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M737YRMW331V8ZYGZGVD1MZ1","token-roi",null,"Token budget analytics and ROI scoring for AI agent actions. Track token cost per fix, detect wasteful loops, auto-route to fast tier when burn rate is too high. Integrates with token-budget-guard.sh hook. Triggered by \u002Fcost-report, \"how much did that cost\", \"token usage\", \"am I wasting tokens\".","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftoken-roi\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: token-roi\ndescription: Token budget analytics and ROI scoring for AI agent actions. Track token cost per fix, detect wasteful loops, auto-route to fast tier when burn rate is too high. Integrates with token-budget-guard.sh hook. Triggered by \u002Fcost-report, \"how much did that cost\", \"token usage\", \"am I wasting tokens\".\norigin: yamtam-original — Financial Guardrails layer\nlicense: MIT\nversion: 1.0.0\ncompatibility: Claude Code, Anthropic API\n---\n\n# token-roi\n\n## When to Use\n\n- After a long session to review token spend vs value delivered\n- When `autonomous-patching-loop` has been running for multiple attempts\n- Before deciding whether to continue a costly repair or escalate to human\n- Triggered by: `\u002Fcost-report`, \"how much did that cost\", \"token usage\", \"token budget\", \"am I wasting tokens\", \"ROI\", \"cost per fix\"\n\n## Do NOT use for\n\n- Real-time per-token billing (use Anthropic console for exact billing)\n- Replacing a proper cost alert system in production\n- See `prompt-caching-strategy` for reducing token cost via cache_control\n\n---\n\n## Cost Tiers (Anthropic Sonnet 4.x pricing reference)\n\n```\nTier       Model               Input $\u002F1M    Output $\u002F1M   Use when\n──────────────────────────────────────────────────────────────────────\nPower      claude-opus-4-7     $15.00        $75.00        Architecture, deep reasoning\nBalanced   claude-sonnet-4-6   $3.00         $15.00        Default for most tasks\nFast       claude-haiku-4-5    $0.80         $4.00         Simple fixes, boilerplate\n──────────────────────────────────────────────────────────────────────\nCached     any + cache_control 90% discount  standard      Static context blocks\n```\n\n---\n\n## \u002Fcost-report Command\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# Generate token ROI report for current session\nBUDGET_FILE=\"core\u002Fmemory\u002FL2_session\u002Ftoken-budget.json\"\n\nif [[ ! -f \"$BUDGET_FILE\" ]]; then\n  echo \"No token budget data for this session.\"\n  exit 0\nfi\n\npython3 - \u003C\u003CPYEOF\nimport json\n\nwith open(\"$BUDGET_FILE\") as f:\n    d = json.load(f)\n\ntotal = d.get('total_tokens_used', 0)\nactions = d.get('actions', [])\nloops = d.get('loop_attempts', {})\nfast_triggered = d.get('fast_tier_triggered', False)\n\n# Cost estimate (Sonnet 4.6 balanced tier)\ncost_usd = (total \u002F 1_000_000) * 9  # avg input+output blended\n\nprint(\"=\" * 50)\nprint(\" YAMTAM Token ROI Report\")\nprint(\"=\" * 50)\nprint(f\" Session start : {d.get('session_start', 'unknown')}\")\nprint(f\" Total tokens  : {total:,}\")\nprint(f\" Est. cost     : \\${cost_usd:.4f} USD (Sonnet 4.6 blended)\")\nprint(f\" Fast tier     : {'TRIGGERED' if fast_triggered else 'not triggered'}\")\nprint(\"\")\nprint(\" Loop attempts by tool:\")\nfor tool, count in sorted(loops.items(), key=lambda x: -x[1]):\n    flag = \" ⚠ LOOP\" if count >= 3 else \"\"\n    print(f\"   {tool:\u003C30} {count} calls{flag}\")\nprint(\"\")\n\n# ROI assessment\nif cost_usd > 0.50:\n    print(\" ROI Assessment: HIGH COST — review if value delivered matches spend\")\nelif fast_triggered:\n    print(\" ROI Assessment: LOOP DETECTED — strategy switch recommended\")\nelse:\n    print(\" ROI Assessment: Within normal budget\")\nprint(\"=\" * 50)\nPYEOF\n```\n\n---\n\n## Fast-Tier Auto-Routing\n\nWhen `token-budget-guard.sh` triggers fast tier, agents MUST:\n\n```\n1. STOP current loop immediately\n2. Assess: is this a simple fix that Haiku can handle?\n   YES → switch model to claude-haiku-4-5, retry with minimal prompt\n   NO  → escalate to human with cost summary\n\n3. Fast-tier prompt template (minimal tokens):\n   \"Fix: [one-line error description]\n    File: [path]:[line]\n    Error: [exact error message]\n    Fix in ≤ 20 lines.\"\n```\n\n---\n\n## Token ROI Scoring Formula\n\n```python\ndef roi_score(tokens_used: int, bugs_fixed: int, tests_passed: int) -> float:\n    \"\"\"\n    Score 0.0–10.0. Higher = better ROI.\n    Penalize high token use, reward concrete outcomes.\n    \"\"\"\n    if tokens_used == 0:\n        return 0.0\n\n    # Value: each fixed bug = 10k tokens of \"worth\", each test = 2k tokens\n    value = (bugs_fixed * 10_000) + (tests_passed * 2_000)\n    efficiency = value \u002F tokens_used\n\n    # Normalize to 0–10 scale (efficiency 1.0 = score 5)\n    score = min(efficiency * 5, 10.0)\n    return round(score, 1)\n\n# Examples:\n# roi_score(5000, 1, 3)  → 8.0  ← good (1 bug fixed, 3 tests added, low tokens)\n# roi_score(50000, 0, 0) → 0.0  ← bad (50k tokens, nothing fixed)\n# roi_score(20000, 2, 5) → 5.5  ← acceptable\n```\n\n---\n\n## Session Budget Defaults\n\n```bash\n# Override via environment variables\nexport YAMTAM_MAX_LOOP_TOKENS=50000   # ~$0.15 at Sonnet — warn threshold\nexport YAMTAM_MAX_FIX_ATTEMPTS=5      # tool call loop limit before fast-tier\nexport YAMTAM_TOKEN_BUDGET=core\u002Fmemory\u002FL2_session\u002Ftoken-budget.json\n```\n\n---\n\n## Integration with autonomous-patching-loop\n\n```\nautonomous-patching-loop attempt 1  →  token-budget-guard checks loop count\n                      attempt 2  →  guard checks (count=2)\n                      attempt 3  →  guard WARNS (count=3)\n                      attempt 4  →  guard checks (count=4)\n                      attempt 5  →  guard TRIGGERS FAST TIER\n                                    loop stops, escalates or switches model\n```\n\n---\n\n## Anti-Fake-Pass Checklist\n\n- [ ] Budget file exists at `core\u002Fmemory\u002FL2_session\u002Ftoken-budget.json` before session ends\n- [ ] Loop count tracked per tool name — not total session calls\n- [ ] Fast tier triggered when loop count ≥ MAX_ATTEMPTS (default: 5)\n- [ ] Cost estimate calculated and shown in \u002Fcost-report\n- [ ] ROI score computed when both token count and outcomes are known\n- [ ] Fast-tier mode uses shorter prompt template (not full context dump)\n- [ ] Budget state written to L2 — expires at session end, not promoted to L1 unless anomaly\n","# token-roi\n\n## When to Use\n\n- After a long session to review token spend vs value delivered\n- When `autonomous-patching-loop` has been running for multiple attempts\n- Before deciding whether to continue a costly repair or escalate to human\n- Triggered by: `\u002Fcost-report`, \"how much did that cost\", \"token usage\", \"token budget\", \"am I wasting tokens\", \"ROI\", \"cost per fix\"\n\n## Do NOT use for\n\n- Real-time per-token billing (use Anthropic console for exact billing)\n- Replacing a proper cost alert system in production\n- See `prompt-caching-strategy` for reducing token cost via cache_control\n\n---\n\n## Cost Tiers (Anthropic Sonnet 4.x pricing reference)\n\n```\nTier       Model               Input $\u002F1M    Output $\u002F1M   Use when\n──────────────────────────────────────────────────────────────────────\nPower      claude-opus-4-7     $15.00        $75.00        Architecture, deep reasoning\nBalanced   claude-sonnet-4-6   $3.00         $15.00        Default for most tasks\nFast       claude-haiku-4-5    $0.80         $4.00         Simple fixes, boilerplate\n──────────────────────────────────────────────────────────────────────\nCached     any + cache_control 90% discount  standard      Static context blocks\n```\n\n---\n\n## \u002Fcost-report Command\n\n```bash\n#!\u002Fusr\u002Fbin\u002Fenv bash\n# Generate token ROI report for current session\nBUDGET_FILE=\"core\u002Fmemory\u002FL2_session\u002Ftoken-budget.json\"\n\nif [[ ! -f \"$BUDGET_FILE\" ]]; then\n  echo \"No token budget data for this session.\"\n  exit 0\nfi\n\npython3 - \u003C\u003CPYEOF\nimport json\n\nwith open(\"$BUDGET_FILE\") as f:\n    d = json.load(f)\n\ntotal = d.get('total_tokens_used', 0)\nactions = d.get('actions', [])\nloops = d.get('loop_attempts', {})\nfast_triggered = d.get('fast_tier_triggered', False)\n\n# Cost estimate (Sonnet 4.6 balanced tier)\ncost_usd = (total \u002F 1_000_000) * 9  # avg input+output blended\n\nprint(\"=\" * 50)\nprint(\" YAMTAM Token ROI Report\")\nprint(\"=\" * 50)\nprint(f\" Session start : {d.get('session_start', 'unknown')}\")\nprint(f\" Total tokens  : {total:,}\")\nprint(f\" Est. cost     : \\${cost_usd:.4f} USD (Sonnet 4.6 blended)\")\nprint(f\" Fast tier     : {'TRIGGERED' if fast_triggered else 'not triggered'}\")\nprint(\"\")\nprint(\" Loop attempts by tool:\")\nfor tool, count in sorted(loops.items(), key=lambda x: -x[1]):\n    flag = \" ⚠ LOOP\" if count >= 3 else \"\"\n    print(f\"   {tool:\u003C30} {count} calls{flag}\")\nprint(\"\")\n\n# ROI assessment\nif cost_usd > 0.50:\n    print(\" ROI Assessment: HIGH COST — review if value delivered matches spend\")\nelif fast_triggered:\n    print(\" ROI Assessment: LOOP DETECTED — strategy switch recommended\")\nelse:\n    print(\" ROI Assessment: Within normal budget\")\nprint(\"=\" * 50)\nPYEOF\n```\n\n---\n\n## Fast-Tier Auto-Routing\n\nWhen `token-budget-guard.sh` triggers fast tier, agents MUST:\n\n```\n1. STOP current loop immediately\n2. Assess: is this a simple fix that Haiku can handle?\n   YES → switch model to claude-haiku-4-5, retry with minimal prompt\n   NO  → escalate to human with cost summary\n\n3. Fast-tier prompt template (minimal tokens):\n   \"Fix: [one-line error description]\n    File: [path]:[line]\n    Error: [exact error message]\n    Fix in ≤ 20 lines.\"\n```\n\n---\n\n## Token ROI Scoring Formula\n\n```python\ndef roi_score(tokens_used: int, bugs_fixed: int, tests_passed: int) -> float:\n    \"\"\"\n    Score 0.0–10.0. Higher = better ROI.\n    Penalize high token use, reward concrete outcomes.\n    \"\"\"\n    if tokens_used == 0:\n        return 0.0\n\n    # Value: each fixed bug = 10k tokens of \"worth\", each test = 2k tokens\n    value = (bugs_fixed * 10_000) + (tests_passed * 2_000)\n    efficiency = value \u002F tokens_used\n\n    # Normalize to 0–10 scale (efficiency 1.0 = score 5)\n    score = min(efficiency * 5, 10.0)\n    return round(score, 1)\n\n# Examples:\n# roi_score(5000, 1, 3)  → 8.0  ← good (1 bug fixed, 3 tests added, low tokens)\n# roi_score(50000, 0, 0) → 0.0  ← bad (50k tokens, nothing fixed)\n# roi_score(20000, 2, 5) → 5.5  ← acceptable\n```\n\n---\n\n## Session Budget Defaults\n\n```bash\n# Override via environment variables\nexport YAMTAM_MAX_LOOP_TOKENS=50000   # ~$0.15 at Sonnet — warn threshold\nexport YAMTAM_MAX_FIX_ATTEMPTS=5      # tool call loop limit before fast-tier\nexport YAMTAM_TOKEN_BUDGET=core\u002Fmemory\u002FL2_session\u002Ftoken-budget.json\n```\n\n---\n\n## Integration with autonomous-patching-loop\n\n```\nautonomous-patching-loop attempt 1  →  token-budget-guard checks loop count\n                      attempt 2  →  guard checks (count=2)\n                      attempt 3  →  guard WARNS (count=3)\n                      attempt 4  →  guard checks (count=4)\n                      attempt 5  →  guard TRIGGERS FAST TIER\n                                    loop stops, escalates or switches model\n```\n\n---\n\n## Anti-Fake-Pass Checklist\n\n- [ ] Budget file exists at `core\u002Fmemory\u002FL2_session\u002Ftoken-budget.json` before session ends\n- [ ] Loop count tracked per tool name — not total session calls\n- [ ] Fast tier triggered when loop count ≥ MAX_ATTEMPTS (default: 5)\n- [ ] Cost estimate calculated and shown in \u002Fcost-report\n- [ ] ROI score computed when both token count and outcomes are known\n- [ ] Fast-tier mode uses shorter prompt template (not full context dump)\n- [ ] Budget state written to L2 — expires at session end, not promoted to L1 unless anomaly\n",{"name":5,"origin":24,"license":15,"version":25,"description":7,"compatibility":26},"yamtam-original — Financial Guardrails layer","1.0.0","Claude Code, Anthropic API","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa",".claude\u002Fskills\u002Ftoken-roi",2,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-14 13:24:09",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill token-roi",{"tool":43,"command":44},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill token-roi",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill token-roi","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ftoken-roi\u002FSKILL.md",true,[],[52,59,67,75,83,91],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":71,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":87,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]