usage-auditlisted
Install: claude install-skill Lukehle/closeloop
# Usage audit
**Measure, then optimize.** Optimizing from intuition reliably targets the wrong thing — people cut
the habit that feels wasteful rather than the one that is expensive.
This skill reads your own local session transcripts and reports numbers. It contains no advice that
is not derived from a measurement. If it cannot measure something, it says so rather than
substituting a guess.
---
## Run it
```bash
python scripts/usage_audit.py > usage.json 2>usage.err; status=$?
echo "exit=$status"; head -3 usage.err
```
Options:
```
--days N look back N days (default 7)
--project PATH audit one project namespace only
--top N how many entries per ranking (default 15)
--sessions-dir P override the transcript location
```
Exit codes: `0` report produced, `2` no transcripts found. Capture the status — per `tie-out`,
piping this into a filter throws away the signal.
---
## What it measures
All of it comes from local session transcript files, so it reflects **your** behaviour rather than
a generic profile.
| Measurement | What it tells you |
|---|---|
| **Actual tokens** — input, output, cache-read, cache-creation | Taken from each assistant message's usage block. These are real counts, not estimates |
| **Cache-read share of cacheable input** | The biggest single cost lever. A low share means early context is being invalidated or work is too spread out |
| **Tokens by model** | Whether routing is actually happening, or everything is running on on