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.

16 stars

Best use case

anthropic-usage is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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.

Teams using anthropic-usage should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/anthropic-usage/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/anthropic-usage/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/anthropic-usage/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How anthropic-usage Compares

Feature / Agentanthropic-usageStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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

Related Skills

anthropic_administrator-automation

16
from diegosouzapw/awesome-omni-skill

Automate Anthropic Admin tasks via Rube MCP (Composio): API keys, usage, workspaces, and organization management. Always search tools first for current schemas.

anthropic-streaming-patterns

16
from diegosouzapw/awesome-omni-skill

Use when integrating Claude API with streaming responses, implementing tool execution in streams, tracking API costs, or encountering streaming errors - provides Anthropic SDK 0.30.1+ patterns with mandatory cost monitoring

anthropic-office-pdf

16
from diegosouzapw/awesome-omni-skill

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

alpine-js-usage-rules

16
from diegosouzapw/awesome-omni-skill

Guidelines for using Alpine.js for declarative JavaScript functionality.

brand-guidelines-anthropic

16
from diegosouzapw/awesome-omni-skill

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatt...

anthropic-design-canvas

16
from diegosouzapw/awesome-omni-skill

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

anthropic-canvas-design

16
from diegosouzapw/awesome-omni-skill

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

anthropic-brand-guidelines

16
from diegosouzapw/awesome-omni-skill

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

virtual-environment-usage

16
from diegosouzapw/awesome-omni-skill

Mandates the use of virtual environments for isolating project dependencies and ensuring reproducibility.

anthropic-token-refresh

16
from diegosouzapw/awesome-omni-skill

Automatically refresh Anthropic Claude setup-token before expiration using browser automation. Use when: (1) Setting up auto token refresh for Claude Max/Pro subscription, (2) Token keeps expiring and causing OpenClaw to stop responding, (3) Want to maintain continuous Claude API access without manual intervention.

ai-usage-coach

16
from diegosouzapw/awesome-omni-skill

Help users get more value from AI assistants by suggesting better prompting techniques, surfacing underused features, and identifying workflow improvements. Use when users ask things like "how can I use Claude better?", "what features am I missing?", "give me tips for prompting", "what can you do?", "I feel like I'm not getting the most out of this", or when they explicitly ask for help improving their AI usage. Also use when users seem frustrated with results or are clearly using suboptimal patterns.

ffmpeg-usage

16
from diegosouzapw/awesome-omni-skill

ffmpeg recipes and best practices: convert, concatenate, merge, resize, compress, GIF creation, audio extraction, subtitles, optimize for social platforms.