distill

distill is a skill for Claude Code, Codex from gapmiss/claude-sessions. It costs 89 tokens per session (1,128 once invoked), scanned A, original, MIT.

A command workflow that turns the current Claude Code session into a structured note for Obsidian, a note-taking app, with searchable YAML metadata.

In plain words
What is it for?
Use it when wrapping up a coding session, saving an archive note, or recording the files changed, decisions made, and important findings.
Why use it?
It preserves the session's decisions, lessons, and work details so they are easier to find later.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it when wrapping up a coding session, saving an archive note, or recording the files changed, decisions made, and important findings.

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

Made for: Claude Code, Codex.

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/gapmiss/claude-sessions/distill.svg)](https://agentmods.dev/skills/gapmiss/claude-sessions/distill)
Your own site
<a href="https://agentmods.dev/skills/gapmiss/claude-sessions/distill"><img src="https://agentmods.dev/badge/skills/gapmiss/claude-sessions/distill.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,128 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.00089 $0.01128
Opus 5 $0.00044 $0.00564
Sonnet 5 $0.00018 $0.00226
Haiku 4.5 $0.00009 $0.00113

Measured 8d ago against content hash b2bc1bdc910e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 8d 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.

skills/distill/SKILL.md · 123 lines

How it starts

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

/distill — Live Session Distillation

Distill the current Claude Code session into a structured Obsidian note with queryable frontmatter.

CRITICAL: Output the markdown content directly in your text response. Do NOT use Write, Edit, or any file-writing tools. The user will copy the output themselves.

Workflow

  1. Gather metadata — extract session_id, cwd, git branch, model, start time, token counts, cost, tool usage, and files touched from what is already visible in the conversation (system reminders, git status, prior tool results). Do NOT run Bash or other tools to fetch metadata — use fallbacks for anything unavailable.
  2. Classify session type — review the conversation and assign one or more types from the vocabulary below.
  3. Synthesize content — extract key decisions (with reasoning), non-obvious learnings, and the most important exchanges from the full conversation.
  4. Write output — output the markdown content directly in your response (NOT using Write or Edit tools). Include the suggested filename per the naming convention.
  5. Validate output — verify the YAML frontmatter parses correctly and all required fields are present before finalizing. Confirm session_id, schema_version, project, cwd, and source_path are populated; check that session_type contains at least one valid vocabulary term.

Handling Missing Metadata

When a metadata field cannot be determined, apply the following fallbacks rather than omitting the field:

Field Fallback value
session_id "unknown"
branch "unknown"
source_path "unknown"
cost_usd 0
context_tokens / input_tokens / output_tokens / cache_read_tokens 0
duration_min 0
error_count 0
tools_used []
files_touched (omit field)
title (omit field)

If start_time is unavailable, use the current timestamp and note it is approximate.

Output Format

Write a single markdown file to stdout with this exact structure:

Read the full file on GitHub · 123 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. 8d ago First seen · 123 lines · 89 tokens per session scan A b2bc1bdc910e

Subscribe to this mod's changes

distill is a skill published in the GitHub repository gapmiss/claude-sessions (5 stars, last pushed 10d ago), licensed MIT. It adds 89 tokens to every session and 1,128 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.

Related

Other skills, from other repositories