← ClaudeAtlas

oatda-check-balancelisted

Use when the user wants to check their OATDA account balance, credit usage, or remaining budget before running an expensive AI call. Returns current balance, total usage, and available balance. Triggers on phrases like "check my OATDA credits", "how much budget do I have left", "verify OATDA balance", "am I out of credits", "check usage".
devcsde/oatda-skills · ★ 0 · AI & Automation · score 70
Install: claude install-skill devcsde/oatda-skills
# OATDA Check Balance Check the current OATDA account balance, total usage, and available balance. Useful before expensive image/video/LLM calls to confirm the user has enough credits. ## When to Use Use this skill when the user wants to: - Check current OATDA credits / balance - See total usage spent so far - Verify there is enough budget before running a costly call (image, video, long LLM run) - Diagnose why an OATDA call returned `402 Insufficient credits` ## Prerequisites The user needs an OATDA API key. Check in this order: 1. `$OATDA_API_KEY` environment variable 2. `~/.oatda/credentials.json` config file If neither exists, tell the user: > You need an OATDA API key. Get one at https://oatda.com, then set it: > `export OATDA_API_KEY=your_key_here` ## Step-by-Step Instructions ### 1. Resolve the API key ```bash # Check env var first; if empty, auto-load from credentials file if [[ -z "$OATDA_API_KEY" ]]; then export OATDA_API_KEY=$(cat ~/.oatda/credentials.json 2>/dev/null | jq -r '.profiles[.defaultProfile].apiKey' 2>/dev/null) fi # Verify key exists (show first 8 chars only) echo "${OATDA_API_KEY:0:8}" ``` If the output is empty or `null`, stop and ask the user to configure their API key. **IMPORTANT**: - Never print the full API key. Only show the first 8 characters for verification. - The key resolution script and subsequent `curl` commands **must run in the same shell session**. Either run all commands in one session, or chain them (e.g., `export OATD