manage-memory
정보
`manage-memory` 스킬은 개발자가 Claude Code의 영구 메모리를 체계적으로 정리하도록 돕습니다. MEMORY.md를 간결한 인덱스로 유지하고 세부 주제는 별도의 파일로 추출합니다. 이 스킬은 오래된 항목을 자동으로 감지하고, 현재 프로젝트에 대해 정확성을 검증하며, 200줄 제한 규칙을 적용합니다. MEMORY.md가 줄 수 제한에 근접했을 때, 지속적인 통찰력을 얻은 생산적인 세션 후에, 또는 프로젝트 변경으로 메모리 항목이 오래되었을 가능성이 있을 때 이 스킬을 사용하세요.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/manage-memoryClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Manage Memory
Maintain Claude Code's persistent memory directory so it stays accurate, concise, and useful across sessions. MEMORY.md is loaded into the system prompt on every conversation — lines after 200 are truncated, so this file must be a lean index pointing to topic files for detail.
When to Use
- MEMORY.md is approaching the 200-line truncation threshold
- A session produced durable insights worth preserving (new patterns, architecture decisions, debugging solutions)
- A topic section in MEMORY.md has grown beyond 10-15 lines and should be extracted
- Project state has changed (renamed files, new domains, updated counts) and memory entries may be stale
- Starting a new area of work and checking whether relevant memory already exists
- Periodic maintenance between sessions to keep the memory directory healthy
Inputs
- Required: Access to the memory directory (typically
~/.claude/projects/<project-path>/memory/) - Optional: Specific trigger (e.g., "MEMORY.md is too long," "just finished a major refactor")
- Optional: Topic to add, update, or extract
Procedure
Step 1: Assess Current State
Read MEMORY.md and list all files in the memory directory:
wc -l <memory-dir>/MEMORY.md
ls -la <memory-dir>/
Check the line count against the 200-line limit. Inventory existing topic files.
Got: Clear picture of total lines, number of topic files, and which sections exist in MEMORY.md.
If fail: If the memory directory doesn't exist, create it. If MEMORY.md doesn't exist, create a minimal one with a # Project Memory header and a ## Topic Files section.
Step 2: Identify Stale Entries
Compare memory claims against current project state. Common staleness patterns:
- Count drift: File counts, skill counts, domain counts that changed after additions/removals
- Renamed paths: Files or directories that were moved or renamed
- Superseded patterns: Workarounds that are no longer needed after fixes
- Contradictions: Two entries that say different things about the same topic
Use Grep to spot-check key claims:
# Example: verify a skill count claim
grep -c "^ - id:" skills/_registry.yml
# Example: verify a file still exists
ls path/claimed/in/memory.md
Got: A list of entries that are stale, with the correct current values.
If fail: If you can't verify a claim (e.g., it references external state you can't check), leave it but add a (unverified) note rather than silently preserving potentially wrong information.
Step 3: Decide What to Add
For new entries, apply these filters before writing:
- Durability: Will this be true next session? Avoid session-specific context (current task, in-progress work, temporary state).
- Non-duplication: Does CLAUDE.md or project documentation already cover this? Don't duplicate — memory is for things NOT captured elsewhere.
- Verified: Has this been confirmed across multiple interactions, or is it a single observation? For single observations, verify against project docs before writing.
- Actionable: Does knowing this change behavior? "The sky is blue" isn't useful. "Exit code 5 means quoting error — use temp files" changes how you work.
Exception: If the user explicitly asks to remember something, save it immediately — no need to wait for multiple confirmations.
Got: A filtered list of entries worth adding, each meeting durability + non-duplication + verification + actionability criteria.
If fail: If unsure whether an entry is worth keeping, err toward keeping it briefly in MEMORY.md — it's easier to prune later than to rediscover.
Step 4: Extract Oversize Topics
When a section in MEMORY.md exceeds ~10-15 lines, extract it to a dedicated topic file:
- Create
<memory-dir>/<topic-name>.mdwith a descriptive header - Move the detailed content from MEMORY.md to the topic file
- Replace the section in MEMORY.md with a 1-2 line summary and a link:
## Topic Files
- [topic-name.md](topic-name.md) — Brief description of contents
Naming conventions for topic files:
- Use lowercase kebab-case:
viz-architecture.md, notVizArchitecture.md - Name by topic, not chronology:
patterns.md, notsession-2024-12.md - Group related items: combine "R debugging" and "WSL quirks" into
patterns.mdrather than creating one file per fact
Got: MEMORY.md stays under 200 lines. Each topic file is self-contained and readable without MEMORY.md context.
If fail: If a topic file would be fewer than 5 lines, it's probably not worth extracting — leave it inline in MEMORY.md.
Step 5: Update MEMORY.md
Apply all changes: remove stale entries, add new entries, update counts, and ensure the Topic Files section lists all dedicated files.
MEMORY.md structure should follow this pattern:
# Project Memory
## Section 1 — High-level context
- Bullet points, concise
## Section 2 — Another topic
- Key facts only
## Topic Files
- [file.md](file.md) — What it covers
Guidelines:
- Keep each bullet to 1-2 lines maximum
- Use inline formatting (
code, bold) for scanability - Put the most frequently needed context first
- The Topic Files section should always be last
Got: MEMORY.md is under 200 lines, accurate, and has working links to all topic files.
If fail: If you can't get under 200 lines after extraction, identify the least-frequently-used section and extract it. Every section is a candidate — even the project structure overview can go to a topic file if needed, leaving a 1-line summary.
Step 6: Verify Integrity
Run a final check:
- Line count: Confirm MEMORY.md is under 200 lines
- Links: Verify every topic file referenced in MEMORY.md exists
- Orphans: Check for topic files not referenced in MEMORY.md
- Accuracy: Spot-check 2-3 factual claims against project state
wc -l <memory-dir>/MEMORY.md
# Check for broken links
for f in $(grep -oP '\[.*?\]\(\K[^)]+' <memory-dir>/MEMORY.md); do
ls <memory-dir>/$f 2>/dev/null || echo "BROKEN: $f"
done
# Check for orphan files
ls <memory-dir>/*.md | grep -v MEMORY.md
Got: Line count under 200, no broken links, no orphan files, spot-checked claims are accurate.
If fail: Fix broken links (update or remove). For orphan files, either add a reference in MEMORY.md or delete them if they're no longer relevant.
Validation
- MEMORY.md is under 200 lines
- All topic files referenced in MEMORY.md exist on disk
- No orphan
.mdfiles in memory directory (every file is linked from MEMORY.md) - No stale counts or renamed paths in any memory file
- New entries meet the durability/non-duplication/verified/actionable criteria
- Topic files have descriptive headers and are self-contained
- MEMORY.md reads as a useful quick-reference, not a changelog
Pitfalls
- Memory file pollution: Writing every session observation to memory. Most findings are session-specific and don't need persisting. Apply the four filters (Step 3) before writing.
- Stale counts: Updating code but not memory. Counts (skills, agents, domains, files) drift silently. Always verify counts against the source of truth before trusting memory.
- Chronological organization: Organizing by "when I learned it" instead of "what it's about." Topic-based organization (
patterns.md,viz-architecture.md) is far more useful for retrieval than date-based files. - Duplicating CLAUDE.md: CLAUDE.md is the authoritative project instruction file. Memory should capture things NOT in CLAUDE.md — debugging insights, architecture decisions, workflow preferences, cross-project patterns.
- Over-extraction: Creating a topic file for every 3-line section. Only extract when a section exceeds ~10-15 lines. Small sections work fine inline.
- Forgetting the 200-line limit: MEMORY.md is loaded into every system prompt. Lines after 200 are silently truncated. If the file grows past this, the bottom content is effectively invisible.
Related Skills
write-claude-md— CLAUDE.md captures project instructions; memory captures cross-session learningprune-agent-memory— the inverse of manage-memory: auditing, classifying, and selectively forgetting stored memorieswrite-continue-here— write a structured continuation file for session handoff; complements memory as a short-term context bridgeread-continue-here— read and act on a continuation file at session start; the consumption side of the handoffcreate-skill— new skills may produce memory-worthy patternsheal— self-healing may update memory as part of integration stepmeditate— meditation sessions may surface insights worth persisting
GitHub 저장소
연관 스킬
qmd
개발qmd는 BM25, 벡터 임베딩, 재순위화를 결합한 하이브리드 검색을 통해 로컬 파일을 색인화하고 검색할 수 있는 로컬 검색 및 색인화 CLI 도구입니다. 명령줄 사용과 Claude 통합을 위한 MCP(Model Context Protocol) 모드를 모두 지원합니다. 이 도구는 임베딩에 Ollama를 사용하고 색인을 로컬에 저장하여 터미널에서 직접 문서나 코드베이스를 검색하는 데 이상적입니다.
subagent-driven-development
개발이 스킬은 각 독립적인 작업마다 새로운 하위 에이전트를 배치하고 작업 사이에 코드 리뷰를 진행하여 구현 계획을 실행합니다. 이 리뷰 프로세스를 통해 품질 게이트를 유지하면서 빠른 반복 작업을 가능하게 합니다. 동일한 세션 내에서 대부분 독립적인 작업을 진행할 때 내장된 품질 검증과 함께 지속적인 진행을 보장하기 위해 사용하세요.
mcporter
개발mcporter 스킬은 개발자가 Claude에서 직접 Model Context Protocol(MCP) 서버를 관리하고 호출할 수 있도록 합니다. 이 스킬은 사용 가능한 서버를 나열하고, 인수를 사용해 해당 서버의 도구를 호출하며, 인증 및 데몬 생명주기를 처리하는 명령어를 제공합니다. 개발 워크플로우에서 MCP 서버 기능을 통합하고 테스트할 때 이 스킬을 사용하세요.
adk-deployment-specialist
개발이 스킬은 A2A 프로토콜을 사용하여 Vertex AI ADK 에이전트를 배포하고 오케스트레이션하며, AgentCard 검색, 작업 제출, 코드 실행 샌드박스 및 메모리 뱅크와 같은 지원 도구를 관리합니다. Python, Java 또는 Go 언어로 순차, 병렬 또는 루프 오케스트레이션 패턴을 갖춘 다중 에이전트 시스템 구축을 가능하게 합니다. Google Cloud에서 ADK 에이전트 배포 또는 에이전트 워크플로우 오케스트레이션을 요청받았을 때 사용하세요.
