introspect

Analyze Claude Code sessions for conversation history, tool usage, and costs.

2|1|Updated Aug 23, 2025
One-click install
npx skills add https://github.com/neozenith/agentic-dotfiles --skill introspect-neozenith
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: introspect
Source: https://github.com/neozenith/agentic-dotfiles/tree/main/skills/introspect
Command: npx skills add https://github.com/neozenith/agentic-dotfiles --skill introspect-neozenith

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires sqlite3, json, argparse, subprocess, uv, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps users analyze Claude Code sessions to understand conversation history, tool usage, and costs associated with each session.

Core Features & Use Cases

  • Session Analysis: Review past sessions and reconstruct conversations.
  • Cost & Performance: Track costs and performance metrics like token usage, throughput, and context utilization.
  • Knowledge Graph: Host a resolved-entity knowledge graph over the prompt history.
  • Fallback Mode: Provides a fallback to query raw JSONL files when the cache is unavailable.

Quick Start

Use the introspect skill to review the most recent session in the current project:

.claude/skills/introspect/scripts/introspect_sessions.sh sessions -n 1

Frequently Asked Questions about introspect

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

FAQPage Schema
How do I analyze Claude Code session history and costs?

You can analyze Claude Code session history and costs by running the introspect_sessions.sh script, which parses session data into SQLite to provide insights on conversation history, tool usage, and token expenses.

Can I query raw JSONL session files when the SQLite cache is unavailable?

Yes, you can query raw JSONL session files using the DuckDB fallback mode, which allows you to analyze conversation history and tool usage directly when the primary SQLite cache is not available.

What metrics are included in Claude Code cost and performance analysis?

Cost and performance analysis includes tracking token usage, throughput, context utilization, and associated expenses for each Claude Code session to help you understand resource consumption.

How do I review the most recent Claude Code session in my project?

To review the most recent session, execute the introspect_sessions.sh script with the sessions command and the -n 1 flag, which retrieves and reconstructs the latest conversation history.

Does the knowledge graph feature resolve entities from prompt history?

Yes, the knowledge graph feature hosts a resolved-entity graph constructed from your prompt history, enabling you to map and visualize relationships within your Claude Code session data.

Do I need Python and uv installed to run session analysis?

Yes, you need Python and uv installed since the session analysis relies on Python scripts with sqlite3 and json dependencies, managed through the uv environment, to process and store session data.