This skill should be used when user wants to access, capture, or reference Claude Code session history...
Claude Code ์ธ์ ํ์คํ ๋ฆฌ๋ฅผ ๋ถ์ํ๊ณ ์ธ์ฌ์ดํธ๋ฅผ ์ถ์ถํฉ๋๋ค.
~/.claude/projects/<encoded-cwd>/*.jsonl
Path Encoding: /Users/foo/project โ -Users-foo-project
์์ธ ํ์ผ ํฌ๋งท:
${baseDir}/references/session-file-format.md
์ค์ฝํ ๊ฒฐ์ :
๋ช ์๋ ๊ฒฝ์ฐ (AskUserQuestion ์๋ต ๊ฐ๋ฅ):
current_projectall_sessions๋ช ์๋์ง ์์ ๊ฒฝ์ฐ - AskUserQuestion ํธ์ถ:
question: "์ธ์
๊ฒ์ ๋ฒ์๋ฅผ ์ ํํ์ธ์"
options:
- "ํ์ฌ ํ๋ก์ ํธ๋ง" โ ~/.claude/projects/<encoded-cwd>/*.jsonl
- "๋ชจ๋ Claude Code ์ธ์
" โ ~/.claude/projects/**/*.jsonl
# Current project only
find ~/.claude/projects/<encoded-cwd> -name "*.jsonl" -type f
# All sessions (๋ชจ๋ ํ๋ก์ ํธ)
find ~/.claude/projects -name "*.jsonl" -type f
๋ ์ง ํํฐ๋ง: ํ์ผ์ mtime(์์ ์๊ฐ) ํ์ธ ํ ํํฐ. OS๋ณ stat ์ต์
๋ค๋ฆ:
stat -f "%Sm" -t "%Y-%m-%d" <file>stat -c "%y" <file>Session files found?
โโ No โ Error: "No sessions found"
โโ Yes โ How many files?
โโ 1-3 files โ Direct Read + parse
โโ 4+ files โ Batch Extract Pipeline
์ง์ Read๋ก JSONL ํ์ฑ. ํ์ผ์ด ํฌ๋ฉด(โฅ5000 tokens) extract-session.sh ์ฌ์ฉ:
${baseDir}/scripts/extract-session.sh <session.jsonl>
/tmp/cc-cache/<analysis-name>/)sessions.txt)user_messages.txt)clean_messages.txt)clean_messages.txt๊ฐ ๋๋ฌด ์ปค์ Read ์คํจ ์:
ํ์ผ ๋ถํ :
split -l 2000 clean_messages.txt /tmp/cc-cache/<name>/batch_
๋ณ๋ ฌ Task(opus) ํธ์ถ:
Task(subagent_type="general-purpose", model="opus", run_in_background=true)
prompt: "batch_XX ํ์ผ์ ์ฝ๊ณ ์ฃผ์ /ํจํด ์์ฝํด์ค"
๊ฒฐ๊ณผ ๋ณํฉ: Task(opus)๋ก ์ข ํฉ
## Session Capture Complete
- **Sessions:** N files processed
- **Messages:** X total, Y after filter
### Extracted Insights
[๋ถ์ ๊ฒฐ๊ณผ]
| Scenario | Response |
|---|---|
| No session files found | "No session files found for this project." |
| File too large | Auto-preprocess with extract-session.sh |
| jq not installed | "Error: jq is required. Install with: brew install jq" |
| Task failed | "Warning: Could not process [file]. Skipping." |
| 0 relevant sessions | "No sessions matched your criteria." |
~ prefix ์ฌ์ฉ)${baseDir}/scripts/extract-session.sh - JSONL ์์ถ (thinking, tool_use ์ ๊ฑฐ)${baseDir}/references/session-file-format.md - JSONL ๊ตฌ์กฐ ๋ฐ ํ์ฑ