DeepSeek Open Platform Balance Query
Use this skill when the user asks about their DeepSeek account balance.
Execution Rule
Run the user's requested command directly without pre-checking dependencies, environment variables, or configuration. If something is wrong, the script will fail with a clear error — check and fix only then.
Usage
The script reads the API key from the DEEPSEEK_APIKEY environment variable, calls the balance API, and outputs raw JSON to stdout. Configure it in ~/.wmyskills/.env (shared across skills) or scripts/.env (takes priority); use scripts/.env.example as the template — add the variable to ~/.wmyskills/.env, never overwriting an existing file.
python scripts/check_balance.py
Output Format
The script outputs raw JSON (no pretty-printing):
Success:
{"is_available":true,"balance_infos":[{"currency":"CNY","total_balance":"110.00","granted_balance":"10.00","topped_up_balance":"100.00"}]}
Error (missing API key or network failure):
{"error": "DEEPSEEK_APIKEY environment variable not set"}
Fields
| Field | Description |
|---|---|
is_available |
Whether the balance is sufficient for API calls |
currency |
Currency type, CNY or USD |
total_balance |
Total available balance (including granted + topped-up) |
granted_balance |
Unexpired granted balance |
topped_up_balance |
Topped-up balance |
Notes
- Only report the balance number. Do not volunteer pricing or conversion advice (e.g. "how many tokens this covers") unless the user asks.
- The
DEEPSEEK_APIKEYenvironment variable must be set (or configured in~/.wmyskills/.envorscripts/.env).