ワンクリックで
api-usage
Check Anthropic API spend and token usage from the org admin API with curl + jq. User-invoked only (/api-usage).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Check Anthropic API spend and token usage from the org admin API with curl + jq. User-invoked only (/api-usage).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Implement work from a ticket, spec, or inline description; auto-detects the next item from the task folders when no argument is given.
Show status overview and next steps for an .aiwork/ spec. Use when user says "next steps", "what's left", "status", "progress", or wants to see what's planned, unplanned, or incomplete for a task.
Scan current directory (recursively) for Claude Code skills, slash commands, agents, hooks, and plugin/MCP configs, then render an interactive HTML graph of their explicit and implicit relationships. Use when the user says "skills map", "skill graph", "visualize skills", "map skills", "how do my skills relate", or wants to audit a skill collection before publishing.
Turn the current conversation context into a spec. Use when user wants to create a spec (or PRD) from the current context.
Break a plan, spec, or the current conversation into vertical-slice tickets, each declaring its blocking edges.
Structure AI work artifacts under .aiwork/{YYYY-MM-DD}_{slug}/ folders using the project's protocol (triage, research, spec, prd, plan, review, notes, docs/). Use when the user asks to plan, make a spec, triage, research a task, write a report, code review, summarize findings, save the work, document decisions, record this, write that down, persist findings, or references any path under .aiwork/. Also use when starting a non-trivial task that needs a plan or spec before implementation, or when finishing one and capturing notes.
| name | api-usage |
| disable-model-invocation | true |
| description | Check Anthropic API spend and token usage from the org admin API with curl + jq. User-invoked only (/api-usage). |
Quick look at Anthropic API spend and token usage for an organization.
jq — JSON parsingop — 1Password CLI, to load the admin key (or supply the key another way)Needs an admin key (sk-ant-admin...). Normal API keys and user-OAuth
tokens get 403 Authentication method not allowed, and ant has no org
usage/cost commands, so this is plain curl. Load the key without printing it:
export AK=$(op read "op://<vault>/<item>/<field>" | tr -d '[:space:]')
H=(-H "x-api-key: $AK" -H "anthropic-version: 2023-06-01")
# Range as RFC3339 UTC. Defaults below = current year to date; override as needed.
START="$(date -u +%Y-01-01T00:00:00Z)"
END="$(date -u -d tomorrow +%Y-%m-%dT00:00:00Z)"
# Total billed for the range (follow .next_page if .has_more is true)
curl -s "https://api.anthropic.com/v1/organizations/cost_report?starting_at=$START&ending_at=$END" "${H[@]}" \
| jq '[.data[].results[].amount|tonumber]|add'
# Per model + token-type, line by line
curl -s "https://api.anthropic.com/v1/organizations/cost_report?starting_at=$START&ending_at=$END&group_by[]=description" "${H[@]}" \
| jq -r '.data[].results[]|select(.amount!="0")|"\(.amount)\t\(.model)\t\(.token_type)"'
cost_report group_by only accepts description and workspace_id.
# Tokens by model (bucket_width: 1d | 1h; default limit 7 buckets, so paginate)
curl -s "https://api.anthropic.com/v1/organizations/usage_report/messages?starting_at=$START&ending_at=$END&bucket_width=1d&group_by[]=model" "${H[@]}" \
| jq -r '.data[].results[]|"\(.model)\tin=\(.uncached_input_tokens)\tout=\(.output_tokens)\tcache_rd=\(.cache_read_input_tokens)"'
Group by api_key_id to attribute usage; a high cache-read ratio is the Claude
Code signature. Interactive Claude Code on a Pro/Max subscription runs over
OAuth, not an API key, so it does not appear here and is not API credit spend.
These two endpoints can disagree by a constant multiplier for some orgs — same
days, models, and token types, only the magnitude differs. Cross-check
cost_report dollars against the token counts priced at standard list rates; if
they diverge by a large factor, trust the token-derived figure and confirm
against the Console invoice.
Not exposed by the admin API. Console only: https://console.anthropic.com/settings/billing