with one click
memory-hygiene
Audit and update Claude memory files after PRs or architecture changes. Use after merging PRs, deleting files, or changing architecture.
Menu
Audit and update Claude memory files after PRs or architecture changes. Use after merging PRs, deleting files, or changing architecture.
FastAPI best practices and conventions. Use when writing or refactoring FastAPI endpoints, routers, dependencies, or Pydantic models.
GraphRAG implementation patterns for hybrid search, Text2Cypher, and agentic retrieval. Use when implementing RAG workflows with Neo4j.
| name | memory-hygiene |
| description | Audit and update Claude memory files after PRs or architecture changes. Use after merging PRs, deleting files, or changing architecture. |
| allowed-tools | Read, Edit, Write, Glob, Grep |
Audit and update Claude's private memory files to prevent stale context.
~/.claude/projects/-Users-arthurfantaci-Projects-requirements-graphrag-api/
├── CLAUDE.md # Instructions (~150 lines max)
└── memory/
└── MEMORY.md # Learnings (~100 lines max)
# Extract file paths mentioned in memory files
grep -oE '[a-zA-Z_/]+\.(py|ts|md)' ~/.claude/projects/-Users-arthurfantaci-Projects-requirements-graphrag-api/CLAUDE.md
For each path found, verify the file still exists. Remove references to deleted files.
Read CLAUDE.md Architecture section. Compare against actual directory structure:
ls -la backend/src/requirements_graphrag_api/core/
ls -la backend/src/requirements_graphrag_api/core/agentic/
Update if structure has changed.
In MEMORY.md, keep only the last 5-10 PRs. Remove older entries. Format:
| PR | Summary |
|----|---------|
| #123 | Brief description |
wc -l ~/.claude/projects/-Users-arthurfantaci-Projects-requirements-graphrap-api/CLAUDE.md
wc -l ~/.claude/projects/-Users-arthurfantaci-Projects-requirements-graphrap-api/memory/MEMORY.md
If over limit, consolidate or archive old content.
Review "Data Flow Gotchas" and "Patterns" sections. If a pattern was fixed or changed, update or remove it.
After running, report: