claude-session-archaeology
Reconstruct what work was actually done on a project by mining Claude Code session transcripts (~/.claude/projects/**/*.jsonl) — streaming grep/jq recipes for…
Skill by ever-just
Chalk Labs
Need help deploying claude-session-archaeology?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ever-just-claude-session-archaeology
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/claude-session-archaeology
What's inside
- Skill name
claude-session-archaeology- Description
- Reconstruct what work was actually done on a project by mining Claude Code session transcripts (~/.claude/projects/**/*.jsonl) — streaming grep/jq recipes for files up to 150MB, the CLAUDE.md boilerplate false-positive trap, core/partial/incidental classification, and fork detection. Use when asked "what have we done on X?", when rebuilding a project history, when recovering decisions or work that never reached git, or as the history phase of a footprint inventory.
- License
- MIT
- Instructions
- 139 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: contains an absolute path from the author's machine
Files (1)
- SKILL.md
SKILL.md (first lines)
# Claude Session Archaeology
## Overview
Claude Code writes every session to `~/.claude/projects/<mangled-cwd>/<session-uuid>.jsonl`. Those transcripts are the **only** record of a large class of work: decisions taken and their reasoning, things built but never committed, incidents found and left open, research that produced a conclusion but no file, and blockers handed back to a human who then forgot. Git shows what landed. The transcripts show what *happened*.
This skill is the streaming toolkit for reading them — because they routinely reach 130–150 MB and cannot be opened.
## When to use
- "What work have we done on X?" across weeks of sessions.
- Rebuilding a project history, changelog, or handoff doc after the fact.
- Recovering a decision, a blocked item, or an incident nobody wrote down.
- Finding work that was completed but never pushed.
- Phase 2 of `product-footprint-inventory`.
## Where the transcripts live
```
~/.claude/projects/<cwd-with-slashes-replaced-by-dashes>/<session-uuid>.jsonl
```
`/Users/me/Desktop/proj` → `-Users-me-Desktop-proj`. One directory per working directory, so **the same project can appear under several directories** (repo dir, parent dir, a renamed path). Sweep them all:
```bash
cd ~/.claude/projects
for d in ./*/; do
c=$(grep -ril "KEYWORD" "$d" 2>/dev/null | wc -l | tr -d ' ')
t=$(find "$d" -maxdepth 1 -name '*.jsonl' | wc -l | tr -d ' ')
[ "$c" -gt 0 ] && echo "$c matches / $t transcripts :: $d"
done | sort -rn
```
Quote `"$d"` — these directory names begin with `-` and unquoted they are parsed as `ls` options.
## The one trap that ruins this: embedded boilerplate
**Every session embeds the user's global context in its transcript — and there are at least TWO such files, not one.** The global `CLAUDE.md` is the obvious one. The auto-memory index (`~/.claude/projects/<dir>/memory/MEMORY.md`) is the one that catches people out: it is injected into every session in its project, and it is a *summary of past work*, so it disproportionately contains exactly the project nouns you are searching for. If your term appears in either file, *every session on the machine* scores 30–40 hits while containing no actual work on the subject.
**Never assume a term is clean — verify it.** Before trusting any keyword, grep the boilerplate itself:
```bash
grep -ic 'KEYWORD' ~/CLAUDE.md ~/.claude/CLAUDE.md 2>/dev/null
grep -ric 'KEYWORD' ~/.claude/projects/*/memory/MEMORY.md 2>/dev/null
```
This is not optional. On a real run the operator asserted that a predecessor brand name was absent from the boilerplate and therefore high-precision; it was in fact present in `MEMORY.md`, and treating every hit as signal would have produced **1,412 false positives**.
**Then calibrate.** Count occurrences per file and read the distribution:
```bash
for f in *.jsonl; do printf '%7d %s\n' "$(grep -oi 'KEYWORD' "$f" | wc -l)" "$f"; done | sort -rn
```
Typical shape: a cluster at 30–45 (boilerplate only), then a gap, then the real sessions at hundreds or thousands. In one run the real ones ran 471 → 19,358 hits while the noise floor sat near 40. Treat anything under ~50 as boilerplate until a title check says otherwise, and never deep-dive it.
**Count events, not occurrences,** when a term repeats heavily inside single messages: `rg -c` counts matching lines/events and gives a far more stable floor than `grep -o | wc -l`.
## Most of the corpus is not where you are looking
`~/.claude/projects/<dir>/*.jsonl` holds the **main** session transcripts. Subagent and workflow transcripts live *nested deeper* — and they vastly outnumber the main ones. Measure both before you scope:
```bash
find ~/.claude/projects -maxdepth 2 -name '*.jsonl' | wc -l # main sessions
find ~/.claude/projects -mindepth 3 -name '*.jsonl' | wc -l # subagent / workflow
```
On one machine that was **45 main against 3,678 nested** — the nested corpus was 98% of the files and had never been swept. Also note that most project directories contain **no transcripts at all** (only `memory/`, `workflows/scripts/`, `file-history/`), so "30 project dirs" does not mean 30 dirs worth searching. Decide explicitly whether the nested corpus is in scope; for "what work was done" it usually is, because that is where fan-out agents did the actual work.
## The streaming recipe
Never `Read` these files. Never run `jq` over a whole 140 MB file when a tail will do. Always append `2>/dev/null` — some lines fail to parse and will abort an unguarded `jq`.
```bash
f=SESSION.jsonl
# Session titles (fast, most informative single signal)
jq -r 'select(.type=="summary") | .summary' "$f" 2>/dev/null | sort -u | head -8
# Date range
head -30 "$f" | jq -r '.timestamp // empty' 2>/dev/null | head -1
tail -10 "$f" | jq -r '.timestamp // empty' 2>/dev/null | tail -1
# What the human actually asked for
jq -r 'select(.type=="user") | .message.content
| if type=="array" then (map(.text? // empty)|join(" ")) else . end' "$f" 2>/dev/null \
| grep -v '^$' | head -3 | cut -c1-1200
# What got built — markers
grep -o 'PR #[0-9]*' "$f" | sort | uniq -c | sort -rn | head
grep -oiE 'deployed|shipped|merged|LIVE in prod|verified' "$f" | sort | uniq -c | sort -rn | head
# How it ended — late assistant messages only (tail the bytes first!)
tail -c 3000000 "$f" | jq -r 'select(.type=="assistant") | .message.content
| if type=="array" then (map(.text? // empty)|join(" ")) else . end' 2>/dev/null \
| grep -v '^$' | tail -6 | cut -c1-900
```
The last one matters most. **The end of a session is where the truth is**: what shipped, what was left blocked, what the agent handed back. A session that opens "audit this" and closes "…terminated on usage limits mid-Wave-1, ledger unfinished" tells you the work is *incomplete*, which no commit will ever say.
## Classification
Tag every file:
| Tag | Meaning | Treatment |
|---|---|---|
| **core** | The session's main subject is the target | Full reconstruction |
| **partial** | A meaningful thread on the target inside another project's session | Extract just that thread |
| **incidental** | Boilerplate hits only | One line, no deep-dive |
Partials are where the value hides — cross-project sessions record dependencies and shared-infrastructure facts that no dedicated session states, precisely because they surfaced as someone else's problem.
## Fork detection
Sessions fork. You will find four 130–143 MB files with near-identical hit counts, overlapping date ranges, and thousands of shared events — one lineage, not four projects. Detect by comparing date range + hit count + shared early content, then report **one thread** and note the forks, rather than four near-duplicate entries. In a recent run, three of thirteen files in one directory were forks of a single lineage and contributed one distinct slice of work between them.
## Output shape
Force structure per session:
```json
{ "file": "...", "date_range": "YYYY-MM-DD to YYYY-MM-DD",
"relevance": "core|partial|incidental", "title": "...",
"summary": "2-3 sentences on the ACTUAL WORK DONE",
"workstreams": ["product","infrastructure","marketing","operations","data","docs","security"],
"key_outputs": "PRs, files, deploys, datasets, decisions, blockers" }
```
Ask each agent for a `highlights` field synthesizing the arc of its slice — what was built, when, and what state it ended in. Those synthesize into the project narrative.From ever-just/agentskills, MIT.
More from ever-just/agentskills
- 0.529score
dark-mode-token-migration
ever-just
Add dark mode to a light-only app that styles with RAW color utilities (Tailwind `stone-*`/`slate-*`/`gray-*`) via a semantic token layer, migrating utilities…
SkillCFreshness: C★ 5Claude Code +9 - 0.529score
deploy-log-forensics
ever-just
Reconstruct what changed on production — which commit, which module, which tenant, at what time — from CI/CD run logs when you have NO server access (no SSH…
SkillCFreshness: C★ 5Claude Code +9 - 0.529score
agent-quality-grading
ever-just
Grade AI-agent performance qualitatively — every user↔agent conversation on four axes (did it do the task / respond fast / use the right tools / message…
SkillCFreshness: C★ 5Claude Code +9 - 0.439score
canvas-design
ever-just
Create beautiful visual art in .png and .pdf documents using design philosophy.
SkillDFreshness: D★ 5Claude Code +9 - 0.283score
client-discovery-osint
ever-just
No description from the publisher yet.
SkillCFreshness: C★ 5Claude Code +9 - 0.283score
ad-transparency-audit
ever-just
No description from the publisher yet.
SkillCFreshness: C★ 5Claude Code +9 - 0.283score
commercial-property-research
ever-just
No description from the publisher yet.
SkillCFreshness: C★ 5Claude Code +9 - 0.283score
agent-discoverability
ever-just
No description from the publisher yet.
SkillCFreshness: C★ 5Claude Code +9 - 0.283score
business-model-canvas
ever-just
No description from the publisher yet.
SkillCFreshness: C★ 5Claude Code +9 - 0.283score
cdp-render-verification
ever-just
No description from the publisher yet.
SkillCFreshness: C★ 5Claude Code +9 - 0.283score
company-legal-reputation-research
ever-just
No description from the publisher yet.
SkillCFreshness: C★ 5Claude Code +9 - 0.283score
competitor-identification
ever-just
No description from the publisher yet.
SkillCFreshness: C★ 5Claude Code +9
Signals
- Stars
- 5
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Aug 14, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ever-just/agentskills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ever-just
- 0.529score
dark-mode-token-migration
ever-just
Add dark mode to a light-only app that styles with RAW color utilities (Tailwind `stone-*`/`slate-*`/`gray-*`) via a semantic token layer, migrating utilities…
SkillCFreshness: C★ 5Claude Code +9 - 0.529score
deploy-log-forensics
ever-just
Reconstruct what changed on production — which commit, which module, which tenant, at what time — from CI/CD run logs when you have NO server access (no SSH…
SkillCFreshness: C★ 5Claude Code +9 - 0.529score
agent-quality-grading
ever-just
Grade AI-agent performance qualitatively — every user↔agent conversation on four axes (did it do the task / respond fast / use the right tools / message…
SkillCFreshness: C★ 5Claude Code +9 - 0.439score
canvas-design
ever-just
Create beautiful visual art in .png and .pdf documents using design philosophy.
SkillDFreshness: D★ 5Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get claude-session-archaeology running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
claude-session-archaeology skill. Agent Mart. https://agentmart.dev/skills/ever-just-claude-session-archaeology (last updated 2026-10-24)