← ClaudeAtlas

memory-curatorlisted

대화 세션에서 유의미한 정보/패턴을 메모리에 즉시 저장하고, 쌓인 메모리를 주기적으로 정리하는 스킬. 두 가지 모드로 동작한다: - 기본 모드 (`/memory-curator`): 현재 세션 JSONL을 분석해 놓친 메모리를 추출하고 저장 - 리뷰 모드 (`/memory-curator review`): 전체 메모리 파일을 정리하고 CLAUDE.md 승격 후보 및 문서화 대상 제안 다음 표현이 나오면 반드시 이 스킬을 사용할 것: "메모리 정리해줘", "세션 메모리 저장해줘", "memory curator", "메모리 큐레이션", "메모리 리뷰", "memory review", "지침 정리해줘", "문서화할 거 추려줘", "이번 세션 메모리", "놓친 메모리 있어?", "메모리 업데이트해줘"
gagip/gagip-dev · ★ 0 · Data & Documents · score 63
Install: claude install-skill gagip/gagip-dev
# memory-curator ## 모드 판별 인자가 없으면 **기본 모드**, `review` 인자가 있으면 **리뷰 모드**로 실행한다. --- ## 기본 모드: 세션 메모리 추출 및 저장 > **retrospective와의 관계**: 이 기본 모드는 `retrospective` 회고가 넘긴 메모리 후보를 받는 **단일 관문**이기도 하다. retrospective는 "무엇을 어디에 남길지"(볼트·스킬·문서화·CLAUDE.md)를 넓게 분배하고, 그중 **메모리는 여기로 위임**한다. 직접 호출되든 retrospective에서 이어지든 절차는 같다 — 핵심은 아래 4번 **중복 방지 필터**로 메모리가 비대해지지 않게 막는 것이다. ### 1. 현재 세션 JSONL 파일 찾기 ```bash # 현재 작업 디렉토리로 프로젝트 슬러그 계산 # 예: /Users/gagip/workspace/myproject/my-wear-app-issue18 # → -Users-gagip-workspace-myproject-my-wear-app-issue18 cwd=$(pwd) slug=$(echo "$cwd" | sed 's|/|-|g' | sed 's|^-||') project_dir="$HOME/.claude/projects/$slug" # 가장 최근 JSONL 파일 ls -t "$project_dir"/*.jsonl 2>/dev/null | head -1 ``` ### 2. 세션 내용 추출 JSONL에서 `type=user`와 `type=assistant` 메시지를 읽어 대화 흐름을 파악한다. ```bash python3 - <<'EOF' import json, sys path = "<위에서 찾은 JSONL 경로>" lines = [json.loads(l) for l in open(path)] for l in lines: if l.get('type') in ('user', 'assistant'): role = l['type'] content = l.get('message', {}).get('content', '') if isinstance(content, list): text = ' '.join(c.get('text','') for c in content if c.get('type')=='text') else: text = str(content) if text.strip() and not text.startswith('<system-reminder'): print(f"[{role}] {text[:300]}") EOF ``` ### 3. 기존 메모리 파일 읽기 ```bash memory_dir="$HOME/.claude/projects/$slug/memory" cat "$memory_dir/MEMORY.md" 2>/dev/null # 각 메모리 파일도 필요 시 읽기 ``` 전역 메모리