| name | claude-tail |
| description | View Claude Code session logs with colors, filtering, and real-time following |
Claude Tail Skill
You are a Claude Code session log analysis specialist using the claude-tail tool. This skill provides comprehensive guidance for viewing, filtering, and analyzing Claude Code session logs.
Core Concepts
claude-tail reads Claude Code session logs (JSONL format) and displays them with:
- Syntax highlighting and colors
- Real-time following (like
tail -f)
- Filtering by event type, tool, time range, or errors
- Multiple display modes (compact, verbose, stats, tools-only)
Basic Usage
View a Session Log
claude-tail ~/.claude/sessions/2024-01-15-session.jsonl
claude-tail --no-follow ~/.claude/sessions/2024-01-15-session.jsonl
cat session.jsonl | claude-tail
Follow Logs in Real-Time
claude-tail session.jsonl
claude-tail -f session.jsonl
claude-tail session1.jsonl session2.jsonl
Watch for New Logs
claude-tail --pattern "*.jsonl"
claude-tail --pattern "~/.claude/sessions/*.jsonl"
Display Modes
Compact Mode
claude-tail --compact session.jsonl
Verbose Mode
claude-tail --verbose session.jsonl
Statistics Mode
claude-tail --stats session.jsonl
Tools-Only Mode
claude-tail --tools-only session.jsonl
Filtering
Filter by Event Type
claude-tail --type tool_use,error session.jsonl
claude-tail --type text session.jsonl
Filter by Tool Name
claude-tail --tool Read,Write session.jsonl
claude-tail --tool Bash session.jsonl
claude-tail --tool Read,Write,Edit session.jsonl
Filter by Time Range
claude-tail --after 14:30:00 session.jsonl
claude-tail --before 15:45:00 session.jsonl
claude-tail --after 14:30:00 --before 15:45:00 session.jsonl
Show Only Errors
claude-tail --errors-only session.jsonl
Display Options
Terminal Width and Wrapping
claude-tail --width 120 session.jsonl
claude-tail --no-wrap session.jsonl
claude-tail --width 80 --no-wrap session.jsonl
Common Workflows
Debug a Session
claude-tail --errors-only --no-follow session.jsonl
claude-tail --tools-only --errors-only session.jsonl
claude-tail --verbose --errors-only session.jsonl
Monitor Tool Usage
claude-tail --tools-only -f session.jsonl
claude-tail --tool Bash,Read,Write -f session.jsonl
claude-tail --stats --tools-only session.jsonl
Analyze Session Activity
claude-tail --after 10:00:00 --before 11:00:00 --no-follow session.jsonl
claude-tail --compact --no-follow session.jsonl
claude-tail --stats session.jsonl
Watch Live Sessions
claude-tail -f ~/.claude/sessions/$(ls -t ~/.claude/sessions/*.jsonl | head -1)
claude-tail --pattern "~/.claude/sessions/*.jsonl"
claude-tail --errors-only -f current-session.jsonl
Advanced Usage
Combining Filters
claude-tail --tool Read,Write \
--errors-only \
--after 14:00:00 \
session.jsonl
claude-tail --tool Bash,Grep,Read \
--compact \
-f session.jsonl
Session Log Analysis
claude-tail --stats --no-follow session.jsonl
claude-tail --tools-only --verbose --no-follow session.jsonl
claude-tail --errors-only --verbose --no-follow session.jsonl
Debugging Workflows
claude-tail --verbose \
--after 14:30:00 \
--before 14:35:00 \
--no-follow \
session.jsonl
claude-tail --errors-only --tools-only -f session.jsonl
claude-tail --tool Read,Write,Edit,Glob,Grep \
--compact \
-f session.jsonl
Session Log Location
Claude Code session logs are typically stored in:
~/.claude/sessions/*.jsonl
Find Recent Sessions
ls -lt ~/.claude/sessions/*.jsonl | head -5
claude-tail ~/.claude/sessions/$(ls -t ~/.claude/sessions/*.jsonl | head -1)
Common Event Types
- tool_use - Claude called a tool (Read, Write, Bash, etc.)
- text - Claude sent text output
- error - An error occurred
- system - System messages and events
Common Tools to Filter
- Read - File reading operations
- Write - File writing operations
- Edit - File editing operations
- Bash - Shell command execution
- Grep - Code search operations
- Glob - File pattern matching
- Task - Agent task launches
- WebFetch - Web content fetching
- WebSearch - Web search queries
Best Practices
- Use follow mode for active sessions: Monitor live sessions with
-f
- Filter aggressively: Use
--tool, --type, and time filters to focus on relevant events
- Start with stats mode: Get an overview with
--stats before diving into details
- Use compact mode for overviews: Quickly scan many events with
--compact
- Use verbose mode for debugging: Get full detail when investigating issues
- Watch for errors: Regular
--errors-only checks help catch issues early
- Analyze tool patterns: Use
--tools-only to understand workflow patterns
Tips
- Follow mode is enabled by default (use
--no-follow to disable)
- Combine multiple filters to narrow down events precisely
- Use time filters to focus on specific parts of a session
- Stats mode is great for session retrospectives
- Errors-only mode helps quickly identify problems
- Tools-only mode shows the "what" without the "why"
Quick Reference
claude-tail session.jsonl
claude-tail --no-follow session.jsonl
claude-tail --stats session.jsonl
claude-tail --errors-only session.jsonl
claude-tail --tools-only session.jsonl
claude-tail --tool Read,Write session.jsonl
claude-tail --after 14:00:00 --before 15:00:00 session.jsonl
claude-tail --compact session.jsonl
claude-tail --verbose session.jsonl
claude-tail --pattern "*.jsonl"