SuperAPI AI Directory

my-history-insight

Agents & models

View repository

Updated 10-15 21:38

About this skill

my-history-insight

Find patterns in past Claude Code session records and extract insights. It plays a role like "taking out a diary and looking back on this month".

Execution Flow

┌─────────────────────────────────────────────┐
│  Step 1. 세션 파일 탐색                        │
│  ~/.claude/projects/ 에서 .jsonl 파일 목록     │
└──────────────────────┬──────────────────────┘
                       │
┌──────────────────────▼──────────────────────┐
│  Step 2. 사용자 메시지만 추출                  │
│  (전체의 ~6% — 나머지 94%는 부속 자료)         │
└──────────────────────┬──────────────────────┘
                       │
┌──────────────────────▼──────────────────────┐
│  Step 3. 병렬 분석 (3개 에이전트 동시)         │
│  ┌──────────────┬──────────────┐             │
│  │session-      │pattern-      │             │
│  │summarizer   │finder        │             │
│  ├──────────────┴──────────────┤             │
│  │growth-tracker               │             │
│  └─────────────────────────────┘             │
└──────────────────────┬──────────────────────┘
                       │
┌──────────────────────▼──────────────────────┐
│  Step 4. 인사이트 리포트 출력                  │
└─────────────────────────────────────────────┘

Step 1: Explore session files

Check the list of session files in the current project.

  • Location: ~/.claude/projects/ subfolder
  • File format: UUID-style .jsonl files
  • Exclude files inside the subagents/ folder (subagent records)
  • Determine the analysis scope by identifying the number of files and total size

If there are too many files (20 or more), analyze only the most recent 10.


Step 2: Extract user messages

각 .jsonl Extract only the actual conversation content from the files.

  • Each line of a jsonl file is a JSON object
  • "role":"user" Extract only the content of items that are
  • Exclude all tool_use, tool_result, and system messages
  • Identify the topic of the session from the extracted text

Key point: ~94% of session files are auxiliary material such as file change history and tool execution logs. The actual user conversation is only ~6%, so extract only this and analyze quickly.


Step 3: Parallel analysis (run 3 agents simultaneously)

Three agents analyze the extracted conversation content simultaneously.

Agent 1: session-summarizer

  • Role: Summarize in one line what kind of work each session was
  • Output: A list of summaries per session (date + topic)

Agent 2: pattern-finder

  • Role: Detect recurring patterns across all sessions
  • Items to check:
    • The most frequently performed type of work (automation, documentation writing, API integration, etc.)
    • Recurring errors or retry patterns
    • Frequently used tools or technologies
  • Output: Top 3 patterns + evidence

Agent 3: growth-tracker

  • Role: Track changes and growth over time
  • Items to check:
    • Changes in task complexity between early sessions vs recent sessions
    • Newly added technologies or tools
    • Traces of recurring tasks having been automated
  • Output: 2~3 growth points

Step 4: Output insight report

Integrate the results of the 3 agents and output in the format below.

📊 히스토리 인사이트 리포트
분석 세션: XX개 | 기간: YYYY-MM-DD ~ YYYY-MM-DD

━━━━━━━━━━━━━━━━━━━━━━━━

📅 세션별 요약 (최근 순)
- [날짜] 세션명: 한 줄 요약
- ...

━━━━━━━━━━━━━━━━━━━━━━━━

🔍 반복 패턴 Top 3
1. [패턴명]: 설명
2. [패턴명]: 설명
3. [패턴명]: 설명

━━━━━━━━━━━━━━━━━━━━━━━━

📈 성장 트래킹
- [성장 포인트 1]
- [성장 포인트 2]
- [성장 포인트 3]

━━━━━━━━━━━━━━━━━━━━━━━━

💡 핵심 인사이트
[전체를 관통하는 핵심 한 문장]

Analysis scope options

When running the skill, have the scope selected via AskUserQuestion:

AskUserQuestion({
  "questions": [{
    "question": "어떤 범위로 분석할까요?",
    "header": "분석 범위",
    "options": [
      {"label": "현재 프로젝트만", "description": "지금 작업 중인 프로젝트 세션만 분석"},
      {"label": "최근 10개 세션", "description": "가장 최근 10개 세션만 빠르게 분석"},
      {"label": "전체 세션", "description": "모든 Claude Code 세션 분석 (시간 더 소요)"}
    ],
    "multiSelect": false
  }]
})

Quick Reference

  • When: Monthly retrospective, when switching projects, when wondering "what have I been doing?"
  • Time required: ~2 minutes (based on the current project)
  • Output file: sync/history-insight-YYYY-MM-DD.md (optional)