Back to Skills

condense

verified

Deduplicate and consolidate CLAUDE.md memory files. Trigger when user says "condense my CLAUDE.md files", "deduplicate CLAUDE.md", "clean up my memory files", or "consolidate my instructions". Removes redundancy within files and across the file hierarchy.

View on GitHub

Marketplace

robbyt-claude-skills

robbyt/claude-skills

Plugin

claude-md

Repository

robbyt/claude-skills
38stars

plugins/claude-md/skills/condense/SKILL.md

Last Verified

January 15, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/robbyt/claude-skills/blob/main/plugins/claude-md/skills/condense/SKILL.md -a claude-code --skill condense

Installation paths:

Claude
.claude/skills/condense/
Powered by add-skill CLI

Instructions

# CLAUDE.md Condensation

Deduplicate and consolidate CLAUDE.md memory files to remove redundancy.

## Workflow

### Phase 1: Discovery

**Find all CLAUDE.md files:**
```bash
python ../reflect/scripts/find_claude_md.py
```

**Read all discovered files and analyze for:**
1. Intra-file duplication (same instruction repeated within a file)
2. Cross-file duplication (same instruction in multiple files)
3. Misplaced instructions (subdirectory files containing project-wide content)

### Phase 2: Analysis

**Intra-file duplication:**
- Identify repeated bullet points or instructions
- Find semantically similar content (different wording, same meaning)

**Cross-file duplication:**
- Root CLAUDE.md should contain project-wide instructions
- Subdirectory CLAUDE.md should only contain directory-specific instructions
- If an instruction appears in both root and subdirectory, keep only in root
- If an instruction in subdirectory applies to whole project, move to root

**Misplaced instructions:**
- Subdirectory file contains instructions that apply project-wide → move to root
- Root file contains instructions only relevant to one directory → move to subdirectory

### Phase 3: Interaction

Present findings using AskUserQuestion with checkboxes.

**For each issue found:**
1. Show the duplicated or misplaced content
2. Identify which files are affected
3. Propose the consolidation (delete, move, or merge)

**Example:**
```
Issue: "Use 2-space indentation" appears in both ./CLAUDE.md and ./src/CLAUDE.md
Proposal: Remove from ./src/CLAUDE.md (already covered by root)
```

Wait for user approval before implementing.

### Phase 4: Implementation

For approved changes:

1. **Remove duplicates** - Delete redundant entries, keeping the most appropriate location
2. **Move misplaced content** - Transfer instructions to correct hierarchy level
3. **Merge similar items** - Combine semantically similar instructions into one

**Hierarchy rules:**
- `./CLAUDE.md` - Project-wide instructions (high

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2543 chars