distill-memory

Distill decision rationale from snapshot files and commit blocks into approved memory entries.

4|Updated May 5, 2026
One-click install
npx skills add https://github.com/mthli/skills --skill distill-memory-mthli
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: distill-memory
Source: https://github.com/mthli/skills/tree/main/distill-memory
Command: npx skills add https://github.com/mthli/skills --skill distill-memory-mthli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

distill-memory helps capture the most valuable cross-module lessons from prior Claude Code decisions so future sessions can be more context-aware without becoming noisy or redundant.

Core Features & Use Cases

  • Cross-module memory candidates (0–3 per run): proposes only a small set of candidate memory entries drawn from .claude/decisions/**/*.md and recent MODULE:-tagged commit Decision blocks.
  • User-gated writing with strict filters: follows a pull-don’t-push workflow and avoids saving what’s derivable from current project state, git history, debugging recipes, CLAUDE.md content, or ephemeral task context.
  • Three-signal selection heuristic: prioritizes recurring patterns (3+ modules), repeated pitfalls (≥2 occurrences), and cross-module architectural constraints (single but binding rationale).

Quick Start

Run this skill by asking for it explicitly with: distill-memory.

Frequently Asked Questions about distill-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract cross-module architectural decisions from Claude Code commit history?▼

Distill cross-module architectural decisions by scanning `.claude/decisions/**/*.md` files and MODULE-tagged commit Decision blocks to propose 0–3 human-approved memory entries. This prevents noisy duplication by enforcing strict filters before writing.

What is the best way to deduplicate Claude Code memory entries across multiple modules?▼

Deduplicate Claude Code memory entries by checking candidates against existing memory slugs and topics. The distillation process uses a three-signal heuristic to prioritize recurring patterns and binding constraints while filtering out derivable or ephemeral context.

How does memory distillation decide what not to save in a multi-module project?▼

Memory distillation applies hard filters to avoid saving what is derivable from current project state, git history, debugging recipes, `CLAUDE.md` content, or ephemeral task context. Only recurring patterns, repeated pitfalls, and binding architectural constraints are selected.

Can I automatically write Claude Code memory entries without manual approval?▼

No, writing Claude Code memory entries requires explicit user approval. The workflow follows a pull-don’t-push approach, presenting 0–3 candidates per run so you can gate exactly what becomes a permanent memory entry.

When do I need cross-module memory distillation for my repository?▼

You need cross-module memory distillation when your multi-module project has Layer 2 snapshots and requires elevating cross-module patterns, recurring mistakes, or binding architectural constraints into context-aware memory for future sessions.

What limitations exist when extracting decision rationale from module snapshots?▼

Extraction is limited to `.claude/decisions/**/*.md` and an optional recent commit window. It cannot process contexts outside these sources and strictly filters out debugging recipes, existing `CLAUDE.md` content, and derivable project state.