[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78SH53FG2KRC9ZEDQ9MCVFG":3,"skill-same:01M78SH53FG2KRC9ZEDQ9MCVFG":76},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":13,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":45,"install":46,"resources":59},"01M78SH53FG2KRC9ZEDQ9MCVFG","tokenguard",null,"API cost guardian for AI agents. Track spending, enforce limits, prevent runaway costs. Essential for any agent making paid API calls.","meghal86\u002Fstacksignal","meghal86","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F37388715?v=4","01M6CS2EW8SK89GH52R2ZEN8QQ","01M728J5CGY456EETEFG6HJBTM",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftokenguard\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tokenguard\nversion: 1.0.0\ndescription: API cost guardian for AI agents. Track spending, enforce limits, prevent runaway costs. Essential for any agent making paid API calls.\nauthor: PaxSwarm\nlicense: MIT\nhomepage: https:\u002F\u002Fclawhub.com\u002Fskills\u002Ftokenguard\nkeywords: [cost, budget, spending, limit, api, tokens, guard, monitor]\ntriggers: [\"cost limit\", \"spending limit\", \"budget\", \"how much spent\", \"tokenguard\", \"api cost\"]\n---\n\n# 🛡️ TokenGuard — API Cost Guardian\n\n**Protect your wallet from runaway API costs.**\n\nTokenGuard tracks your agent's spending per session, enforces configurable limits, and alerts you before you blow your budget.\n\n## Why TokenGuard?\n\nAI agents can rack up serious API costs fast. One runaway loop = hundreds of dollars. TokenGuard gives you:\n\n- **Session-based tracking** — Costs reset daily (or on demand)\n- **Hard limits** — Actions blocked when budget exceeded\n- **Pre-flight checks** — Verify budget BEFORE expensive calls\n- **Override controls** — Extend limits or bypass when needed\n- **Full audit trail** — Every cost logged with timestamps\n\n## Installation\n\n```bash\nclawhub install tokenguard\n```\n\nOr manually:\n```bash\nmkdir -p ~\u002F.openclaw\u002Fworkspace\u002Fskills\u002Ftokenguard\n# Copy SKILL.md and scripts\u002Ftokenguard.py\nchmod +x scripts\u002Ftokenguard.py\n```\n\n## Quick Start\n\n```bash\n# Check current status\npython3 scripts\u002Ftokenguard.py status\n\n# Set a $20 limit\npython3 scripts\u002Ftokenguard.py set 20\n\n# Before an expensive call, check budget\npython3 scripts\u002Ftokenguard.py check 5.00\n\n# After the call, log actual cost\npython3 scripts\u002Ftokenguard.py log 4.23 \"Claude Sonnet - code review\"\n\n# View spending history\npython3 scripts\u002Ftokenguard.py history\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `status` | Show current limit, spent, remaining |\n| `set \u003Camount>` | Set spending limit (e.g., `set 50`) |\n| `check \u003Ccost>` | Check if estimated cost fits budget |\n| `log \u003Camount> [desc]` | Log a cost after API call |\n| `reset` | Clear session spending |\n| `history` | Show all logged entries |\n| `extend \u003Camount>` | Add to current limit |\n| `override` | One-time bypass for next check |\n| `export [--full]` | Export data as JSON |\n\n## Exit Codes\n\n- `0` — Success \u002F within budget\n- `1` — Budget exceeded (check command)\n- `2` — Limit exceeded after logging\n\nUse exit codes in scripts:\n```bash\nif python3 scripts\u002Ftokenguard.py check 10.00; then\n    # proceed with expensive operation\nelse\n    echo \"Over budget, skipping\"\nfi\n```\n\n## Budget Exceeded Alert\n\nWhen a check would exceed your limit:\n\n```\n🚫 BUDGET EXCEEDED\n╭──────────────────────────────────────────╮\n│  Current spent:  $    4.0000            │\n│  This action:    $   10.0000            │\n│  Would total:    $   14.0000            │\n│  Limit:          $   10.00              │\n│  Over by:        $    4.0000            │\n╰──────────────────────────────────────────╯\n\n💡 Options:\n   tokenguard extend 5    # Add to limit\n   tokenguard set \u003Camt>   # Set new limit\n   tokenguard reset       # Clear session\n   tokenguard override    # One-time bypass\n```\n\n## Integration Pattern\n\nFor agents using paid APIs:\n\n```python\nimport subprocess\nimport sys\n\ndef check_budget(estimated_cost: float) -> bool:\n    \"\"\"Check if action fits budget.\"\"\"\n    result = subprocess.run(\n        [\"python3\", \"scripts\u002Ftokenguard.py\", \"check\", str(estimated_cost)],\n        capture_output=True\n    )\n    return result.returncode == 0\n\ndef log_cost(amount: float, description: str):\n    \"\"\"Log actual cost after API call.\"\"\"\n    subprocess.run([\n        \"python3\", \"scripts\u002Ftokenguard.py\", \"log\",\n        str(amount), description\n    ])\n\n# Before expensive operation\nif not check_budget(5.00):\n    print(\"Budget exceeded, asking user...\")\n    sys.exit(1)\n\n# Make API call\nresponse = call_expensive_api()\n\n# Log actual cost\nlog_cost(4.23, \"GPT-4 code analysis\")\n```\n\n## Configuration\n\nEnvironment variables:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `TOKENGUARD_DIR` | `~\u002F.tokenguard` | Storage directory |\n| `TOKENGUARD_DEFAULT_LIMIT` | `20.0` | Default limit in USD |\n| `TOKENGUARD_WARNING_PCT` | `0.8` | Warning threshold (0-1) |\n\n## Cost Reference\n\nCommon API pricing (per 1M tokens):\n\n| Model | Input | Output |\n|-------|-------|--------|\n| Claude 3.5 Sonnet | $3 | $15 |\n| Claude 3 Haiku | $0.25 | $1.25 |\n| GPT-4o | $2.50 | $10 |\n| GPT-4o-mini | $0.15 | $0.60 |\n| GPT-4-turbo | $10 | $30 |\n\n**Rule of thumb:** 1000 tokens ≈ 750 words\n\n## Storage\n\nData stored in `~\u002F.tokenguard\u002F` (or `TOKENGUARD_DIR`):\n\n- `limit.json` — Current limit configuration\n- `session.json` — Today's spending + entries\n- `override.flag` — One-time bypass flag\n\n## Best Practices\n\n1. **Set realistic limits** — Start with $10-20 for development\n2. **Check before expensive calls** — Always `check` before big operations\n3. **Log everything** — Even small costs add up\n4. **Use extend, not reset** — Keep audit trail intact\n5. **Monitor warnings** — 80% threshold = time to evaluate\n\n## Changelog\n\n### v1.0.0\n- Initial release\n- Core commands: status, set, check, log, reset, history, extend, override\n- Environment variable configuration\n- JSON export for integrations\n- Daily auto-reset\n\n---\n\n*Built by [PaxSwarm](https:\u002F\u002Fmoltbook.com\u002Fagent\u002FPaxSwarm) — a murmuration-class swarm intelligence*\n","# 🛡️ TokenGuard — API Cost Guardian\n\n**Protect your wallet from runaway API costs.**\n\nTokenGuard tracks your agent's spending per session, enforces configurable limits, and alerts you before you blow your budget.\n\n## Why TokenGuard?\n\nAI agents can rack up serious API costs fast. One runaway loop = hundreds of dollars. TokenGuard gives you:\n\n- **Session-based tracking** — Costs reset daily (or on demand)\n- **Hard limits** — Actions blocked when budget exceeded\n- **Pre-flight checks** — Verify budget BEFORE expensive calls\n- **Override controls** — Extend limits or bypass when needed\n- **Full audit trail** — Every cost logged with timestamps\n\n## Installation\n\n```bash\nclawhub install tokenguard\n```\n\nOr manually:\n```bash\nmkdir -p ~\u002F.openclaw\u002Fworkspace\u002Fskills\u002Ftokenguard\n# Copy SKILL.md and scripts\u002Ftokenguard.py\nchmod +x scripts\u002Ftokenguard.py\n```\n\n## Quick Start\n\n```bash\n# Check current status\npython3 scripts\u002Ftokenguard.py status\n\n# Set a $20 limit\npython3 scripts\u002Ftokenguard.py set 20\n\n# Before an expensive call, check budget\npython3 scripts\u002Ftokenguard.py check 5.00\n\n# After the call, log actual cost\npython3 scripts\u002Ftokenguard.py log 4.23 \"Claude Sonnet - code review\"\n\n# View spending history\npython3 scripts\u002Ftokenguard.py history\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `status` | Show current limit, spent, remaining |\n| `set \u003Camount>` | Set spending limit (e.g., `set 50`) |\n| `check \u003Ccost>` | Check if estimated cost fits budget |\n| `log \u003Camount> [desc]` | Log a cost after API call |\n| `reset` | Clear session spending |\n| `history` | Show all logged entries |\n| `extend \u003Camount>` | Add to current limit |\n| `override` | One-time bypass for next check |\n| `export [--full]` | Export data as JSON |\n\n## Exit Codes\n\n- `0` — Success \u002F within budget\n- `1` — Budget exceeded (check command)\n- `2` — Limit exceeded after logging\n\nUse exit codes in scripts:\n```bash\nif python3 scripts\u002Ftokenguard.py check 10.00; then\n    # proceed with expensive operation\nelse\n    echo \"Over budget, skipping\"\nfi\n```\n\n## Budget Exceeded Alert\n\nWhen a check would exceed your limit:\n\n```\n🚫 BUDGET EXCEEDED\n╭──────────────────────────────────────────╮\n│  Current spent:  $    4.0000            │\n│  This action:    $   10.0000            │\n│  Would total:    $   14.0000            │\n│  Limit:          $   10.00              │\n│  Over by:        $    4.0000            │\n╰──────────────────────────────────────────╯\n\n💡 Options:\n   tokenguard extend 5    # Add to limit\n   tokenguard set \u003Camt>   # Set new limit\n   tokenguard reset       # Clear session\n   tokenguard override    # One-time bypass\n```\n\n## Integration Pattern\n\nFor agents using paid APIs:\n\n```python\nimport subprocess\nimport sys\n\ndef check_budget(estimated_cost: float) -> bool:\n    \"\"\"Check if action fits budget.\"\"\"\n    result = subprocess.run(\n        [\"python3\", \"scripts\u002Ftokenguard.py\", \"check\", str(estimated_cost)],\n        capture_output=True\n    )\n    return result.returncode == 0\n\ndef log_cost(amount: float, description: str):\n    \"\"\"Log actual cost after API call.\"\"\"\n    subprocess.run([\n        \"python3\", \"scripts\u002Ftokenguard.py\", \"log\",\n        str(amount), description\n    ])\n\n# Before expensive operation\nif not check_budget(5.00):\n    print(\"Budget exceeded, asking user...\")\n    sys.exit(1)\n\n# Make API call\nresponse = call_expensive_api()\n\n# Log actual cost\nlog_cost(4.23, \"GPT-4 code analysis\")\n```\n\n## Configuration\n\nEnvironment variables:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `TOKENGUARD_DIR` | `~\u002F.tokenguard` | Storage directory |\n| `TOKENGUARD_DEFAULT_LIMIT` | `20.0` | Default limit in USD |\n| `TOKENGUARD_WARNING_PCT` | `0.8` | Warning threshold (0-1) |\n\n## Cost Reference\n\nCommon API pricing (per 1M tokens):\n\n| Model | Input | Output |\n|-------|-------|--------|\n| Claude 3.5 Sonnet | $3 | $15 |\n| Claude 3 Haiku | $0.25 | $1.25 |\n| GPT-4o | $2.50 | $10 |\n| GPT-4o-mini | $0.15 | $0.60 |\n| GPT-4-turbo | $10 | $30 |\n\n**Rule of thumb:** 1000 tokens ≈ 750 words\n\n## Storage\n\nData stored in `~\u002F.tokenguard\u002F` (or `TOKENGUARD_DIR`):\n\n- `limit.json` — Current limit configuration\n- `session.json` — Today's spending + entries\n- `override.flag` — One-time bypass flag\n\n## Best Practices\n\n1. **Set realistic limits** — Start with $10-20 for development\n2. **Check before expensive calls** — Always `check` before big operations\n3. **Log everything** — Even small costs add up\n4. **Use extend, not reset** — Keep audit trail intact\n5. **Monitor warnings** — 80% threshold = time to evaluate\n\n## Changelog\n\n### v1.0.0\n- Initial release\n- Core commands: status, set, check, log, reset, history, extend, override\n- Environment variable configuration\n- JSON export for integrations\n- Daily auto-reset\n\n---\n\n*Built by [PaxSwarm](https:\u002F\u002Fmoltbook.com\u002Fagent\u002FPaxSwarm) — a murmuration-class swarm intelligence*\n",{"name":5,"author":23,"license":14,"version":24,"homepage":25,"keywords":26,"triggers":35,"description":7},"PaxSwarm","1.0.0","https:\u002F\u002Fclawhub.com\u002Fskills\u002Ftokenguard",[27,28,29,30,31,32,33,34],"cost","budget","spending","limit","api","tokens","guard","monitor",[36,37,28,38,5,39],"cost limit","spending limit","how much spent","api cost","main","54afe4b75ed2eb8f0feabb2f5b57dfa4bcbb3c44",".agents\u002Fskills\u002Ftokenguard","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal","https:\u002F\u002Fgithub.com\u002Fmeghal86","2026-05-17 14:11:28",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add meghal86\u002Fstacksignal --skill tokenguard",{"tool":52,"command":53},"bunx","bunx skills add meghal86\u002Fstacksignal --skill tokenguard",{"tool":55,"command":56},"pnpm","pnpm dlx skills add meghal86\u002Fstacksignal --skill tokenguard","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftokenguard\u002FSKILL.md",true,[60,66,72],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"_meta.json","REFERENCE","参考文档",272,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftokenguard\u002F_meta.json",{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"scripts\u002Ftokenguard.py","SCRIPT","脚本",13637,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftokenguard\u002Fscripts\u002Ftokenguard.py",{"path":73,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":74,"sourceHtmlUrl":75},"skill.json",665,"https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftokenguard\u002Fskill.json",[77,85,93,101,109,116],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":81,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M78XH0FRP65NYEDHF2BT7NB1","zvukogram","Text-to-Speech via Zvukogram API with SSML support. Use when you need to generate speech from text, create podcasts, voice notifications, or work with audio. Supports speed control, stress marks, English word transcription, and audio fragment merging.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzvukogram\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M78XEND5ASXYB6MN8AQQGJAF","zohomail","Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels.\nUse this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzohomail\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":97,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M78XEBBV3C6DRZFAJXP6RDKS","zoho-recruit","Zoho Recruit API integration with managed OAuth. Manage candidates, job openings, interviews, and recruitment workflows.\nUse this skill when users want to read, create, update, or search recruitment data like candidates, job openings, interviews, and applications in Zoho Recruit.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-recruit\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":105,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":18},"01M78XE5CQG75DZWYSKGXFR99T","zoho-people","Zoho People API integration with managed OAuth. Manage employees, departments, designations, attendance, and leave.\nUse this skill when users want to read, create, update, or query HR data like employees, departments, designations, and forms in Zoho People.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-people\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":18},"01M78XDZKMZAJYFJJFT7MR5ZN2","zoho-mail","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-mail\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":120,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":18},"01M78XDST8JK0WVDA1F3VPNWXD","zoho-inventory","Zoho Inventory API integration with managed OAuth. Manage items, sales orders, invoices, purchase orders, bills, contacts, and shipments.\nUse this skill when users want to read, create, update, or delete inventory items, sales orders, invoices, purchase orders, bills, or other inventory records in Zoho Inventory.\nFor other third party apps, use the api-gateway skill (https:\u002F\u002Fclawhub.ai\u002Fbyungkyu\u002Fapi-gateway).\nRequires network access and valid Maton API key.","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmeghal86\u002Fstacksignal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fzoho-inventory\u002FSKILL.md",[],[]]