← ClaudeAtlas

agent-usagelisted

Query AI coding agent usage, costs, and token consumption. Supports Claude Code, Codex CLI, OpenClaw, and OpenCode. Ask about spending, token usage, model costs, session history, API call counts. Actions: check usage, show cost, compare models, list sessions, analyze spending, token breakdown. Time ranges: today, this week, this month, this year, last N days, custom dates.
unmercenary-timebomb913/agent-usage · ★ 1 · AI & Automation · score 74
Install: claude install-skill unmercenary-timebomb913/agent-usage
# agent-usage — AI Coding Agent Usage Query Query your AI coding agent usage data directly in conversation. Supports Claude Code, Codex CLI, OpenClaw, and OpenCode. ## When to Use Activate when the user asks about: - Cost / spending / billing / how much did I spend - Token usage / consumption / input / output tokens - Model comparison / which model costs most - Session history / recent sessions / session details - API call counts - Usage trends over time - Any question involving "usage", "cost", "tokens", "spend", "sessions" related to AI coding tools ## How It Works This skill has two backends. Always detect which one to use first. ### Step 1: Detect Backend Run the detection script to check if the agent-usage server is running: ```bash bash SKILL_DIR/scripts/detect.sh ``` - Output `API` → use **API mode** (Step 2a) - Output `LOCAL` → use **Local mode** (Step 2b) Where `SKILL_DIR` is the directory containing this SKILL.md file. ### Step 2a: API Mode (preferred) Use `query-api.sh` to call the agent-usage REST API. This is faster and has accurate pricing data. ```bash bash SKILL_DIR/scripts/query-api.sh <command> [options] ``` Commands: | Command | Description | Key Options | |---------|-------------|-------------| | `stats` | Summary: total cost, tokens, sessions, prompts, API calls | `--from`, `--to`, `--source` | | `cost-by-model` | Cost breakdown per model | `--from`, `--to`, `--source` | | `cost-over-time` | Cost trend over time | `--from`, `--to`, `--granul