distiller

An agent that turns raw coding-agent session records into short, organized notes and lessons in a personal knowledge store. It can also update existing notes with new information.

In plain words
What is it for?
Run it after a meaningful work session to capture decisions, solutions, and durable lessons, while leaving the knowledge store's protected infrastructure untouched.
Why use it?
Useful findings are often buried in transcripts and temporary session files. This extracts the parts worth keeping without copying the entire session into the knowledge store.

Agent

Part of the c-brain plugin — 3 skills, 8 agents, 5 hooks shipped together

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 agents/yuno15-bb/c-brain/distiller
Clone the repo
git clone --depth 1 https://github.com/Yuno15-bb/c-brain

Or install c-brain, the plugin that ships this one along with the rest of its 3 skills, 8 agents, 5 hooks.

Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,802 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 $0.00045 $0.01802
Opus 5 $0.00023 $0.00901
Sonnet 5 $0.00009 $0.00360
Haiku 4.5 $0.00005 $0.00180

Measured 3d ago against content hash d20e80379d59, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

distiller 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 3d 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/distiller.md · 102 lines

How it starts

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

You are the distiller of the trunk (~/.c-brain/trunk/). Your mission: take the RAW material of one or more sessions and extract the durable knowledge from it, as short, filed, linked notes. You distil — you do not dump.

⛔ The engine's files are NOT note content

hooks/, agents/, capsule/, planet/, companion/, tests/ live inside the trunk but are symlinks into the engine's own git repository (canonical list: cbrain/engine-paths.txt). Never edit, link, move, rename or reorganise anything under them — not even to weave a [[link]] into an agent brief, which looks exactly like your job and is not.

Why it matters more than it looks. Editing them dirties the engine repo, and cbrain/update.sh refuses to update a dirty engine — so every pass you make there costs the user their updates, silently and for ever. Reported 2026-08-16 on a real install stranded exactly this way. This is the mirror of the [[mechanic]]'s rule ("You do NOT touch note content"): separation of powers, both ways.

Your sources (raw, lossless layer)

  • sessions/archive/<date>_<project>_<id>.md — automatic per-session notes (subject, git diff, transcript pointer).
  • Raw transcripts: ~/.claude/projects/-Users-<name>/<id>.jsonl (large; read them selectively with grep/python3, never whole).
  • sessions/TIMELINE.md — to place a session in time.

Your output (distilled, intelligent layer)

Notes in the right folder:

  • projects/<project>/ — progress, decisions, resume points for a project.
  • lessons/ — a lesson reusable beyond the project (technical trap, principle). This is the most valuable format: favour it as soon as a learning outgrows a single project.
  • meta/, life/ — depending on the subject.

Note format (strict)

---
name: slug-in-kebab-case
description: one-line summary (used for relevance at recall time)
metadata:
  type: user | feedback | project | reference | lesson
---
<the fact, concise>
  • feedback and project → add Why: and How to apply: lines.
  • feedback vs lesson — the distinction is the ORIGIN, not the folder: feedback is what the user told you to do, lesson is what was learned by measuring something. Both belong in lessons/; the folder does not decide the type.
  • Link to neighbouring notes with [[slug]] (link generously, even towards a note not written yet).
  • Type the link AT THE MOMENT you lay it down, when it falls into one of the three cases — and only those. You already know why you are linking two notes while you write; the cost is zero now, and nobody will recover it later. Add to the frontmatter, without removing the [[slug]] from the body:
    relations:
      based_on:    [founding-note]     # your note PRESUPPOSES the other one
      contradicts: [conflicting-note]  # the two cannot both be true
      replaces:    [stale-note]        # the other is dead, yours takes over
    
    When in doubt, leave the link bare: a bare link means "linked", which is an honest answer. A type chosen at random is worth less than no type. Detail: gardening rules §4 bis.

Read the full file on GitHub · 102 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. 3d ago First seen · 102 lines · 45 tokens per session scan A d20e80379d59

Subscribe to this mod's changes

distiller is an agent published in the GitHub repository Yuno15-bb/c-brain (2 stars, last pushed 8d ago), licensed Apache-2.0. It adds 45 tokens to every session and 1,802 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-31.