Skip to content
Back to skills

Anthropic Usage

ASecurity

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.

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
ai-agentsbashapi

Works with

  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill anthropic-usage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Anthropic Usage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Anthropic Usage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-anthropic-usage/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-anthropic-usage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: anthropic-usage
description: 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.
---

# Anthropic API Usage

Fetch cost reports from the Anthropic Admin API.

## Prerequisites

- `ANTHROPIC_ADMIN_KEY` must be set in `~/.env`

## Usage

Run the script with a time period:

```bash
~/.claude/skills/anthropic-usage/scripts/get_cost.py "<period>"
```

## Supported Period Formats

| Format | Example | Description |
|--------|---------|-------------|
| Relative week | `last week`, `this week` | 7-day periods |
| Relative month | `last month`, `this month` | Calendar months |
| Relative day | `yesterday`, `today` | Single days |
| Last N days | `last 3 days`, `last 30 days` | Rolling window |
| Specific date | `2026-02-01` | Single UTC day |
| Date range | `2026-01-01 to 2026-01-31` | Inclusive range |
| Month name | `january`, `feb 2025` | Full calendar month |

## Options

- `--format table` (default): Human-readable table with totals
- `--format json`: Raw API response

## Notes

- Costs are returned in USD
- Data is reported in UTC day buckets
- The API returns amounts in cents; the script converts to dollars

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.