observability-analyze-session-logs
Analyzes Claude Code session transcripts (JSONL files) to reveal context window content, token usage patterns, and decision-making processes using view_session_context.py tool. Use when debugging Claude behavior, investigating token patterns, tracking agent delegation, or analyzing context exhaustion. Triggers on "why did Claude do X", "analyze session", "check session logs", "context window exhaustion", or "track agent delegation".
npx skills add majiayu000/claude-skill-registry --skill observability-analyze-session-logs-dawiddutoit-custom-claude-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Analyze Session Logs > **IMPORTANT DISTINCTION**: This skill analyzes **Claude Code session transcripts** (what Claude saw and thought), NOT application/production logs (what code executed). For application logs, use the **analyze-logs** skill instead. ## Quick Start **Most common usage (list all messages):** ```bash python3 .claude/tools/utils/view_session_context.py <session-file.jsonl> --list ``` **View context at specific point (by message index):** ```bash python3 .claude/tools/utils/view_session_context.py <session-file.jsonl> --message-index 10 ``` **View context at specific message (by UUID from logs/errors):** ```bash python3 .claude/tools/utils/view_session_context.py <session-file.jsonl> --uuid "3c8467d6-..." ``` ## When to Use This Skill Invoke this skill when users mention: - "why did Claude do X?" - "what was in the context window?" - "analyze session" / "check session logs" - "debug Claude behavior" - "token usage investigation" - "context window exhaustion" - "track agent delegation" - Any mention of `.jsonl` session files **Use cases:** 1. **Debugging decisions** - "Why did Claude choose approach X?" → View context at decision point 2. **Token analysis** - "Where
- Quick Start
- When to Use This Skill
- What This Skill Does
- Session File Locations
- Instructions
- Analysis Workflow
- Step 1: Locate Session File
- Step 2: Choose Analysis Mode
- Step 3: Execute Analysis
- Step 4: Interpret Results
- Step 5: Report Findings
- Best Practices
- Common Scenarios
- "Why did Claude do X?"
python3 .claude/tools/utils/view_session_context.py <session-file.jsonl> --list python3 .claude/tools/utils/view_session_context.py <session-file.jsonl> --message-index 10 python3 .claude/tools/utils/view_session_context.py <session-file.jsonl> --uuid "3c8467d6-..." ls -lt ~/.claude/projects/-Users-$(whoami)-*/*.jsonl | head -5 Find most recent session file Or search by UUID from error messages grep -r "uuid" ~/.claude/projects/*/ python3 .claude/tools/utils/view_session_context.py <session.jsonl> --list python3 .claude/tools/utils/view_session_context.py <session.jsonl> --message-index 10 python3 .claude/tools/utils/view_session_context.py <session.jsonl> --uuid "3c8467d6-..."
What does the observability-analyze-session-logs skill do?
Analyzes Claude Code session transcripts (JSONL files) to reveal context window content, token usage patterns, and decision-making processes using view_session_context.py tool. Use when debugging Claude behavior, investigating token patterns, tracking agent delegation, or analyzing context exhaustion. Triggers on "why did Claude do X", "analyze session", "check session logs", "context window exhaustion", or "track agent delegation".
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill observability-analyze-session-logs-dawiddutoit-custom-claude-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
