memory-compact
Skill1 starsChanged 8 months agoMITView on GitHub
Restructure MEMORY.md into directory-based format to reduce token consumption. Split detailed memories into memory/details/, create directory index, generate Start_Memory.md, and update BOOTSTRAP.md/AGENTS.md. Provides examples in docs/ for manual execution.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- anthony-chaudhary/faktheir own version, first seen Nov 3, 2026
- whinc/super-skillstheir own version, first seen Oct 18, 2026
- GlassOnTin/claude-memory-skillstheir own version, first seen Oct 14, 2026
- dewil/ai-toolkittheir own version, first seen Aug 25, 2026
- dewil/claude-toolkittheir own version, first seen Aug 25, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- anthony-chaudhary/fak★ 47same name
- whinc/super-skills★ 40same name
- dewil/ai-toolkit★ 9same name
- dewil/claude-toolkit★ 9same name
- GlassOnTin/claude-memory-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. 0 are common, 14 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
14
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Always backup before modification.
- Distinctive: line 48
Use relative paths for cross-references if needed
- Very specific: line 51
Create directory index following docs/MEMORY.md format
- Very specific: line 53
Use relative paths: ./details/{title}.md
- Very specific: line 57
Create essential startup info following docs/Start_Memory.md format
- Very specific: line 58
CRITICAL: Must include three mandatory sections (see docs/Start_Memory.md for details):
- Very specific: line 65
Add conversation notice from docs/BOOTSTRAP_ADD.md
- Distinctive: line 66
Place where Agent reads at startup
- Distinctive: line 71
Document memory query flow and Memory_Search usage
- Distinctive: line 74
Check directory structure is correct
- Distinctive: line 75
Verify MEMORY.md format and links work
- Distinctive: line 76
Ensure detail files are complete
- Distinctive: line 77
Test Memory_Search can find and retrieve details
- Very specific: line 88
When the workspace also uses a self-improvement / .learnings/ workflow:
- Very specific: line 90
Treat .learnings/ as a staging area for raw corrections, failures, and feature requests
- Very specific: line 92
Keep MEMORY.md index-only even when promoting learnings.
- Very specific: line 94
Use memory/YYYY-MM-DD.md for daily capture first when information is still fresh or uncurated
- Very specific: line 98
Preserve daily memories: Do not modify memory/YYYY-MM-DD.md files
- Distinctive: line 99
Backup first: Always copy MEMORY.md before changes
- Very specific: line 101
Relative paths: Use ./ paths for portability across workspaces
- Distinctive: line 102
Complete migration: Ensure all important info is moved, nothing lost
- Distinctive: line 103
Test thoroughly: Verify Memory_Search works with new structure
- Very specific: line 104
Memory storage rule: All future memories MUST follow the details-based storage method - MEMORY.md stores only directory index (title + …
- Distinctive: line 119
New conversation starts: Read BOOTSTRAP.md → Read Start_Memory.md → Greet user
- Distinctive: line 120
User gives command: Use Memory_Search to find relevant memories
- Distinctive: line 121
If found: Read detailed document at referenced path
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Memory Compact
Optimize MEMORY.md into a directory-based structure to reduce token consumption in new conversations.
Why This Matters
New conversations load the entire MEMORY.md by default. By splitting into a lightweight index + detailed files, tokens are saved and queries become more efficient. Daily memories (YYYY-MM-DD.md) remain unchanged.
New Structure
{workspace}/
├── MEMORY.md # Directory index (lightweight, only links)
├── memory/
│ ├── details/ # Detailed memory files (one per topic)
│ ├── _import/Start_Memory.md # Essential startup info (must load first)
│ └── YYYY-MM-DD.md # Daily memories (unchanged mechanism)Execution Steps
- Backup original:
Always backup before modification.cp {workspace}/MEMORY.md {workspace}/MEMORY.md.backup - Create directories:
mkdir -p {workspace}/memory/details mkdir -p {workspace}/memory/_import - Parse and split MEMORY.md:
- Read original MEMORY.md
- Split by section headers (## level)
- Group related content by theme
- Generate short titles (≤10 characters, Chinese preferred)
- Generate detail files:
- Save each section to
memory/details/{title}.md - Preserve original content format
- Use relative paths for cross-references if needed
- Save each section to
- Generate new MEMORY.md:
- Create directory index following docs/MEMORY.md format
- Group memories by topic (environment, team, tools, etc.)
- Use relative paths:
./details/{title}.md - Include reference to Start_Memory.md
- Generate Start_Memory.md:
- Create essential startup info following docs/Start_Memory.md format
- CRITICAL: Must include three mandatory sections (see docs/Start_Memory.md for details):
- 强制规则 - Memory_Search usage规范(先检索后读取)
- 重要约束:记忆存储结构规范 - MEMORY.md/details/Start_Memory/YYYY-MM-DD 的职责划分
- 记忆查询流程 - 新优化记忆结构下的查询流程
- Save to
memory/_import/Start_Memory.md
- Update BOOTSTRAP.md:
- Add conversation notice from docs/BOOTSTRAP_ADD.md
- Place where Agent reads at startup
- Instruct to read Start_Memory.md on first conversation
- Update AGENTS.md:
- Replace old Memory section with new structure description
- Document memory query flow and Memory_Search usage
- Verify and test:
- Check directory structure is correct
- Verify MEMORY.md format and links work
- Ensure detail files are complete
- Test Memory_Search can find and retrieve details
- Confirm Start_Memory.md is properly referenced
- Report results:
- List created directories and files
- Count migrated memory sections
- Report validation status
- Note any issues or warnings
Learnings Compatibility
When the workspace also uses a self-improvement / .learnings/ workflow:
- Treat
.learnings/as a staging area for raw corrections, failures, and feature requests - Promote durable user preferences, environment facts, team rules, and other stable context into
memory/details/*.md - Keep
MEMORY.mdindex-only even when promoting learnings; do not paste detailed learnings directly into it - Continue to route behavioral patterns to
SOUL.md, workflow rules toAGENTS.md, and tool gotchas toTOOLS.md - Use
memory/YYYY-MM-DD.mdfor daily capture first when information is still fresh or uncurated
Key Rules
- Preserve daily memories: Do not modify
memory/YYYY-MM-DD.mdfiles - Backup first: Always copy MEMORY.md before changes
- Short titles: Detail file names ≤10 characters, clear and descriptive
- Relative paths: Use
./paths for portability across workspaces - Complete migration: Ensure all important info is moved, nothing lost
- Test thoroughly: Verify Memory_Search works with new structure
- Memory storage rule: All future memories MUST follow the details-based storage method - MEMORY.md stores only directory index (title + path), memory/details/ stores detailed content, memory/_import/Start_Memory.md stores essential startup info, memory/YYYY-MM-DD.md stores daily logs (unchanged)
Examples
Refer to docs/ directory for format templates:
- docs/MEMORY.md - Directory index with topic groups and relative paths
- docs/Start_Memory.md - Essential startup info with query flow and rules
- NOTE: Simplified to remove redundancy. Must include three mandatory sections:
- 强制规则 (Memory_Search usage)
- 重要约束:记忆存储结构规范 (details storage method)
- 记忆查询流程 (query flow for optimized structure)
- NOTE: Simplified to remove redundancy. Must include three mandatory sections:
- docs/BOOTSTRAP_ADD.md - Notice to add to BOOTSTRAP.md for first-time reading
Query Flow After Optimization
- New conversation starts: Read BOOTSTRAP.md → Read Start_Memory.md → Greet user
- User gives command: Use Memory_Search to find relevant memories
- If found: Read detailed document at referenced path
- If not found: Proceed normally without reading memory files
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

