memory-compaction — Claude Code skill: compacting memory files
memory-compaction is a Claude Code skill that shortens and cleans up bloated memory.md files. It triggers automatically when limits are exceeded or upon user request.
no license ★ 285 updated 2026-11-17
npx skills add makushingu/harness-maxxing --skill memory-compaction -a claude-codeWhat memory-compaction does
This skill scans project memory.md files for outdated facts, duplicates, and redundant entries. It performs content summarization while enforcing a consistent structure with sections for rules, current state, and decisions. It ensures essential project context and commands remain while reducing line counts and file weight.
The tool restricts modifications exclusively to memory files, avoiding code or config files. It integrates with Git, allowing users to restore previous versions if necessary using maxxing-backup. It applies a default limit of 200 lines and 20 KB per file to maintain optimal context management.
What it helps with
- remove memory file duplicates
- shrink bloated memory.md files
- resolve contradictory facts
- reorganize context history
Example prompts for the agent
- Clean up my project memory files
- memory-compaction: shorten long memory files
- remove duplicates from memory.md
How to install memory-compaction
1Skills CLI (Vercel)
npx skills add makushingu/harness-maxxing --skill memory-compaction -a claude-code2Manually: put the files in place
~/.claude/skills/memory-compaction/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/memory-compaction/
1Skills CLI (Vercel)
npx skills add makushingu/harness-maxxing --skill memory-compaction -a codex2Manually: put the files in place
.agents/skills/memory-compaction/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add makushingu/harness-maxxing --skill memory-compaction -a cursor2Manually: put the files in place
.cursor/skills/memory-compaction/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install makushingu/harness-maxxing skills/memory-compaction2Manually: put the files in place
.github/skills/memory-compaction/SKILL.md1Skills CLI (Vercel)
npx skills add makushingu/harness-maxxing --skill memory-compaction -a gemini-cli2Platform CLI
gemini skills install https://github.com/makushingu/harness-maxxing --path skills/memory-compactionManually: put the files in place
.devin/skills/memory-compaction/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about memory-compaction
How to install memory-compaction in Claude Code?
Run npx skills add makushingu/harness-maxxing --skill memory-compaction -a claude-code. Afterward, verify the setup by checking ~/.claude/skills/memory-compaction/SKILL.md.
What does memory-compaction do?
It identifies bloated memory.md files, removes duplicates and outdated information, and standardizes the document structure.
What are the requirements for memory-compaction?
Git must be installed on your system, as the skill utilizes it for creating backups and restoring previous versions of memory files.