If your Claude Code auto-memory files are bloating with duplicates and misplaced rules, this walks you through a four-step cleanup: it finds entries already in CLAUDE.md or rules files, migrates project-specific rules out of memory into proper config locations, compresses what's left using tables and terse formatting, then validates the result. The interactive prompts let you review before each change, which matters since you're reorganizing the context Claude uses across sessions. Typical reduction is 30-50% on token count, which translates to faster loads and lower API costs. Works on the memory files in ~/.claude/projects, not your code.

skills.sh installs
1.5K
GitHub stars
39
last updated
Aug 21, 2026

Install

$ npx -y skills add kochetkov-ma/claude-brewcode --skill memory-optimize --agent claude-code

Installs into .claude/skills of the current project.

Files

If your Claude Code auto-memory files are bloating with duplicates and misplaced rules, this walks you through a four-step cleanup: it finds entries already in CLAUDE.md or rules files, migrates project-specific rules out of memory into proper config locations, compresses what's left using tables and terse formatting, then validates the result. The interactive prompts let you review before each change, which matters since you're reorganizing the context Claude uses across sessions. Typical reduction is 30-50% on token count, which translates to faster loads and lower API costs. Works on the memory files in ~/.claude/projects, not your code.

Browse the repository on GitHub

Sponsors

Details

Repository
github.com/kochetkov-ma/claude-brewcode

More from kochetkov-ma/claude-brewcode

All 3

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs