memory-optimize

Installation
Summary

Streamline Claude Code memory files through 4 interactive optimization steps.

  • Removes duplicate entries already present in CLAUDE.md or rules files, then migrates remaining entries to appropriate persistent config locations
  • Compresses remaining memory entries using LLM-efficient formatting (prose to tables, verbose descriptions to imperatives)
  • Validates final state by checking for broken references, contradictions, and orphaned files
  • Typical reduction of 30–50% token count in memory files, lowering API costs while maintaining context across sessions
SKILL.md

Plugin: kochetkov-ma/claude-brewcode

Memory Optimizer

Optimizes Claude Code auto-memory files in 4 interactive steps: removes duplicates, migrates rules to proper config files, compresses remaining entries, validates the result. Typical reduction: 30–50% token count in memory files.

Auto-memory stores context across sessions in ~/.claude/projects/**/memory/MEMORY.md. Enable: CLAUDE_CODE_DISABLE_AUTO_MEMORY=0 · Disable: CLAUDE_CODE_DISABLE_AUTO_MEMORY=1

Benefits: faster context loading · no duplicate rules · cleaner instructions · lower API cost

Usage:

/memory-optimize          # no args — starts 4-step interactive workflow

Skill text is written for LLM consumption and optimized for token efficiency.

Related skills
Installs
1.3K
GitHub Stars
27
First Seen
Mar 1, 2026