name: api-credits-lite description: 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. optionalEnv: - OPENAI_API_KEY - OPENROUTER_API_KEY - VERCEL_AI_GATEWAY_KEY permissions: - network: Contact OpenAI, OpenRouter, and Vercel APIs to check balances (optional) - filesystem: Read/write config.json and health bar display
Use 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.
✅ USE this skill when the user asks:
❌ DON'T use when: - The user needs 16+ providers, JSONL auto-tracking, cloud SDKs, or heartbeat integration → use api-credits-pro
You run the scripts internally — the user never types python3. Respond naturally and present health bar output conversationally.
The skill root is at: ~/.openclaw/workspace/skills/api-credits-lite/
Run scripts with: python3 <skill-root>/scripts/<script>.py <args>
Triggers: "show my credits", "how much do I have left", "check my API balance"
python3 scripts/show_credits.py
Displays retro health bars for all configured providers. Colors: 🟩 >75% · 🟨 50–75% · 🟧 25–50% · 🟥 <25%
Triggers: "set my Anthropic balance to $X", "update my OpenAI credits to $X", "I have $X left on [provider]"
python3 scripts/sync_provider.py <provider> <balance>
# With max: python3 scripts/sync_provider.py <provider> <balance> <max_credits>
# Examples:
python3 scripts/sync_provider.py anthropic 22.97
python3 scripts/sync_provider.py openai 95.00 100.00
Supported providers: anthropic, openai, openrouter, mistral, groq
Where to find balances: - Anthropic → console.anthropic.com - OpenAI → platform.openai.com/usage - OpenRouter → openrouter.ai/activity - Mistral → console.mistral.ai/billing - Groq → console.groq.com/settings/billing
Triggers: "check my OpenAI balance automatically", "pull my OpenRouter credits"
For providers that expose a balance API (requires the relevant API key set as an env var):
python3 scripts/check_openai.py # uses OPENAI_API_KEY
python3 scripts/check_openrouter.py # uses OPENROUTER_API_KEY
python3 scripts/check_vercel.py # uses VERCEL_AI_GATEWAY_KEY
Anthropic, Mistral, and Groq don't have public balance APIs — use manual sync for those.
Triggers: "I added $X to my [provider] account", "I topped up $50 on OpenRouter"
来源于7w4.net。
python3 scripts/topup.py <provider> <amount>
# Example: python3 scripts/topup.py openrouter 20.00
If 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:
cp config.example.json config.json
Need 16+ providers, auto-tracking from session logs, cloud SDKs (AWS/Azure/GCP), or heartbeat integration? Suggest api-credits-pro.
这个 Skill 质量不错,文档和说明非常详细,用户可以轻松上手使用。它能同时管理 5 个常用 AI 服务商的余额,用炫酷的健康条样式展示,一目了然。安全方面考虑周到,区分了无需联网的安全模式和需要 API 密钥的自动检查模式。不过部分功能脚本可能不完整,个别文件看起来像是占位符或还未开发完成,对于需要完整功能的人来说可能会有些失望。总体来说,核心功能扎实,界面友好,但建议等版本更稳定后再使用。