history-insight
Access and extract insights from your Claude Code session history.
Install
mkdir -p .claude/skills/history-insight && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7986" && unzip -o skill.zip -d .claude/skills/history-insight && rm skill.zipInstalls to .claude/skills/history-insight
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
This skill should be used when user wants to access, capture, or reference Claude Code session history. Trigger when user says "capture session", "save session history", or references past/current conversation as a source - whether for saving, extracting, summarizing, or reviewing. This includes any mention of "what we discussed", "today's work", "session history", or when user treats the conversation itself as source material (e.g., "from our conversation").Key capabilities
- →Retrieve past Claude Code session history
- →Summarize work done in specific sessions
- →Extract findings from conversation logs
- →Filter sessions by project or time
- →Batch process large session files
How it works
The skill searches for .jsonl session files in the local project directory, parses them, and uses a batch extraction pipeline to summarize content or extract patterns.
Inputs & outputs
When to use history-insight
- →Summarize work done in current session
- →Find past code solutions from previous sessions
- →Review conversation history for context
- →Save session findings for documentation
About this skill
History Insight
Claude Code 세션 히스토리를 분석하고 인사이트를 추출합니다.
Data Location
~/.claude/projects/<encoded-cwd>/*.jsonl
Path Encoding: /Users/foo/project → -Users-foo-project
상세 파일 포맷:
${baseDir}/references/session-file-format.md
Execution Algorithm
Step 1: Ask Scope [MANDATORY]
스코프 결정:
-
명시된 경우 (AskUserQuestion 생략 가능):
- "현재 프로젝트만" / "이 프로젝트" →
current_project - "모든 세션" / "전체" →
all_sessions
- "현재 프로젝트만" / "이 프로젝트" →
-
명시되지 않은 경우 - AskUserQuestion 호출:
question: "세션 검색 범위를 선택하세요" options: - "현재 프로젝트만" → ~/.claude/projects/<encoded-cwd>/*.jsonl - "모든 Claude Code 세션" → ~/.claude/projects/**/*.jsonl
Step 2: Find Session Files
# Current project only
find ~/.claude/projects/<encoded-cwd> -name "*.jsonl" -type f
# All sessions (모든 프로젝트)
find ~/.claude/projects -name "*.jsonl" -type f
날짜 필터링: 파일의 mtime(수정시간) 확인 후 필터. OS별 stat 옵션 다름:
- macOS:
stat -f "%Sm" -t "%Y-%m-%d" <file> - Linux:
stat -c "%y" <file>
Step 3: Process Sessions
Decision Tree
Session files found?
├─ No → Error: "No sessions found"
└─ Yes → How many files?
├─ 1-3 files → Direct Read + parse
└─ 4+ files → Batch Extract Pipeline
1-3 Files
직접 Read로 JSONL 파싱. 파일이 크면(≥5000 tokens) extract-session.sh 사용:
${baseDir}/scripts/extract-session.sh <session.jsonl>
4+ Files: Batch Extract Pipeline
- 캐시 디렉토리 생성 (
/tmp/cc-cache/<analysis-name>/) - 세션 목록 저장 (
sessions.txt) - jq로 메시지 일괄 추출 (
user_messages.txt) - 정리 및 필터링 (
clean_messages.txt) - Task(opus)로 종합 분석
파일이 너무 클 때: 병렬 배치 분석
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)로 종합
Step 4: Report Results
## Session Capture Complete
- **Sessions:** N files processed
- **Messages:** X total, Y after filter
### Extracted Insights
[분석 결과]
Error Handling
| 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." |
Security Notes
- 출력에 전체 경로 노출 금지 (
~prefix 사용)
Related Resources
${baseDir}/scripts/extract-session.sh- JSONL 압축 (thinking, tool_use 제거)${baseDir}/references/session-file-format.md- JSONL 구조 및 파싱
When not to use it
- →When the user wants to access real-time active memory instead of historical logs
- →When the user has not enabled session logging
Prerequisites
Limitations
- →Requires jq to be installed for processing
- →Cannot access sessions outside of the local ~/.claude/projects/ directory
How it compares
This skill automates the retrieval and parsing of local log files, which would otherwise require manual file searching and JSONL parsing.
Compared to similar skills
history-insight side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| history-insight (this skill) | 0 | 6mo | Review | Beginner |
| meeting-minutes | 41 | 6mo | No flags | Beginner |
| notion-knowledge-capture | 10 | 9mo | No flags | Intermediate |
| transcribe | 11 | 6mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by team-attention
View all by team-attention →You might also like
meeting-minutes
github
Generate concise, actionable meeting minutes for internal meetings. Includes metadata, attendees, agenda, decisions, action items (owner + due date), and follow-up steps.
notion-knowledge-capture
makenotion
Transforms conversations and discussions into structured documentation pages in Notion. Captures insights, decisions, and knowledge from chat context, formats appropriately, and saves to wikis or databases with proper organization and linking for easy discovery.
transcribe
openai
Transcribe audio files to text with optional diarization and known-speaker hints. Use when a user asks to transcribe speech from audio/video, extract text from recordings, or label speakers in interviews or meetings.
user-file-ops
trpc-group
Simple operations on user-provided text files including summarization.
log
dev-whitecrow
기록 스킬. 중요한 의사결정이나 순간을 Decision_Log나 History에 빠르게 기록합니다.
distill
dev-whitecrow
정제 스킬. Inbox의 날것의 생각(Raw Data)을 읽어 분석하고, 이를 The_Ark의 적절한 위치에 구조화하여 배치합니다. 온보딩 단계에 따라 다르게 작동합니다.