MCPInstall

history-insight

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").

Installs
1.3K
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/ai-native-camp/camp-2 --skill history-insight
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads history-insight automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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]

스코프 결정:

  1. 명시된 경우 (AskUserQuestion 생략 가능):

    • "현재 프로젝트만" / "이 프로젝트" → current_project
    • "모든 세션" / "전체" → all_sessions
  2. 명시되지 않은 경우 - 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

  1. 캐시 디렉토리 생성 (/tmp/cc-cache/<analysis-name>/)
  2. 세션 목록 저장 (sessions.txt)
  3. jq로 메시지 일괄 추출 (user_messages.txt)
  4. 정리 및 필터링 (clean_messages.txt)
  5. Task(opus)로 종합 분석

파일이 너무 클 때: 병렬 배치 분석

clean_messages.txt가 너무 커서 Read 실패 시:

  1. 파일 분할:

    split -l 2000 clean_messages.txt /tmp/cc-cache/<name>/batch_
    
  2. 병렬 Task(opus) 호출:

    Task(subagent_type="general-purpose", model="opus", run_in_background=true)
    prompt: "batch_XX 파일을 읽고 주제/패턴 요약해줘"
    
  3. 결과 병합: Task(opus)로 종합


Step 4: Report Results

## Session Capture Complete

- **Sessions:** N files processed
- **Messages:** X total, Y after filter

### Extracted Insights
[분석 결과]

Error Handling

ScenarioResponse
No session files found"No session files found for this project."
File too largeAuto-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 구조 및 파싱

FAQ

What does the history-insight skill do?

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").

How do I install history-insight?

Run npx skills add https://github.com/ai-native-camp/camp-2 --skill history-insight in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/history-insight/ (personal) or .claude/skills/history-insight/ (project).

Which AI agents can use history-insight?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is history-insight safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains history-insight?

It is published by ai-native-camp in ai-native-camp/camp-2. It has 1,322 recorded installs.

More from ai-native-camp/camp-2

View all →

day1-onboarding

ai-native-camp/camp-2

AI Native Camp Day 1 온보딩. Claude와 대화하면서 Claude Code를 익힌다. "1일차", "Day 1", "온보딩" 요청에 사용.

1.6K installs

day3-clarify

ai-native-camp/camp-2

AI Native Camp Day 3 Clarify & GitHub. Clarify 플러그인으로 모호한 요구사항을 명확하게 만들고, 나만의 스킬을 만들고, PRD를 작성하여 GitHub에 첫 PR을 제출한다. "3일차", "Day 3", "clarify", "클래리파이", "PRD", "GitHub" 요청에 사용.

day2-mcp-and-context-sync

ai-native-camp/camp-2

AI Native Camp Day 2 MCP & Context Sync. MCP를 배우고 나만의 Context Sync 스킬을 만든다. "2일차", "Day 2", "MCP", "context sync" 요청에 사용.

AI & Agents1.5K installs

day4-wrap-and-analyze

ai-native-camp/camp-2

AI Native Camp Day 4 Wrap & Analyze + 콘텐츠 소화. session-wrap 스킬을 직접 만들고, history-insight와 session-analyzer로 세션을 분석하고, 콘텐츠 소화 파이프라인을 체험한다. "4일차", "Day 4", "wrap", "세션 분석", "session wrap", "세션 래핑", "fetch", "콘텐츠" 요청에 사용.

1.5K installs

day1-test-skill

ai-native-camp/camp-2

Day 1 테스트 스킬. "/day1-test-skill" 입력 시 실행된다. Skill이 어떻게 동작하는지 직접 체험하는 용도.

Testing & QA1.5K installs

session-wrap

ai-native-camp/camp-2

This skill should be used when the user asks to "wrap up session", "end session", "session wrap", "/wrap", "document learnings", "what should I commit", or wants to analyze completed work before ending a coding session.

Popular other skills

View category →

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.3M installs

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1M installs

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

778.4K installs

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

508.9K installs

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

459.7K installs

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

447.9K installs