claude-usage-mininglisted
Install: claude install-skill 2016judea/brick-mortar-skills
# Reading Claude Code's own local state
Everything Claude Code knows about how you work is on this machine in
plain JSONL. This skill is the map, and the list of things that silently lie.
## THE FIRST RULE: check retention before promising a longitudinal read
`cleanupPeriodDays` defaults to **30** when unset, and a sweep runs at startup.
python3 -c "import json,os;print(json.load(open(os.path.expanduser('~/.claude/settings.json'))).get('cleanupPeriodDays','UNSET -> 30'))"
**Why this is rule one:** with the default, anything older than a month is
already permanently deleted, and you usually discover it only when someone asks
for "a year of usage." If history matters, set `cleanupPeriodDays` high (e.g.
36500) and keep an rsync mirror (e.g. `~/.claude-archive/transcripts/`). Never
assume local history predates the day retention was raised.
## Where things are
~/.claude/projects/<slug>/<uuid>.jsonl MAIN sessions
~/.claude/projects/<slug>/<uuid>/subagents/*.jsonl SUBAGENT transcripts
~/.claude/projects/<slug>/<uuid>/tool-results/ large tool payloads
~/.claude-archive/transcripts/ the mirror (never swept)
~/.claude/settings.json permissions, hooks, env
~/.claude.json account, machine, caches
`<slug>` is the cwd with `/` → `-`, e.g. `-home-you-code-myrepo`.
**TRAP 1 — subagent transcripts are not sessions.** A naive
`glob("**/*.jso