Awesome-omni-skill anthropic-usage
Check Anthropic API usage and costs for any time period. Use when the user asks about API costs, usage, spending, or billing for their Anthropic account. Supports natural language periods like "last week", "yesterday", "january 2025", specific dates, or date ranges.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/anthropic-usage" ~/.claude/skills/diegosouzapw-awesome-omni-skill-anthropic-usage && rm -rf "$T"
manifest:
skills/development/anthropic-usage/SKILL.mdsource content
Anthropic API Usage
Fetch cost reports from the Anthropic Admin API.
Prerequisites
must be set inANTHROPIC_ADMIN_KEY~/.env
Usage
Run the script with a time period:
~/.claude/skills/anthropic-usage/scripts/get_cost.py "<period>"
Supported Period Formats
| Format | Example | Description |
|---|---|---|
| Relative week | , | 7-day periods |
| Relative month | , | Calendar months |
| Relative day | , | Single days |
| Last N days | , | Rolling window |
| Specific date | | Single UTC day |
| Date range | | Inclusive range |
| Month name | , | Full calendar month |
Options
(default): Human-readable table with totals--format table
: Raw API response--format json
Notes
- Costs are returned in USD
- Data is reported in UTC day buckets
- The API returns amounts in cents; the script converts to dollars