Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
What This Skill Does
CLI tool for querying Anthropic Admin API usage and cost data. Stores the Admin API key in macOS Keychain. Outputs tables or JSON for scripting.
Avoids logging into the Claude Console just to check usage, and outputs JSON for piping into scripts or dashboards.
When to use it
- Check daily Claude API spend before end of billing cycle
- Filter token usage by model to compare costs across deployments
- Export monthly cost report as JSON for expense tracking
- Monitor hourly usage spikes during high-traffic periods
- Audit which API keys are consuming the most tokens
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: show me my Claude API costs for January 2026 grouped by workspace
- 1Run `claude-cost config set-key` to store the Admin API key in macOS Keychain
- 2Run `claude-cost cost --from 2026-01-01 --to 2026-01-31 --group-by workspace_id`
- 3Review table output showing Date, Description, Model, Amount (USD), Token Type, Tier per workspace
- 4Optionally rerun with `--json` flag to pipe results into another tool
Cost breakdown table for January 2026, one row per workspace entry
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.