/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".
$ npx -y skills add crisandrews/ClawCode --skill usage --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/usage
Context preview
The summary Claude sees to decide when to auto-load this skill.
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".
SKILL.md
usage.SKILL.mdname: 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:
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`.
Read more
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:
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`.
Persistent agents for Claude Code as a plugin, not a harness. Memory, personality, messaging across WhatsApp, Telegram, and Discord, plus a service mode for 24/7 runs. Imports from OpenClaw.
Repo: crisandrews/ClawCode
Other skills on crisandrews-agent.
- /about
Show the plugin source — name, version, and repo URL. Works from CLI or messaging. Triggers on /about, /version, /agent:about, /agent:version, "qué versión", "what version", "about the plugin", "about clawcode".
Open skill - /channels
Show messaging channel status (WhatsApp, Telegram, Discord, iMessage, Slack, Fakechat) and the launch command to load them. Triggers on /agent:channels, /agent:channels list, /agent:channels status, /agent:channels launch, "ver canales", "estado de canales", "cómo lanzo con
Open skill - /compact
Flush important session context to daily log (manual memory flush). Does NOT invoke native /compact. Triggers on /compact, /agent:compact, /flush, "guarda memoria", "flush".
Open skill - /create
Create a new agent in the current directory with personality files and bootstrap ritual. Triggers on /agent:create, "crear agente", "nuevo agente", "new agent", "create agent".
Open skill - /crons
Manage scheduled reminders (crons) — list, add, delete, pause, resume, reconcile, or import from OpenClaw. Triggers on /agent:crons, /agent:reminders; listing ("list reminders", "show crons", "recordatorios", "mis crons", "mis recordatorios"); creating from natural language via
Open skill - /doctor
Run diagnostic checks on the agent workspace. Triggers on /agent:doctor, "diagnóstico", "diagnostico", "doctor", "health check", "agent health", "checkup", "revisar agente", "agent broken", "fix agent", "revisa el agente".
Open skill

