history-insight

history-insight is a skill for Claude Code from team-attention/plugins-for-claude-natives. It costs 96 tokens per session (1,025 once invoked), scanned B, original, MIT.

A tool for finding and learning from Claude Code session history, stored as files for projects or across the whole machine. It can extract information from past or current conversations.

In plain words
What is it for?
Use it to capture a session, search project or all-session history, filter sessions by date, and summarize useful information from one or many history files.
Why use it?
It helps recover decisions, discoveries, and earlier work that are no longer visible in the current conversation. It also makes the search scope explicit before reading session files.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool; mentions Claude Code.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/foo/project.

Part of the session-wrap plugin — 3 skills, 1 command, 5 agents shipped together

Good fit Use it to capture a session, search project or all-session history, filter sessions by date, and summarize useful information from one or many history files.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add team-attention/plugins-for-claude-natives
Claude Code
/plugin install session-wrap

Made for: Claude Code.

Or install session-wrap, the plugin that ships this one along with the rest of its 3 skills, 1 command, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for history-insight

README.md
[![agentmods](https://agentmods.dev/badge/skills/team-attention/plugins-for-claude-natives/history-insight/github.svg)](https://agentmods.dev/skills/team-attention/plugins-for-claude-natives/history-insight)
Your own site
<a href="https://agentmods.dev/skills/team-attention/plugins-for-claude-natives/history-insight"><img src="https://agentmods.dev/badge/skills/team-attention/plugins-for-claude-natives/history-insight/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for history-insight

Your own site · 80×15
<a href="https://agentmods.dev/skills/team-attention/plugins-for-claude-natives/history-insight"><img src="https://agentmods.dev/badge/skills/team-attention/plugins-for-claude-natives/history-insight.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,025 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00096 $0.01025
Opus 5 $0.00048 $0.00513
Sonnet 5 $0.00019 $0.00205
Haiku 4.5 $0.00010 $0.00103

Measured 12d ago against content hash c31b5bf8c0a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

history-insight scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/extract-session.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

find ~/.claude/projects/<encoded-cwd> -name "*.jsonl" -type f
plugins/session-wrap/skills/history-insight/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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
[분석 결과]

Read the full file on GitHub · 144 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 144 lines · 96 tokens per session scan B c31b5bf8c0a3

Subscribe to this mod's changes

history-insight is a skill published in the GitHub repository team-attention/plugins-for-claude-natives (824 stars, last pushed 4mo ago), licensed MIT. It adds 96 tokens to every session and 1,025 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens