pi-packages/pi-context-repo/skills/defragmenting-memory/SKILL.md
Decomposes and reorganizes agent memory files into focused, single-purpose components. Use when memory has large multi-topic blocks, redundancy, or poor organization. Trigger phrases: "defrag memory", "reorganize memory", "clean up memory files", "split memory blocks".
npx skillsauth add edmundmiller/dotfiles defragmenting-memoryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Requires context-repo extension with memory at
.pi/memory/
Splits large, multi-purpose memory blocks into focused single-purpose files
with hierarchical / naming.
Use the memory_backup tool before proceeding. This is your safety net.
find .pi/memory -name '*.md' | while read f; do
echo "=== $f ($(wc -l < "$f") lines) ==="
head -5 "$f"
echo
done
For each file, determine:
Split multi-purpose blocks into focused files using hierarchical naming:
Before:
system/project.md (80 lines mixing overview, tooling, conventions, gotchas)
After:
system/project/overview.md
system/project/tooling.md
system/project/conventions.md
system/project/gotchas.md
Use memory_write for each new file, then delete the original:
rm .pi/memory/system/project.md
For each file (new and existing):
memory_commit({ message: "refactor: defragment memory — split N files into M focused blocks" })
Provide a summary:
/ hierarchy: project/tooling/testing.md (not project-tooling-testing.md)If something goes wrong:
/memory-backups # list available backups
/memory-restore <backup-name>
development
Read-only Linear issue access via the Linear GraphQL API.
data-ai
## <!-- Purpose: Teach agents fast day-to-day memory browse/search/read/sync workflows in pi-context-repo. --> name: searching-memory description: > Search, browse, and inspect memory quickly in pi-context-repo. Use when asked to find prior notes, inspect memory files, locate preferences, or sync recent memory updates. Trigger phrases: "search memory", "list memory files", "find in memory", "read memory file", "memory status", "sync memory". --- # Searching Memory Use this workflow for fast
development
Comprehensive guide for initializing or reorganizing agent memory into a deeply hierarchical file structure. Use when running /init, when user asks to set up memory, or when memory needs a major reorganization. Trigger phrases: "initialize memory", "set up memory", "populate memory", "build my memory", "memory init".
development
Jujutsu version control through jut, a human and agentic framework around jj. Use for: check status, view changes, commit work, create branches, push, pull, create PRs, squash commits, reword messages, absorb changes, undo operations, view history. Complements jj — use jut for opinionated workflows, drop into raw jj for everything else.