About deepseek-balance
deepseek-balance is a skill for checking a DeepSeek Open Platform account balance. It runs a script that calls the balance API and writes the raw JSON response to stdout.
Key features
- 01Call the DeepSeek balance API
- 02Read the API key from an environment variable
- 03Output raw JSON balance data
- 04Show availability and balance fields
Use cases
- 01Check a DeepSeek account balance
- 02Confirm whether the balance is available
- 03Review granted and topped-up balances
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ wmy2981/ skills --skill deepseek-balanceAfter installing, type/deepseek-balancein Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
.claude-plugin/plugin.jsonreferences/output_example.jsonscripts/.env.examplecheck_balance.pyDetails
From the project READMEDeepSeek 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).