{"skill":{"slug":"api-credits-lite","displayName":"API Credit Health Bar Lite","summary":"Display API credit balances for 5 core providers (Anthropic, OpenAI, OpenRouter, Mistral, Groq) with video game style health bars. API auto-checks and manual...","description":"---\nname: api-credits-lite\ndescription: Display API credit balances for 5 core providers (Anthropic, OpenAI, OpenRouter, Mistral, Groq) with video game style health bars. API auto-checks and manual sync.\noptionalEnv:\n  - OPENAI_API_KEY\n  - OPENROUTER_API_KEY\n  - VERCEL_AI_GATEWAY_KEY\npermissions:\n  - network: Contact OpenAI, OpenRouter, and Vercel APIs to check balances (optional)\n  - filesystem: Read/write config.json and health bar display\n---\n\n# API Credits Lite\n\nUse this skill when the user asks about API credits, balances, spending, or wants to update their credit info for Anthropic, OpenAI, OpenRouter, Mistral, or Groq.\n\n## When to Use\n\n✅ **USE this skill when the user asks:**\n\n- \"How much credit do I have left?\" / \"What's my balance?\"\n- \"Show my API credits\" / \"Check my credits\"\n- \"Update my [provider] balance to $X\"\n- \"I topped up [provider] by $X\"\n- \"Am I running low on [provider]?\"\n\n❌ **DON'T use when:**\n- The user needs 16+ providers, JSONL auto-tracking, cloud SDKs, or heartbeat integration → use **api-credits-pro**\n\n## How to Use\n\nYou run the scripts internally — the user never types `python3`. Respond naturally and present health bar output conversationally.\n\nThe skill root is at: `~/.openclaw/workspace/skills/api-credits-lite/`\nRun scripts with: `python3 <skill-root>/scripts/<script>.py <args>`\n\n---\n\n## Show Credit Balances\n\n**Triggers:** \"show my credits\", \"how much do I have left\", \"check my API balance\"\n\n```bash\npython3 scripts/show_credits.py\n```\n\nDisplays retro health bars for all configured providers. Colors: 🟩 >75% · 🟨 50–75% · 🟧 25–50% · 🟥 <25%\n\n---\n\n## Manual Balance Sync\n\n**Triggers:** \"set my Anthropic balance to $X\", \"update my OpenAI credits to $X\", \"I have $X left on [provider]\"\n\n```bash\npython3 scripts/sync_provider.py <provider> <balance>\n# With max:  python3 scripts/sync_provider.py <provider> <balance> <max_credits>\n\n# Examples:\npython3 scripts/sync_provider.py anthropic 22.97\npython3 scripts/sync_provider.py openai 95.00 100.00\n```\n\nSupported providers: `anthropic`, `openai`, `openrouter`, `mistral`, `groq`\n\nWhere to find balances:\n- **Anthropic** → console.anthropic.com\n- **OpenAI** → platform.openai.com/usage\n- **OpenRouter** → openrouter.ai/activity\n- **Mistral** → console.mistral.ai/billing\n- **Groq** → console.groq.com/settings/billing\n\n---\n\n## Auto-Check Balance via API\n\n**Triggers:** \"check my OpenAI balance automatically\", \"pull my OpenRouter credits\"\n\nFor providers that expose a balance API (requires the relevant API key set as an env var):\n\n```bash\npython3 scripts/check_openai.py       # uses OPENAI_API_KEY\npython3 scripts/check_openrouter.py   # uses OPENROUTER_API_KEY\npython3 scripts/check_vercel.py       # uses VERCEL_AI_GATEWAY_KEY\n```\n\nAnthropic, Mistral, and Groq don't have public balance APIs — use manual sync for those.\n\n---\n\n## Record a Top-Up\n\n**Triggers:** \"I added $X to my [provider] account\", \"I topped up $50 on OpenRouter\"\n\n```bash\npython3 scripts/topup.py <provider> <amount>\n# Example: python3 scripts/topup.py openrouter 20.00\n```\n\n---\n\n## Troubleshooting\n\nIf the display shows no providers, the config may be empty. Tell the user to run the first manual sync for each provider they use, or copy the example config:\n\n```bash\ncp config.example.json config.json\n```\n\n---\n\n## Upgrading\n\nNeed 16+ providers, auto-tracking from session logs, cloud SDKs (AWS/Azure/GCP), or heartbeat integration? Suggest **api-credits-pro**.\n","topics":["Game","Health","Sync"],"tags":{"latest":"1.0.2","anthropic":"1.0.0","api":"1.0.0","billing":"1.0.0","credits":"1.0.0","groq":"1.0.0","mistral":"1.0.0","openai":"1.0.0","openrouter":"1.0.0"},"stats":{"comments":0,"downloads":1059,"installsAllTime":39,"installsCurrent":0,"stars":0,"versions":3},"createdAt":1771728188641,"updatedAt":1778491605027},"latestVersion":{"version":"1.0.2","createdAt":1771874002263,"changelog":"- Updated skill usage instructions to provide clear, conversational guidance for when and how to check, sync, or top up API credits.\n- Added explicit trigger examples for each feature, including manual and API-based balance updates.\n- Specified which providers support API auto-check (OpenAI, OpenRouter, Vercel) and which require manual sync.\n- Included troubleshooting tips for empty configuration and first-time setup.\n- Clarified upgrade path to api-credits-pro for advanced needs.","license":null},"metadata":null,"owner":{"handle":"franciscobuiltdat","userId":"s1790zky3qvddzbpx74sbr9f7x884sg4","displayName":"FranciscoBuiltDat","image":"https://avatars.githubusercontent.com/u/260347361?v=4"},"moderation":null}