← 返回 Skills 市场
kyya

Balance Checker

作者 kyya · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
1677
总下载
1
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install balance-checker
功能描述
查询 AI API 服务商的余额(DeepSeek、Moonshot/Kimi、火山引擎)。当用户说"查余额"、"还有多少额度"、"余额多少"时自动触发。
使用说明 (SKILL.md)

Balance Checker Skill

一次查询所有 AI API 服务商的余额。

支持的服务商

服务商 查询方式 环境变量
DeepSeek REST API DEEPSEEK_API_KEY
Moonshot/Kimi REST API MOONSHOT_API_KEY
火山引擎 Python SDK VOLCENGINE_ACCESS_KEY + VOLCENGINE_SECRET_KEY

触发关键词

  • "查余额"
  • "还有多少额度"
  • "余额多少"
  • "看看余额"
  • "API 余额"

安装

火山引擎查询需要 Python SDK,首次使用请运行:

cd ~/.openclaw/skills/balance-checker
./setup_volcengine.sh

配置

环境变量(推荐)

export DEEPSEEK_API_KEY=sk-xxx
export MOONSHOT_API_KEY=sk-xxx
export VOLCENGINE_ACCESS_KEY=AKLTxxx
export VOLCENGINE_SECRET_KEY=xxx

OpenClaw 配置

~/.openclaw/openclaw.jsonenv 部分添加上述环境变量。

输出示例

🔍 正在查询 API 余额...

💰 DeepSeek 余额
- 总余额: 304.54 CNY
- 赠金余额: 0.00 CNY
- 充值余额: 304.54 CNY
- 状态: 可用 ✅

🌙 Moonshot/Kimi 余额
- 可用余额: 450.79 CNY
- 现金余额: 450.79 CNY
- 代金券余额: 0 CNY

🌋 火山引擎余额
- 可用余额: 86.68 CNY
- 现金余额: 86.68 CNY

✅ 余额查询完成

文件结构

balance-checker/
├── SKILL.md              # Skill 描述
├── check_balance.sh      # 主入口脚本
├── query_balance.py      # 火山引擎查询(Python)
├── setup_volcengine.sh   # 火山引擎 SDK 安装脚本
└── venv/                 # Python 虚拟环境(自动创建)

API 文档

安全使用建议
This skill appears to do what it says: it queries provider APIs and (for Volcengine) uses a local Python SDK. Before installing: - Confirm you are comfortable storing VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY either as environment variables or in ~/.openclaw/openclaw.json (ensure that file is readable only by you). - Review the scripts (check_balance.sh, query_balance.py, setup_volcengine.sh) yourself; they call only the documented provider endpoints and pip-install the Volcengine SDK into a local venv. - Run setup_volcengine.sh manually in a controlled shell to see what it installs; it installs packages from PyPI (volcengine-python-sdk) into a venv — do this if you trust that package. - Note small authoring bugs (setup script chmods non-existent files, registry metadata omits required env vars) — these are likely mistakes, not malicious behavior, but verify the repository source if you require higher assurance. If you are uncertain about any of the upstream packages (e.g., volcengine-python-sdk), test the skill in an isolated environment or container before adding real credentials.
功能分析
Type: OpenClaw Skill Name: balance-checker Version: 1.0.0 The OpenClaw skill 'balance-checker' is designed to query API balances for DeepSeek, Moonshot, and Volcengine. It retrieves API keys/secrets from environment variables or the local OpenClaw configuration file (`~/.openclaw/openclaw.json`), which is a standard and expected method for such skills. The `check_balance.sh` script uses `curl` to interact with legitimate API endpoints (api.deepseek.com, api.moonshot.cn) and executes `query_balance.py` for Volcengine, which in turn uses the official `volcengine-python-sdk`. The `setup_volcengine.sh` script correctly sets up a Python virtual environment and installs the necessary SDK. There is no evidence of data exfiltration to unauthorized destinations, malicious execution, persistence mechanisms, or prompt injection attempts in `SKILL.md` or `README.md` that would subvert the agent's intended behavior. All actions are clearly aligned with the stated purpose.
能力评估
Purpose & Capability
The name/description match the files and runtime behavior: check_balance.sh queries DeepSeek and Moonshot via their REST endpoints and query_balance.py queries Volcengine via the Python SDK. One inconsistency: registry metadata lists no required environment variables, but SKILL.md and the scripts clearly expect DEEPSEEK_API_KEY, MOONSHOT_API_KEY, VOLCENGINE_ACCESS_KEY and VOLCENGINE_SECRET_KEY.
Instruction Scope
SKILL.md instructs running setup_volcengine.sh and adding keys to ~/.openclaw/openclaw.json or environment variables. The scripts implement only the stated actions: call provider APIs and read credentials from env or from OpenClaw config (~/.openclaw/openclaw.json or clawdbot.json). Reading the OpenClaw config is expected for convenience, but it means the skill will access a local config file — reviewers should be aware it inspects that file to extract VOLCENGINE_* keys.
Install Mechanism
No registry install spec; the included setup_volcengine.sh creates a venv and pip-installs volcengine-python-sdk from PyPI — a standard, low-risk pattern. Minor oddities: setup_volcengine.sh attempts chmod on files (volcengine_balance.sh, setup.sh) that are not present in the package, which appears to be an authoring bug rather than malicious behavior.
Credentials
The skill requests only provider-specific credentials (DeepSeek, Moonshot, Volcengine), which are appropriate for querying balances. However, the package metadata did not declare required env vars while the SKILL.md and scripts do; also query_balance.py will read ~/.openclaw/openclaw.json if env vars are absent (it only looks for VOLCENGINE_ACCESS_KEY/SECRET). Storing secrets in the shared OpenClaw config is a usability trade-off — users should ensure that file's permissions are secure.
Persistence & Privilege
The skill is not always-enabled and does not request elevated system privileges. It installs a local venv under the skill directory and does not modify other skills or global agent settings. The skill can be invoked autonomously by the agent (platform default), which is consistent with its function.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install balance-checker
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /balance-checker 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of balance-checker skill. - Allows users to check balances across DeepSeek, Moonshot/Kimi, and 火山引擎 AI API providers with one command. - Triggers automatically on common balance-related keywords (e.g. "查余额", "余额多少"). - Supports balance lookup via API keys and environment variables. - Includes scripts and setup instructions for initial installation, especially for 火山引擎 (Python SDK required). - Provides a sample output for easy reference. - Documentation covers supported providers, configuration, and links to respective API docs.
元数据
Slug balance-checker
版本 1.0.0
许可证
累计安装 3
当前安装数 3
历史版本数 1
常见问题

Balance Checker 是什么?

查询 AI API 服务商的余额(DeepSeek、Moonshot/Kimi、火山引擎)。当用户说"查余额"、"还有多少额度"、"余额多少"时自动触发。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1677 次。

如何安装 Balance Checker?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install balance-checker」即可一键安装,无需额外配置。

Balance Checker 是免费的吗?

是的,Balance Checker 完全免费(开源免费),可自由下载、安装和使用。

Balance Checker 支持哪些平台?

Balance Checker 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Balance Checker?

由 kyya(@kyya)开发并维护,当前版本 v1.0.0。

💬 留言讨论