usage
Token usage tracking, cost estimation, and usage analytics
npx skills add majiayu000/claude-skill-registry --skill usage --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Usage - Complete API Reference Track token usage, estimate costs, and analyze AI consumption across sessions and users. --- ## Chat Commands ### View Usage ``` /usage Current session usage /usage today Today's total usage /usage week This week's usage /usage month This month's usage ``` ### Detailed Breakdown ``` /usage breakdown [today] Cost breakdown by model /usage by-model Usage by AI model (alias) /usage by-user Usage by user /usage history [days] Historical usage (default 7 days) /usage estimate <model> <in> <out> Estimate cost for tokens /usage user <id> [today] User-specific usage ``` ### Management ``` /usage reset Clear all usage data ``` --- ## TypeScript API Reference ### Create Usage Service ```typescript import { createUsageService } from 'clodds/usage'; const usage = createUsageService({ // Storage storage: 'sqlite', // 'sqlite' | 'postgres' | 'memory' dbPath: './usage.db', // Pricing (per 1M tokens) pricing: { 'claude-3-opus': { input: 15.00, output: 75.00 }, 'claude-3-sonnet': { input: 3.00, output: 15.00 }, 'claude-3-haiku': { input: 0.25, output: 1.25 }, 'gpt-4': { input: 30.00, output: 60.00 }, 'gpt-4o': { input: 5.00, output: 15.00 }, }, // Footer mode footer
- Chat Commands
- View Usage
- Detailed Breakdown
- Management
- TypeScript API Reference
- Create Usage Service
- Record Usage
- Get Session Usage
- Get User Usage
- Get Total Usage
- Usage by Model
- Format Footer
- Format Summary
- Estimate Cost
What does the usage skill do?
Token usage tracking, cost estimation, and usage analytics
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill usage --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
