usage
/usage
Show usage cost summary — session, today, last 30 days. OpenClaw-compatible format. Works from CLI or messaging. Triggers on /usage, /agent:usage, "cuanto gasté", "agent usage", "cost".
- Author
- crisandrews ↗
- Repository
- clawcode ↗
- Licence
- MIT
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Show usage cost summary — session, today, last 30 days. OpenClaw-compatible format. Works from CLI or messaging. Triggers on /usage, /agent:usage, "cuanto gasté", "agent usage", "cost".
Triggers from the description
Original author description
Show usage cost summary — session, today, last 30 days. OpenClaw-compatible format. Works from CLI or messaging. Triggers on /usage, /agent:usage, "cuanto gasté", "agent usage", "cost".
How it works
- Output format (matches OpenClaw exactly)
- Subcommands
- Steps
- Important
SKILL.md preview
---
name: usage
description: Show usage cost summary — session, today, last 30 days. OpenClaw-compatible format. Works from CLI or messaging. Triggers on /usage, /agent:usage, "cuanto gasté", "agent usage", "cost".
user-invocable: true
---
# /usage — Cost Summary
Show usage costs in the OpenClaw-compatible format. Works from CLI or messaging channels.
## Output format (matches OpenClaw exactly)
```
💸 Usage cost
Session <cost> · <tokens> tokens
Today <cost>
Last 30d <cost>
```
## Subcommands
- `/usage` — show the cost summary (default)
- `/usage tokens` — compact token display
- `/usage full` — verbose token + cost
- `/usage cost` — same as default
## Steps
1. **Detect surface** (CLI vs messaging channel).
2. **Try to read session cost data** from Claude Code's session store:
```bash
ls ~/.claude/projects/*/\*.jsonl 2>/dev/null | head -3
```
NOTE: Claude Code stores session data in `~/.claude/projects/<slug>/*.jsonl`. The plugin cannot reliably read these because:
- The session slug depends on the current cwd
- The format is internal to Claude Code
- Token counts per session are not always available to skills
3. **Fall back to estimate from memory/dreams**:
- Call `agent_status` MCP tool → get file/chunk counts
- Bash: `du -sh memory/ | awk '{print $1}'` → memory dir size
- Bash: `wc -l memory/.dreams/events.jsonl 2>/dev/null | awk '{print $1}'` → event count
4. **Build the response** in OpenClaw format:
### When cost data is available
```
💸 Usage cost
Session $0.42 · 125k tokens
Today $1.23
Last 30d $34.56
```
### When cost data is NOT available (most likely case)
```
💸 Usage cost
Session n/a (run native /cost or /usage in CLI for tokens)
Today n/a
Last 30d n/a
📊 Agent resources
Memory: <size>, <N> files, <M> chunks
Dreams: <events> events, <unique> unique memories
```
5. **Format per surface**:
- **CLI**: standard markdown
- **WhatsApp**: single `*bold*`
- **Telegram**: `**bold**`
6. **Reply tool** if on messaging channel.
## Important
- Claude Code does not expose session cost data to plugin skills directly.
- The honest answer is "n/a — use native /cost on CLI for real token/cost data".
- Agent resources (memory, dreams, files) ARE available and we can show them.
- This matches OpenClaw's `/usage cost` format but with the Claude Code limitation documented.
- This is the agent-aware equivalent of OpenClaw's `/usage`.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · crisandrews/clawcode | 100 | MIT |
| Canner/WrenAI | 100 | Apache-2.0 |
| stxrmik/antigravity-plus | 100 | MIT |
| astillero-ai/astillero | 100 | Apache-2.0 |
| socialwifi/kubeyard | 100 | BSD-3-Clause |
| Intenzi/hermes-butler | 85 | MIT |
Database snapshot: 13.11.2026 · package version da9034909491 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100cv-usage
Use when the user asks about usage analytics, statistics, token usage, or cost summary — e.g. 'usage stats', 'token usage', 'how many sessions this week', 'show me my numbers', 'cost summary', 'usage report - 100usage-logging
Implements structured usage logging and audit trails for cost and session tracking. Use when adding audit trails, usage analytics, or cost tracking to a skill. - 100openclaw-optimize
Audit and optimize OpenClaw token usage, cron job efficiency, and agent performance. Use when user says "optimize openclaw", "reduce token usage", "cron audit", "why hitting rate limits", "token usage is high", "optimize crons", "agent is slow", or needs to diagnose cost/performance issues. - 100model-usage
Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON. - 95claw-helper
OpenClaw 助手。解答 OpenClaw 相关问题,使用 CLI 修复问题。当用户询问 OpenClaw 使用、配置、故障排除,或需要帮助使用 OpenClaw CLI 命令时使用此技能。 - 100openrouter-usage
Query OpenRouter API costs, credits, and usage breakdown by model, provider, and date for the last 30 days. Triggers on API spending, check costs, openrouter usage, how much have I spent.