← 返回 Skills 市场
269
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install new-api-usage
功能描述
Query usage statistics and quota from a user-specified new-api endpoint. Use when the user asks to check API quota, usage records, token consumption, model-l...
安全使用建议
This skill appears to do what it says: it will perform read-only GET requests to the base URL you provide and requires you to pass the API key explicitly. Before running it, make sure you trust the target base URL (don't pass keys to unknown servers). Prefer HTTPS and a server you control or trust because the script sends the key in both an Authorization header and as a query parameter — query parameters can be logged or leaked via referrers. If you want to reduce exposure, consider modifying the script to avoid sending the key in the URL query string (only use the Authorization header). Also review the printed output when using --json to ensure no sensitive fields are included (the script intentionally avoids printing the full key). Finally, be aware of a possible API-response handling quirk in print_quota (the script checks quota_data.get('code') in a way that may treat some valid responses as errors); this is a correctness issue, not evidence of malicious behavior.
功能分析
Type: OpenClaw Skill
Name: new-api-usage
Version: 1.0.1
The skill bundle is designed to query usage statistics and quotas from a 'new-api' compatible endpoint. The Python script (scripts/query_usage.py) uses standard libraries to perform GET requests to user-provided URLs and includes logic to format and display the results. The documentation (SKILL.md) explicitly includes safety rules such as not printing API keys and requiring explicit user input for sensitive parameters, showing no signs of malicious intent or prompt injection.
能力评估
Purpose & Capability
Name/description ask for querying usage/quota and the included script implements exactly that: GETs to /api/usage/token/ and /api/log/token with an explicit --base-url and --key. No unrelated credentials, binaries, or installs are requested.
Instruction Scope
SKILL.md requires explicit base URL and key and instructs read-only GETs only; the script follows this. One notable behavior: the usage endpoint call sends the API key both in the Authorization header and as a query parameter (key={api_key}), which is coherent with the documented endpoint but increases risk of key exposure via logs/referrers on the server or intermediaries. The skill otherwise does not read local files, config, or extra env vars.
Install Mechanism
No install spec and no external downloads; the skill is instruction-only with an included Python script that runs with the user's Python runtime.
Credentials
No environment variables, credentials, or config paths are requested. The single required secret is the API key provided on the command line, which matches the skill's purpose.
Persistence & Privilege
Skill is not always-enabled, does not modify agent/system configs, and does not request persistent presence or elevated privileges.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install new-api-usage - 安装完成后,直接呼叫该 Skill 的名称或使用
/new-api-usage触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
**Requires explicit base URL and API key for all queries. Safer, manual-only usage.**
- Removed auto-detection and config reading; now requires `--base-url` and `--key` for every query.
- No more local config or keychain access; never prints full API keys in output.
- Added safety rules: only allows read-only GET requests, asks for user confirmation on unknown endpoints.
- Updated documentation and usage examples to reflect manual, explicit workflow.
- Refined option descriptions and usage instructions.
v1.0.0
- Initial release of the new-api-usage skill.
- Automatically detects configured new-api providers in OpenClaw config.
- Allows querying API key usage, token consumption, quota/balance, and model usage statistics.
- Supports flexible query options, including specific provider, manual API key, and output formats.
- Default behavior shows today's usage, quota, and summary when auto-detected.
元数据
常见问题
new-api-usage 是什么?
Query usage statistics and quota from a user-specified new-api endpoint. Use when the user asks to check API quota, usage records, token consumption, model-l... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 269 次。
如何安装 new-api-usage?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install new-api-usage」即可一键安装,无需额外配置。
new-api-usage 是免费的吗?
是的,new-api-usage 完全免费(开源免费),可自由下载、安装和使用。
new-api-usage 支持哪些平台?
new-api-usage 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 new-api-usage?
由 wang48(@wang48)开发并维护,当前版本 v1.0.1。
推荐 Skills