usage

usage is a skill for Claude Code from crisandrews/ClawCode. It costs 52 tokens per session (667 once invoked), scanned A, original, MIT.

A usage-summary command for viewing estimated agent costs and token use for the current session, today, and the past 30 days.

In plain words
What is it for?
Use it from the command line or a messaging channel with commands such as /usage, /usage tokens, or /usage full.
Why use it?
It gives you one place to check how much agent work has been used when detailed session records are unavailable.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

Part of the agent plugin — 21 skills, 10 hooks, 1 MCP server shipped together

Good fit Use it from the command line or a messaging channel with commands such as /usage, /usage tokens, or /usage full.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/crisandrews/clawcode/usage
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add crisandrews/ClawCode --skill usage
Clone the repo
git clone --depth 1 https://github.com/crisandrews/ClawCode

Made for: Claude Code.

Or install agent, the plugin that ships this one along with the rest of its 21 skills, 10 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for usage

README.md
[![agentmods](https://agentmods.dev/badge/skills/crisandrews/clawcode/usage/github.svg)](https://agentmods.dev/skills/crisandrews/clawcode/usage)
Your own site
<a href="https://agentmods.dev/skills/crisandrews/clawcode/usage"><img src="https://agentmods.dev/badge/skills/crisandrews/clawcode/usage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for usage

Your own site · 80×15
<a href="https://agentmods.dev/skills/crisandrews/clawcode/usage"><img src="https://agentmods.dev/badge/skills/crisandrews/clawcode/usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 667 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00667
Opus 5.5 $0.00021 $0.00267
Sonnet 5.5 $0.00010 $0.00133
Haiku 4.5 $0.00005 $0.00067

Measured 1mo ago against content hash 0fec1abcb662, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

usage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/usage/SKILL.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/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
  1. Format per surface:

    • CLI: standard markdown
    • WhatsApp: single *bold*
    • Telegram: **bold**
  2. 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 the full file on GitHub · 82 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 82 lines · 52 tokens per session scan A 0fec1abcb662

Subscribe to this mod's changes

usage is a skill published in the GitHub repository crisandrews/ClawCode (63 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 667 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.