keel-distill

keel-distill is a skill for Claude Code from muratsilahtaroglu/claude-code-starter-kit. It costs 45 tokens per session (3,414 once invoked), scanned A, original, MIT.

A project-memory maintenance skill that consolidates older session notes into files such as HANDOVER.md and LESSONS.md. It archives outdated notes, keeps important facts, merges duplicates, and checks for contradictions.

In plain words
What is it for?
Use it when handover notes, lessons, or task lists exceed their intended size, or periodically to keep project memory organized.
Why use it?
It prevents project notes from growing too large, repetitive, or inconsistent. It preserves the history of completed work and failed approaches instead of deleting it without a record.

Skill for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it when handover notes, lessons, or task lists exceed their intended size, or periodically to keep project memory organized.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/muratsilahtaroglu/claude-code-starter-kit/keel-distill
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 muratsilahtaroglu/claude-code-starter-kit --skill keel-distill
Clone the repo
git clone --depth 1 https://github.com/muratsilahtaroglu/claude-code-starter-kit

Made for: Claude Code.

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 keel-distill

README.md
[![agentmods](https://agentmods.dev/badge/skills/muratsilahtaroglu/claude-code-starter-kit/keel-distill/github.svg)](https://agentmods.dev/skills/muratsilahtaroglu/claude-code-starter-kit/keel-distill)
Your own site
<a href="https://agentmods.dev/skills/muratsilahtaroglu/claude-code-starter-kit/keel-distill"><img src="https://agentmods.dev/badge/skills/muratsilahtaroglu/claude-code-starter-kit/keel-distill/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 keel-distill

Your own site · 80×15
<a href="https://agentmods.dev/skills/muratsilahtaroglu/claude-code-starter-kit/keel-distill"><img src="https://agentmods.dev/badge/skills/muratsilahtaroglu/claude-code-starter-kit/keel-distill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,414 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.
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.00045 $0.03414
Opus 5.5 $0.00018 $0.01366
Sonnet 5.5 $0.00009 $0.00683
Haiku 4.5 $0.00005 $0.00341

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

Security

Grade A, and why

keel-distill 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.

.claude/skills/keel-distill/SKILL.md · 156 lines

How it starts

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

/keel-distill — the memory consolidation ritual ("sleep" for the project)

Run when HANDOVER.md exceeds 3 session blocks / ~150 lines, when LESSONS.md exceeds ~250 or TASKS.md ~100 lines, or when any of them is over its KB cap (one long line can overflow a file that is green on lines — the SessionStart hook warns on all of these), or every ~5 sessions as hygiene — that cadence is yours to keep, the hook only detects cap overflows. Memory that is written but never reviewed degrades the project — consolidation is what keeps it useful (rules.md §9).

Propose the full plan, get user approval, then apply. Never lossy-delete. (File-TREE clutter — stray scripts, logs, dead code — is not this ritual's job: that is /keel-tidy, §3.10.)

1. Rotate HANDOVER blocks (oldest first, until ≤2 blocks AND under the line cap AND the KB cap)

For each block being rotated, triage by criticality — content-aware, not age-blind:

  • (b) Tried, didn't work → PERMANENT: distill each to one LESSONS.md [fail] line (<date> — <approach> → FAILED: <reason>. (full trace: docs/handover-archive.md, block <date>)).
  • Open questions live in HANDOVER's global section, not in blocks — leave them until resolved.
  • (a) Completed → nothing to move: git history + the archive keep it.
  • (c) Latest updates → superseded by newer blocks — nothing to promote; the verbatim archive keeps it.
  • (d) Next steps of an old block → dead (that work is done or re-planned) — no promotion.
  • Then move the WHOLE block verbatim to the TOP of docs/handover-archive.md (prepend, newest first — restorable compression: the distilled lines keep pointers back to it).

2. Consolidate LESSONS.md (write-policy: add / update / retire / promote-and-delete — never LOSSY delete)

  • Scope-triage every entry first (A/B/C/D — the LESSONS header defines the tiers): always-relevant stays; file-scoped graduates (below); a permanent domain fact → docs; superseded/closed/already- promoted → DELETE. Field measurement behind the triage: in a mature file ~52% of entries were file-scoped and any one task needed ~15% of the file — the always-on core is the minority (reports/2026-08-17-lessons-scope-audit.md).
  • Merge duplicates and near-duplicates into the stronger phrasing (keep the earliest date).
  • Start where the SessionStart hook pointed: above 70% of the cap it names the OLDEST unpromoted entries and the inflow since the last distill. Those are the triage queue — ask of each: still true → promote (below) · proven wrong → retire · resolved → delete. A file with an inflow valve and no worked exit sits at its cap forever (measured: three distills in four days, count still rising 123 → 129, not one entry ever retired).
  • Retire what proved WRONG — move the entry VERBATIM to the top of docs/lessons-retired.md with a RETIRED <date>: <what refuted it · what is true instead · evidence path> line, and leave ONE corrective line here ("believed X — measured Y → retired"). Never a SUPERSEDED stub: the original text keeps paying rent in an always-loaded file for knowledge known to be false, while the one-line correction is what stops a session re-learning it.
  • Promote what has graduated: a lesson applied 3+ times is no longer a lesson — move it into rules.md (conduct), a .claude/skills/ skill (procedure), an ADR (decision), or — for a permanent DOMAIN fact (a data quirk, an API contract) — the relevant docs (docs/architecture.md "known limitations" / a guide). A lesson CLUSTER that binds only SPECIFIC files (a must-run test after touching X, an append-only dir, a never-hand-edit generated file) becomes a path-scoped rule — .claude/rules/<name>.md with paths: frontmatter: it loads ONLY when a matching file is touched, so it is cheaper than both rules.md and this file — or a paths:-scoped SKILL (.claude/skills/<name>/SKILL.md, same paths: format) when the cluster must SURVIVE a mid-task compaction: invoked skill bodies are the one scoped mechanism re-injected after compaction (≈5k tokens/skill, 25k total, truncation keeps the TOP — put the load-bearing lines first), while a path rule waits for the next file match. Never put must-always-hold discipline in either (that stays in LESSONS tier A / rules.md). The new rule/skill is shown as its FULL text in the distill plan and lands owner-approved, written self-contained — constraint + why + check inline, evidence pointing only to permanent artifacts, never to TASKS/PLAN live state (.claude/rules/README.md "Writing discipline").
  • Promotion DELETES the LESSONS entry — lossless: the content lives in its target and git keeps the history. Never leave a "moved to X" stub (field case: 10 promoted entries left 42 lines of stubs, taxing every session). The ONE surviving pointer is a line in LESSONS ## Index (what → where → when it loads) — add or refresh it in the same pass. This is the main pressure valve on a long project's [gotcha] list: reference facts belong in docs, file-scoped stock behind its trigger — not in the always-loaded core.

Read the full file on GitHub · 156 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 Changed · +2 lines 9c9628d8a644
  2. 1mo ago Changed · +1 lines 72c98b3cb8b2
  3. 1mo ago Changed · +9 lines ca882002d604
  4. 1mo ago Changed · +9 lines d04903088f3b
  5. 2mo ago First seen · 135 lines · 45 tokens per session scan A 729e5acffa76

Subscribe to this mod's changes

keel-distill is a skill published in the GitHub repository muratsilahtaroglu/claude-code-starter-kit (9 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 3,414 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-31.

Related

Other skills, from other repositories

mem0-vercel-ai-sdk

Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also…

mem0ai/mem0 · 146 tokens

pause

Pause Mem0 memory capture on this machine. Use when the user wants to stop memories being recorded, for example for private work or experiments.

mem0ai/mem0 · 30 tokens

mine

Mine a project or conversation into your MemPalace — extract and store memories for later retrieval.

MemPalace/mempalace · 21 tokens

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

agent-carnet

Use this skill when the user asks to save, recall, find, or organize notes. Triggers on: 'remember this', 'save this', 'note this', 'what did we discuss about...', 'check the notebook', 'find in carnet'. Also use proactively when discovering findings worth preserving across sessions.

yamadashy/repomix · 67 tokens

mempalace-recall

Recall protocol for MemPalace — search the palace before answering about past work, people, projects, or prior decisions. Apply when the user asks what was decided, what happened before, who someone is, what was discussed last time, or anything that may already be filed in their memory palace; or when mempalace-recall…

MemPalace/mempalace · 94 tokens