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.
npx skills add betayyang/claude-habit-distiller --skill distill-habitsgit clone --depth 1 https://github.com/betayyang/claude-habit-distillerWrote 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.
[](https://agentmods.dev/skills/betayyang/claude-habit-distiller/distill-habits)<a href="https://agentmods.dev/skills/betayyang/claude-habit-distiller/distill-habits"><img src="https://agentmods.dev/badge/skills/betayyang/claude-habit-distiller/distill-habits/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.
<a href="https://agentmods.dev/skills/betayyang/claude-habit-distiller/distill-habits"><img src="https://agentmods.dev/badge/skills/betayyang/claude-habit-distiller/distill-habits.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00087 | $0.02847 |
| Opus 5 | $0.00044 | $0.01424 |
| Sonnet 5 | $0.00017 | $0.00569 |
| Haiku 4.5 | $0.00009 | $0.00285 |
Grade A, and why
distill-habits 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.
distill-habits — automatic habit distillation
Goal: extract the stable habits / preferences / feedback a user shows across sessions and turn them into a long-term asset, so every future conversation starts out knowing them. One-off task details are not distilled — only reusable patterns.
Two layers (keep the responsibilities separate)
| Layer | Location | How it loads | What belongs here |
|---|---|---|---|
| Execution | the sentinel block in ~/.claude/CLAUDE.md |
loaded in full on every single turn — has a hard character budget | The imperative. The one sentence the AI should just follow. |
| Ledger | memory_dir (see below) |
read on demand, never auto-loaded | The Why, raw evidence, cases, dates, numbers, superseded conclusions, how a belief evolved |
Core invariant: evidence, cases, dates and specific numbers live in the ledger only. If they show up in the execution layer, that is the signal to push them down.
Why the ledger is not under
projects/<slug>/memory/: Claude Code isolates that directory per project directory. If a user works in git worktrees or multiple checkouts — most people do — every new working directory gets a fresh, empty memory dir, and everything ever distilled becomes unreadable. The ledger must live at a single fixed path instead.
Paths and config
Config is read from ~/.config/claude-habit-distiller/config.toml (or ./config.toml), falling back to the built-in defaults.
- Conversation transcripts:
~/.claude/projects/<project-dir>/*.jsonl(one file per session, across all projects) - User input history:
~/.claude/history.jsonl(each line hasdisplay/timestamp(ms) /project/sessionId) - Habit ledger:
memory_dir. When"auto", use~/.claude/knowledge/habits/, withINDEX.mdas its index. Do not resolve"auto"to a per-project memory dir — see the note above. - Execution layer: the sentinel-managed region in
~/.claude/CLAUDE.md - Last-run timestamp:
<skill-dir>/.last-run(Unix seconds; if absent, look backwindow_days) - Audit cursor:
<skill-dir>/.last-audit
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago Changed · +55 lines · +6 tokens per session 258cc6400ef0
- 12d ago First seen · 121 lines · 81 tokens per session scan A e66d5dad4ec6
distill-habits is a skill published in the GitHub repository betayyang/claude-habit-distiller (2 stars, last pushed 7d ago), licensed MIT. It adds 87 tokens to every session and 2,847 once invoked, about $0.0004 per session on Opus 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-31.
Other skills, from other repositories
takenotes
Saves durable knowledge into permanent storage — typed memory, CLAUDE.md, or a docs/ file — and corrects anything already stored that has gone stale. Handles both a single fact and a whole-session harvest. Use when the user says "takenotes", asks you to remember or record something, asks you to save what was learned…
putdown
Writes a session handoff file that a fresh Claude Code session reads via /pickup, harvests durable knowledge into memory and CLAUDE.md (via /takenotes when installed), then commits and pushes all session work. Use when the user says "putdown", when ending or stepping away from a working session, or when the context…
pickup
Loads the most recent putdown handoff file for the current project and primes the session with full prior context. Use when the user says "pickup", asks "where were we" after opening a fresh window, or wants to resume work from a prior session that ended with /putdown. Do NOT use for reopening a previous Claude…
shipkit-work-memory
Log session progress and save resume state. Infers from conversation and git. Triggers: 'log progress', 'session summary', 'checkpoint', 'save progress', 'end session'.
shipkit-claude-md
Update CLAUDE.md with learnings, preferences, or project context. Use when user says "update claude.md", "add to claude.md", or wants to persist something.
init-project-memory
Use when the user says "init memory", "set up memory", "scaffold memory", "init project memory", or invokes /init-project-memory — creates the .claude/ session memory system in a new project.