my-session-wrap/skills/history-insight/SKILL.md
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").
npx skillsauth add ahnbu/my-claude-plugins history-insightInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Claude Code 세션 히스토리를 분석하고 인사이트를 추출합니다.
세션 데이터는 세션DB를 통해 조회한다:
node ~/.claude/my-claude-plugins/shared/query-sessions.js recent [N]
node ~/.claude/my-claude-plugins/shared/query-sessions.js by-project <name>
node ~/.claude/my-claude-plugins/shared/query-sessions.js doc <sessionId> --no-sync
Claude/Codex/Gemini 3개 AI 공통 세션DB. 스키마 참조: SESSION-DB.md
스코프 결정:
명시된 경우 (AskUserQuestion 생략 가능):
current_projectall_sessions명시되지 않은 경우 - AskUserQuestion 호출:
question: "세션 검색 범위를 선택하세요"
options:
- "현재 프로젝트만" → ~/.claude/projects/<encoded-cwd>/*.jsonl
- "모든 Claude Code 세션" → ~/.claude/projects/**/*.jsonl
# 현재 프로젝트
node ~/.claude/my-claude-plugins/shared/query-sessions.js by-project <project-name> --limit 50
# 전체 세션
node ~/.claude/my-claude-plugins/shared/query-sessions.js recent 50
필터링: --scope <claude|codex|gemini> 옵션으로 AI 소스 필터. 날짜 필터는 DB의 timestamp/last_timestamp 필드 활용 (stat 불필요).
Session files found?
├─ No → Error: "No sessions found"
└─ Yes → How many files?
├─ 1-3 files → Direct Read + parse
└─ 4+ files → Batch Extract Pipeline
node ~/.claude/my-claude-plugins/shared/query-sessions.js doc <sessionId> --no-sync
직접 doc 출력으로 대화 내용 추출.
/tmp/cc-cache/<analysis-name>/)sessions.txt)doc --no-sync 결과를 파일로 리다이렉트 (session_<id>.md)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)로 종합
분석 결과를 출력하고, ${SKILL_DIR}/history-insights-report/ 폴더에 자동 저장한다.
파일명: {요약}_YYYYMMDD.md (한국어 2~4단어 요약)
## 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." |
| Session too large | doc 출력 분할 후 배치 분석 |
| 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 사용)SESSION-DB.md - 세션DB 스키마 및 쿼리 가이드tools
스킬별 컨텍스트 소모량 리포트. 각 스킬 호출이 cp%를 얼마나 소모하는지 집계. Triggers: 'skill-context', 'skill context', '스킬 컨텍스트', '스킬 소모', '컨텍스트 비용'
tools
--- name: session-timeline description: Generate a per-session execution timeline from Claude Code JSONL logs. Triggers: "session timeline", "세션 타임라인", "소요시간 정리", "tool wait", "turn_duration". --- # Session Timeline 특정 Claude Code 세션 ID의 시간축을 복원한다. ## Workflow 1. `sessionId`를 받는다. 2. `scripts/session_timeline.js`를 실행해 timeline을 생성한다. 3. 기본은 markdown, 분석 파이프라인 연결 시 `--format json`을 사용한다. 4. 대형 `tool_result`는 원문 대신 persisted output 경로와 요약만 유지한다. ## Command ```bash node skills/session-timelin
development
This skill should be used when the user asks to "analyze session", "세션 분석", "evaluate skill execution", "스킬 실행 검증", "check session logs", "로그 분석", provides a session ID with a skill path, or wants to verify that a skill executed correctly in a past session. Post-hoc analysis of Claude Code sessions to validate skill/agent/hook behavior against SKILL.md specifications.
tools
세션 마무리: handoff 문서 저장 + git commit. /wrap 슬래시 명령어로만 실행.