Skip to content
Skill

Memory distill

Turns logged corrections and failed checks into proposed memory, hook and rule updates

Memory distill is an open-source agent skill for knowledge and memory. It is available on Claude Code, Cursor and Codex.

Scripts
None
Platforms
Claude Code, Cursor, Codex
GitHub stars
7
Last commit
License
MIT
Listing updated

Similar skills

About Memory distill

Memory distill reviews the signals an agent collects over time, including a correction log written by a hook, a failed-check log, lessons taken from accepted review comments, and overruled decisions. It groups recurring themes, requires at least two independent occurrences or one explicit standing instruction, and discards one-off fixes and anything already covered by existing instructions or code style guides.

For each surviving theme the skill proposes a destination, such as a memory file, a path or lint rule, a hook or deny rule, a skill gotcha, an eval task or a precedent, and records the reason behind it. Nothing is written until the user approves a numbered list. Approved memories follow a one-fact-per-file format with a type, a why and a how-to-apply line, and the consumed log lines are archived afterward.

The skill expects the ai-work and ai-decisions command-line tools and a per-project memory folder under the Claude Code configuration directory. It is written in Markdown with bash snippets and is intended to run periodically rather than at the end of every session.

When your agent uses it

Turn logged correction signals into durable memory files. Reads the correction log (written automatically by the log-correction-signal hook in Claude Code, Cursor and Codex whenever Marco corrects the assistant or states a preference), plus the failed-check log, lessons from accepted review comments and overruled decisions, groups recurring themes, and proposes a memory, hook, rule, eval or skill gotcha for each, for approval. Invoke when the user says "distill memory", "update your memory", "what have you learned", or after a stretch of work where preferences came up.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (8 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/memory-distill to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/memory-distill &&
cp -R "$tmp/skills/memory-distill" ~/.claude/skills/memory-distill &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/memory-distill inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/memory-distill to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/memory-distill &&
cp -R "$tmp/skills/memory-distill" ~/.agents/skills/memory-distill &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/memory-distill inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/memory-distill to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/memory-distill &&
cp -R "$tmp/skills/memory-distill" ~/.cursor/skills/memory-distill &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/memory-distill inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/tonyghiani/ai-essentials.git --path skills/memory-distill

Or copy the folder to ~/.gemini/skills/memory-distill yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/memory-distill:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/memory-distill &&
cp -R "$tmp/skills/memory-distill" ~/.copilot/skills/memory-distill &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/memory-distill inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git

Then copy ai-essentials/skills/memory-distill into your agent's skills folder as memory-distill. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Correction log review
Reads prompts where the user corrected behaviour or stated a preference and clusters them into themes.
Multi-source signal intake
Also draws on failed checks, accepted review lessons, learning notes and overruled decisions.
Approval-based proposals
Presents each candidate with its claim, reason, evidence and destination before anything is written.
Destination matching
Maps each theme to the cheapest enforcing place, such as a memory, lint rule, hook or skill gotcha.
Memory file formatting
Writes approved memories as one fact per file with frontmatter, a reason and a usage trigger.
Log archiving
Archives consumed signal lines so the next distillation run starts from a clean log.

Good for

  • Review recent corrections and propose memory updates
  • Find repeated check failures that should become lint or eval rules
  • Turn accepted review comments into durable project guidance
  • Summarise what the assistant has learned from recent preferences

Memory distill FAQ

When does Memory distill trigger?

When the user says distill memory, update your memory, or what have you learned, or after a stretch of work where preferences came up.

Does Memory distill write memories automatically?

No. It proposes candidates with a destination and writes only the ones the user approves.

Which clients does Memory distill support?

The content ties it to Claude Code, Cursor and Codex through the correction log hook, and it relies on Claude Code's memory folder.

What does Memory distill need to run?

It calls the ai-work and ai-decisions command-line tools and reads a per-project memory directory.

How do I install Memory distill in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/memory-distill to use it in all your projects, or to .claude/skills/memory-distill in one project.

Does Memory distill run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Memory distill?

Claude Code, Cursor and Codex. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Memory distill?

The closest alternatives to Memory distill are Compound memory, Memory review, Memory audit, Vibe reflect and compound and Record bug fix memory.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from tonyghiani/ai-essentials

  1. Lets an agent read your GitHub queue at day's end and draft a morning triage report

    • Open source
    • 7 GitHub stars
    • Developer tools
  2. Finds untranslated UI strings and i18n patterns that break translation in code

    • Open source
    • 7 GitHub stars
    • Developer tools
  3. Writes pull request descriptions from a fixed summary, screenshots and testing template

    • Open source
    • 7 GitHub stars
    • Developer tools
  4. Guides an agent through resolving merge conflicts by intent, then verifying and pushing

    • Open source
    • 7 GitHub stars
    • Developer tools
  5. Triages PR review comments, then implements, replies to and resolves them

    • Open source
    • 7 GitHub stars
    • Developer tools
  6. Guides the agent through a test-first loop: failing test, then minimal implementation

    • Open source
    • 7 GitHub stars
    • Developer tools