clean-memory

Deduplicates project memory files against global CLAUDE.md and promotes universal rules.

1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/psw7205/skills --skill clean-memory-psw7205
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clean-memory
Source: https://github.com/psw7205/skills/tree/main/skills/clean-memory
Command: npx skills add https://github.com/psw7205/skills --skill clean-memory-psw7205

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Over time, per-project memory files accumulate rules that duplicate the global CLAUDE.md or contain universal guidance that belongs globally, causing redundancy and inconsistent behavior across projects. ## Core Features & Use Cases - Duplicate Detection: Scans all project memory files under ~/.claude/projects and identifies entries already covered semantically by global CLAUDE.md sections. - Promotion Proposals: Classifies universal (non-project-specific) rules as promotion candidates and suggests where to merge them into CLAUDE.md or global memory. - Safe Cleanup Workflow: Reports a categorized summary (duplicate / promote / keep), waits for user approval, then deletes files, updates MEMORY.md indexes, and merges promoted rules. - Use Case: After months of sessions, run a memory audit to remove 15 redundant feedback files and consolidate three repeated git-safety rules into one global CLAUDE.md section. ## Quick Start Ask the assistant to clean up my memory files by removing duplicates of the global CLAUDE.md and promoting universal rules.

Frequently Asked Questions about clean-memory

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

FAQPage Schema
How do I clean up duplicate Claude memory files?▼

Run a memory cleanup that reads the global CLAUDE.md, scans all project memory files under ~/.claude/projects, and classifies each as duplicate, promotion candidate, or keep. Deletions and MEMORY.md index updates happen only after you approve the report.

How are memory entries classified as duplicates?▼

Classification is based on content semantics, not filename prefixes. An entry is a duplicate if its rule is already covered, even implicitly, by a CLAUDE.md section, such as treating 'do not delete untracked files' and 'never use git clean' as the same rule.

When should a project memory rule be promoted to global?▼

A rule is promoted when its content is universal rather than project-specific and is missing from CLAUDE.md. Frequency across projects is a signal, but even a single-project rule qualifies if the content is general.

Does memory cleanup delete files without confirmation?▼

No. The workflow first produces a categorized report of duplicates, promotion candidates, and preserved entries, then executes deletions and CLAUDE.md edits only after explicit user approval.

What happens to MEMORY.md after deleting memory files?▼

References to deleted files are removed from the project's MEMORY.md index, consecutive blank lines are collapsed, and if the index becomes empty it is reduced to just its header.