Claude Session Introspect
Inspect Claude Code session JSONL files at ~/.claude/projects/ to extract real conversation telemetry: token counts (input/output/cache reads/cache writes), assistant turn counts, human prompt counts, tool-use counts, compaction boundaries, and the contents of compaction summaries. Use this skill when the user asks "how many tokens did this session use", "how many prompts have I sent", "show me the stats for this conversation", "what got compacted", "where are the compaction boundaries", "introspect the session", "do brain surgery on the JSONL", or wants any data point that lives inside the on
Install
npx skills add swyxio/skills --skill claude-session-introspectgit clone --depth 1 https://github.com/swyxio/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/claude-session-introspect ~/.claude/skills/claude-session-introspectPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Claude Session Introspect Claude Code persists every conversation as a JSONL file on disk. This skill is the recipe for opening one and pulling out the numbers you actually want — token usage, prompt counts, compaction events, tool calls — without guessing. ## Where sessions live ``` ~/.claude/projects/<encoded-cwd>/<session-uuid>.jsonl ``` `<encoded-cwd>` is the absolute path of the project's working directory with `/` replaced by `-` and a leading `-`. Example: `/Users/swyx/Work/foo` → `-Users-swyx-Work-foo`. Each line is one event. The interesting `type` values: | type | what it is | |---|---| | `user` | a real user message **OR** a tool result (distinguished by `toolUseResult` being non-null) | | `assistant` | an assistant turn (one model response). `message.usage` has the token counts. | | `system` | system messages (mostly compaction-related) | | `file-history-snapshot` | edited-file snapshots used for undo | | `attachment` | image/file attachments | | `permission-mode` | permission mode toggles | ## Quick locate: find the current session ```bash # 1. encode current working directory ENC="-$(pwd | sed 's,/,-,g' | sed 's/^-//')" # 2. list the project's session files, newest first ls -t "$HOME/.claude/projects/$ENC/" # 3. the most recent .jsonl is usually the live one SESSION="$HOME/.claude/projects/$ENC/$(ls -t "$HOME/.claude/projects/$ENC/" | head -1)" echo "$SESSION" ```
Details
- Skill name
claude-session-introspect- Repository
- swyxio/skills
- Path
claude-session-introspect/SKILL.md- License
- MIT
- Repo updated
- 16 November 2026
FAQ
What does the Claude Session Introspect skill do?
Inspect Claude Code session JSONL files at ~/.claude/projects/ to extract real conversation telemetry: token counts (input/output/cache reads/cache writes), assistant turn counts, human prompt counts, tool-use counts, compaction boundaries, and the contents of compaction summaries. Use this skill when the user asks "how many tokens did this session use", "how many prompts have I sent", "show me the stats for this conversation", "what got compacted", "where are the compaction boundaries", "introspect the session", "do brain surgery on the JSONL", or wants any data point that lives inside the on
How do I install the Claude Session Introspect skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add swyxio/skills --skill claude-session-introspect. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Claude Session Introspect popular?
It lives in swyxio/skills, which has 201 GitHub stars and 12 forks.
Related skills
Accelevents API
201swyxio/skills
Use when reading or updating AI Engineer Europe speaker records through the Accelevents REST API, especially for full-record PUT updates, auth header quirks, and preserving existing speaker fields.
Accelevents Speaker Sync
201swyxio/skills
Use when website speaker, session, schedule, room, track, or headshot changes must be synchronized back to Accelevents for AI Engineer Europe 2026.
Agents SDK
201swyxio/skills
Build or debug stateful applications that specifically use Cloudflare's `agents` package, including Agent classes, routing, callable methods, synchronized state, scheduling, AIChatAgent, durable execution, or Agents SDK client hooks. Do not trigger for generic AI-agent design, the OpenAI Agents SDK, or ordinary Durable Object work that does not use the Cloudflare Agents SDK.
CLI for Agents
228pproenca/dot-skills
Designing CLIs that AI agents will invoke — non-interactive flags, layered --help with examples, stdin/pipeline composition, actionable errors, idempotency, dry-run, destructive-action safety, and predictable command structure. Use when designing, building, or reviewing a command-line tool that AI agents or automation will invoke. Trigger even if the user doesn't explicitly say "agent-friendly" — apply whenever they are writing `--help` text, adding a new subcommand, designing error messages, or reviewing a CLI's UX.
Ceo Creator
201swyxio/skills
Create or align a durable CEO agent for a software project, product, or organization. Use when someone asks for a project CEO, product steward, general manager, autonomous owner, or open-ended agent that should proactively observe the product, set priorities, coordinate work, and report outcomes over time. Establishes evidence sources, authority boundaries, operating cadence, initiative and delegation rules, privacy protections, and a decision-oriented reporting contract.
Context Retrospective
191jwynia/agent-skills
Analyze agent-user interaction transcripts to identify context network maintenance needs and guidance improvements. Use after significant agent interactions or to improve context networks.
Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.