← Back to Skills Marketplace
franciscobuiltdat

API Credit Health Bar Lite

by FranciscoBuiltDat · GitHub ↗ · v1.0.2
cross-platform ✓ Security Clean
639
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install 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...
README (SKILL.md)

API Credits Lite

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.

When to Use

USE this skill when the user asks:

  • "How much credit do I have left?" / "What's my balance?"
  • "Show my API credits" / "Check my credits"
  • "Update my [provider] balance to $X"
  • "I topped up [provider] by $X"
  • "Am I running low on [provider]?"

DON'T use when:

  • The user needs 16+ providers, JSONL auto-tracking, cloud SDKs, or heartbeat integration → use api-credits-pro

How to Use

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 \x3Cskill-root>/scripts/\x3Cscript>.py \x3Cargs>


Show Credit Balances

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% · 🟥 \x3C25%


Manual Balance Sync

Triggers: "set my Anthropic balance to $X", "update my OpenAI credits to $X", "I have $X left on [provider]"

python3 scripts/sync_provider.py \x3Cprovider> \x3Cbalance>
# With max:  python3 scripts/sync_provider.py \x3Cprovider> \x3Cbalance> \x3Cmax_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

Auto-Check Balance via API

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.


Record a Top-Up

Triggers: "I added $X to my [provider] account", "I topped up $50 on OpenRouter"

python3 scripts/topup.py \x3Cprovider> \x3Camount>
# Example: python3 scripts/topup.py openrouter 20.00

Troubleshooting

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

Upgrading

Need 16+ providers, auto-tracking from session logs, cloud SDKs (AWS/Azure/GCP), or heartbeat integration? Suggest api-credits-pro.

Usage Guidance
This skill appears to do exactly what it says: local config-based health bars plus optional API checks for OpenAI, OpenRouter, and Vercel. Before installing or running: 1) Prefer manual-sync mode if you want zero network access (do not set any API env vars). 2) If you enable auto-checks, set only minimal-privilege or billing-scoped API keys where possible — avoid handing highly privileged org-admin keys unless you understand the billing API requirements. 3) Keep config.json permissioned (e.g., chmod 600) and do not store keys in files. 4) Review the check_openai.py note about requiring an org admin key — if you cannot get a minimally privileged key that returns billing info, use manual sync instead. 5) The repository contains duplicated scripts in root and scripts/ — expected for packaging but you can inspect files locally before running. If you need higher assurance, run the scripts in a disposable environment or review/execute them line-by-line to confirm network targets and no surprising behavior.
Capability Analysis
Type: OpenClaw Skill Name: api-credits-lite Version: 1.0.2 The OpenClaw AgentSkills skill bundle 'api-credits-lite' is classified as benign. All code and documentation align with the stated purpose of tracking and displaying API credit balances. API keys are handled securely by being read from environment variables and not stored on disk. Network requests are limited to official API endpoints (OpenAI, OpenRouter, Vercel) for balance checks, as explicitly detailed in `SECURITY.md`. Input sanitization is present for command-line arguments in scripts like `sync_provider.py` and `topup.py`, preventing shell injection. There is no evidence of data exfiltration, persistence mechanisms, obfuscation, or prompt injection attempts in `SKILL.md` or `README.md`.
Capability Assessment
Purpose & Capability
Name/description (API credit health bars) align with contained scripts: reading/writing a local config.json, rendering health bars, manual sync, and optional API auto-checks for OpenAI, OpenRouter, and Vercel. The optional env vars in SKILL.md (OPENAI_API_KEY, OPENROUTER_API_KEY, VERCEL_AI_GATEWAY_KEY) match the providers the code can query.
Instruction Scope
SKILL.md and scripts instruct only local config reads/writes and requests to official provider endpoints. One minor inconsistency: check_openai.py comments say it requires an "organization admin API key", while SECURITY.md recommends using project-level or minimal-privilege keys; this is a documentation/conflict note rather than evidence of exfiltration. Scripts run other local scripts via subprocess (expected for this tool).
Install Mechanism
No install spec: this is instruction/code-only and runs as local Python scripts. No remote downloads or extract steps, and no unusual install actions observed.
Credentials
The only environment access requested is optional API keys for the providers the skill actually queries. Keys are read from environment variables (not stored). The only concern is the check_openai.py docstring suggesting an org-admin key for billing access; that elevates privilege requirements for the OpenAI check and conflicts with the SECURITY.md guidance to prefer minimal-privilege keys.
Persistence & Privilege
Skill is not marked always:true and does not request system-wide persistence. It only writes a local config.json inside the skill directory and does not modify other skills or global settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install api-credits-lite
  3. After installation, invoke the skill by name or use /api-credits-lite
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
- Updated skill usage instructions to provide clear, conversational guidance for when and how to check, sync, or top up API credits. - Added explicit trigger examples for each feature, including manual and API-based balance updates. - Specified which providers support API auto-check (OpenAI, OpenRouter, Vercel) and which require manual sync. - Included troubleshooting tips for empty configuration and first-time setup. - Clarified upgrade path to api-credits-pro for advanced needs.
v1.0.1
- Initial public release with core scripts for tracking API credit balances. - Added video game style health bars for 5 providers: Anthropic, OpenAI, OpenRouter, Mistral, and Groq. - Supports both manual sync and API-based auto-checks for OpenAI, OpenRouter, and Vercel. - Includes threshold alerts, top-up tracking, and easy command-line commands for balance management. - Added scripts: show_credits.py, check_all_apis.py, check_openai.py, check_openrouter.py, check_vercel.py, sync_provider.py, render_healthbar.py, topup.py.
v1.0.0
Initial release: 5-provider health bar display with API auto-checks (OpenAI, OpenRouter, Vercel) and manual sync. Github: https://github.com/FranciscoBuiltDat/openclaw-api-credits-lite
Metadata
Slug api-credits-lite
Version 1.0.2
License
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is API Credit Health Bar Lite?

Display API credit balances for 5 core providers (Anthropic, OpenAI, OpenRouter, Mistral, Groq) with video game style health bars. API auto-checks and manual... It is an AI Agent Skill for Claude Code / OpenClaw, with 639 downloads so far.

How do I install API Credit Health Bar Lite?

Run "/install api-credits-lite" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is API Credit Health Bar Lite free?

Yes, API Credit Health Bar Lite is completely free (open-source). You can download, install and use it at no cost.

Which platforms does API Credit Health Bar Lite support?

API Credit Health Bar Lite is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created API Credit Health Bar Lite?

It is built and maintained by FranciscoBuiltDat (@franciscobuiltdat); the current version is v1.0.2.

💬 Comments