claude-session-transcript

Extracts real user prompts from Claude Code session transcript JSONL files.

2|Updated May 13, 2026
One-click install
npx skills add https://github.com/curtisgalloway/public-skills --skill claude-session-transcript-curtisgalloway
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-session-transcript
Source: https://github.com/curtisgalloway/public-skills/tree/main/plugins/agent-workflow/skills/claude-session-transcript
Command: npx skills add https://github.com/curtisgalloway/public-skills --skill claude-session-transcript-curtisgalloway

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Claude Code session transcripts mix genuine user prompts with harness-injected noise such as tool results, task notifications, and slash-command stubs, making it hard for other skills to analyze what the user actually typed. ## Core Features & Use Cases - Transcript Location: Finds the live session JSONL under $HOME/.claude/projects/ using hook-provided transcript_path or an mtime-based fallback. - Prompt Filtering: Filters events by type, userType, and content shape, collapses slash-command pairs, and strips harness-injected wrapper tags. - Noise Classification: Identifies isMeta pseudo-prompts (task notifications, stop-hook feedback, compaction summaries) so analyses are not dominated by machine noise. - Use Case: The /learn or /wrapup skill reads this reference before parsing a transcript, so it reports only real user prompts instead of counting background-task completions as user input. ## Quick Start Read this skill's rules before parsing a Claude Code session transcript to extract the user's real prompts.

Frequently Asked Questions about claude-session-transcript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the Claude Code session transcript file?▼

Session transcripts are JSONL files under $HOME/.claude/projects/<project-key>/<session-uuid>.jsonl, where the project key is the session-start cwd with slashes replaced by hyphens. In a hook context, use the transcript_path field from the hook's JSON stdin; otherwise pick the most recently modified .jsonl file.

How to extract real user prompts from a Claude Code transcript?▼

Filter JSONL events where type is "user", userType is "external", and message.content is a string or an array starting with a text element. Then collapse slash-command pairs sharing a promptId and strip wrapper tags like <system-reminder> and <ide_selection>.

Why does transcript analysis show prompts the user never typed?▼

The harness injects pseudo-prompts flagged with isMeta: true, such as task notifications, stop-hook feedback, and compaction summaries, which can outnumber real prompts two to one. Drop events that are isMeta and short, or that match known injected shapes like <task-notification> or "This session is being continued".

Can I read a large Claude Code transcript file directly?▼

Active sessions can produce JSONL files of hundreds of megabytes, so avoid unbounded reads. Page through with Read using offset and limit, extract events with jq via Bash, or run wc -l first to gauge the file size.

What does this transcript reference not cover?▼

It does not cover tool-call event extraction, per-skill output formats, or cross-session correlation. Tool_use and tool_result matching rules live in the calling skill such as /learn, and each calling skill decides what to do with the extracted prompts.