distill

distill is a skill for Claude Code from Kastalien-Research/thoughtbox. It costs 32 tokens per session (659 once invoked), scanned A, original, MIT.

A method for turning past project decisions and results into reusable principles and decision rules.

In plain words
What is it for?
Use it after major work sessions or milestones to review history and code patterns, then record actionable tactical, strategic, or philosophical principles.
Why use it?
Important lessons can be lost in code, commit history, or personal memory. Reviewing what happened helps identify practices that repeatedly worked or failed.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: installed under .agents/ (shared by several agents); mentions Codex.

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.

agentmods
npx agentmods add skills/kastalien-research/thoughtbox/distill
Any agent
npx skills add Kastalien-Research/thoughtbox --skill distill
Clone the repo
git clone --depth 1 https://github.com/Kastalien-Research/thoughtbox

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 distill

README.md
[![agentmods](https://agentmods.dev/badge/skills/kastalien-research/thoughtbox/distill.svg)](https://agentmods.dev/skills/kastalien-research/thoughtbox/distill)
Your own site
<a href="https://agentmods.dev/skills/kastalien-research/thoughtbox/distill"><img src="https://agentmods.dev/badge/skills/kastalien-research/thoughtbox/distill.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 659 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00032 $0.00659
Opus 5 $0.00016 $0.00329
Sonnet 5 $0.00006 $0.00132
Haiku 4.5 $0.00003 $0.00066

Measured 6d ago against content hash 748cbb393ed1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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 6d 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.

.agents/skills/distill/SKILL.md · 90 lines

How it starts

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

Distill wisdom from experience in this area: $ARGUMENTS

Process

1. Experience Inventory

Gather evidence of past decisions and outcomes:

  • Read recent git history (git log --oneline -20)
  • Review agent memory and learnings
  • Check .Codex/rules/ for existing principles
  • Look at code patterns in the codebase

2. Pattern Extraction

For each significant decision or outcome:

  • What was decided? (the choice made)
  • What was the context? (constraints, information available)
  • What happened? (outcome, downstream effects)
  • Was it the right call? (with hindsight)

Look for:

  • Success patterns — conditions that consistently lead to good outcomes
  • Failure patterns — early warning signs of bad paths
  • Evolution patterns — how thinking has changed over time

3. Principle Abstraction

Distill patterns into principles at the right abstraction level:

Level Example
Tactical "Always run tests before committing database migrations"
Strategic "Prefer reversible changes over irreversible ones"
Philosophical "Optimize for time-to-signal, not time-to-completion"

A good principle is:

  • Actionable — you can act on it right now
  • Falsifiable — you can identify situations where it doesn't apply
  • Bounded — it states when it applies, not just what to do

4. Validation

Check each principle against past experience:

  • Does it explain observed outcomes?
  • Are there counter-examples?
  • Under what conditions does it break?

5. Storage

Write validated principles to the appropriate location:

  • Project-wide: .Codex/rules/ as a new or updated rule file
  • Agent-specific: Agent memory
  • Session-specific: MEMORY.md

Tag with freshness: HOT (just validated) | WARM (reasonable but not recently tested) | COLD (theoretical)

6. Output

## Distillation: [Domain]

### Evidence Base
- [N decisions/outcomes reviewed]
- [Key sources consulted]

### Principles Extracted

#### [Principle Name]
- **Statement**: [Clear, actionable principle]
- **Level**: tactical | strategic | philosophical
- **Evidence**: [What experience supports this]
- **Boundary**: [When this does NOT apply]
- **Freshness**: HOT | WARM | COLD
- **Stored in**: [where it was written]

### Principles Updated
- [Any existing principles promoted, demoted, or retired]

### Open Questions
- [What we still don't know]

Read the full file on GitHub · 90 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. 6d ago First seen · 90 lines · 32 tokens per session scan A 748cbb393ed1

Subscribe to this mod's changes

distill is a skill published in the GitHub repository Kastalien-Research/thoughtbox (64 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 659 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

forget

Delete specific observations from agentmemory after showing them and getting explicit confirmation. Use when the user says "forget this", "delete memory", "remove that note", or wants to scrub specific data for privacy.

rohitg00/agentmemory · 43 tokens

handoff

Resume the most recent agent session for the current working directory, leading with any unanswered question. Use when the user says "where were we", "resume", "handoff", "pick up where I left off", or starts a session with no fresh context.

rohitg00/agentmemory · 55 tokens

agentmemory-hooks

The agentmemory plugin hooks that capture observations automatically across the agent session lifecycle. Use when explaining how memory gets captured without manual saves, when debugging missing observations, or when tuning what gets recorded.

rohitg00/agentmemory · 42 tokens

session-history

Show what happened in recent past sessions on this project as a clean timeline. Use when the user asks "what did we do last time", "session history", "past sessions", or wants an overview of previous work.

rohitg00/agentmemory · 47 tokens

agentmemory-agents

How agentmemory wires into host coding agents via the connect command. Use when installing agentmemory into a specific agent, when asked which agents are supported, or when a connect adapter writes the wrong config path.

rohitg00/agentmemory · 46 tokens

agentmemory-config

Skill "agentmemory-config" from rohitg00/agentmemory, covering quick start, defaults worth knowing, ports, see also and reference.

rohitg00/agentmemory · 44 tokens