memory-distillation

Audit Codex and Codex Lab memories and promote durable knowledge into skills, docs, or config.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI coding clients accumulate stale, duplicated, or private memories that keep influencing future sessions. This Skill audits those memory stores, classifies what is worth keeping, and retires obsolete guidance only through each client's supported update mechanism. ## Core Features & Use Cases - Scoped memory inventory: Discovers configured Codex and Codex Lab stores, deduplicates aliases, and records ownership, consumed layers, and update contracts without disk sweeps. - Classification and promotion: Routes candidates to skills, repo docs or GitHub issues, local config, or retirement, verifying each claim against maintained sources first. - Staged retirement evidence: Distinguishes requested, recorded, applied/regenerated, and retrieval-verified stages, requiring a fresh session to prove stale guidance no longer governs answers. - Use Case: A user notices Codex keeps recommending an old deployment process. They invoke this Skill to audit the memory store, propose retiring the stale claim, record an approved retirement note, and verify in a fresh session that the corrected guidance is retrieved instead. ## Quick Start Ask the agent to audit my Codex memories and propose which entries should be promoted to skills or retired from reusable context.

Frequently Asked Questions about memory-distillation

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

FAQPage Schema
How do I audit and clean up Codex memories?

Explicitly invoke the memory-distillation workflow to run a read-only inventory of configured Codex stores, classify entries as promote, keep, or retire, and receive a proposal. No edits, deletions, or notes happen until you approve the specific action and scope.

How do I retire stale AI memory that keeps influencing sessions?

Retirement uses the owning client's supported mechanism, typically an additive note requesting removal of the obsolete claim. The change is only confirmed after application evidence and a fresh-session retrieval check show the stale guidance no longer governs answers.

Does this work with both Codex and Codex Lab memory stores?

Yes, the workflow supports Codex and Codex Lab, discovering each client's configured home, consumed layers, and update contract separately. A request scoped to one client does not authorize reading or changing the other client's store.

Can it delete or edit generated memory files directly?

No. When a client only accepts additive notes, the workflow records a scoped retirement note and preserves generated registries, summaries, and skills. Direct edits, resets, or copying stores together are explicitly out of contract.

When should I not use memory distillation?

Do not use it for ordinary repository work or implicitly without an explicit memory audit request. It is also not a reset tool; a full memory reset is a separate destructive action requiring its own authorization.

How is private data handled during a memory audit?

Secrets, credentials, private hostnames, customer data, and personal details are never promoted into public skills or reports. Durable private facts are routed to approved local config, and historical archives are processed locally with sanitized outputs.