← Back to Skills Marketplace
269
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install new-api-usage
Description
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...
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install new-api-usage - After installation, invoke the skill by name or use
/new-api-usage - Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Frequently Asked Questions
What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 269 downloads so far.
How do I install new-api-usage?
Run "/install new-api-usage" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is new-api-usage free?
Yes, new-api-usage is completely free (open-source). You can download, install and use it at no cost.
Which platforms does new-api-usage support?
new-api-usage is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created new-api-usage?
It is built and maintained by wang48 (@wang48); the current version is v1.0.1.
More Skills