Skip to content
Back to skills

Claude Session Analysis

ASecurity

Analyze Claude Code session files. Find current session ID, view timeline (tl), or search past chats.

  • 666 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 8, 2026
toolsbash

Works with

  • claude code

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill claude-session-analysis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Claude Session Analysis?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Claude Session Analysis
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-claude-session-analysis/badge)](https://www.skillsdirectory.com/skills/majiayu000-claude-session-analysis)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: claude-session-analysis
description: Analyze Claude Code session files. Find current session ID, view timeline (tl), or search past chats.
---

# Claude Session Analysis

This is `{SKILL_DIR}/SKILL.md`. Scripts: `{SKILL_DIR}/scripts/`

| Script | Description |
|--------|-------------|
| `current-session.sh [dir] [sec]` | **My session ID** |
| `sessions.sh [--full] [-g kw] [-mmin 1440] [-n 10]` | Search sessions by keyword/time |
| `resolve-session.sh <id>` | Session ID → file path |
| `timeline.sh [-t <types>] [-w <width>] <id> [range]` | Timeline (default: all, 55 chars; range: `..m`, `m..`, `m..m`) |
| `get-by-marker.sh [--raw] [-A n] [-B n] [-C n] <id> <marker>` | Entry details (with context) |
| `file-ops.sh <id>` | Read/Write operations |
| `file-diff.sh <id> <hash> <v1> [v2]` | Diff versions (v2 omitted: vs current) |
| `summaries.sh <id>` | Session title history |

## Timeline Markers

Format: `{hash}-{type}` (e.g., `7e2451-U`) with `[+N]` for truncated chars

Types (all by default, filter with `-t`):
- **U**: User (includes /commands) | **T**: Think | **F**: File (Write: `{hash}@v{n}`)
- **W**: Web (no truncate) | **B**: Bash | **G**: Grep/Glob
- **A**: Agent | **S**: Skill | **Q**: Question | **D**: toDo

## Paths

- Sessions: `~/.claude/projects/{project-path}/{session-id}.jsonl`
- Backups: `~/.claude/file-history/{session-id}/{hash}@v{version}`

## Usage Tips

1. **Start with full timeline** (default width is enough for overview)
2. **Dive deeper** with `get-by-marker.sh` or `-w` for specific entries

⚠️ **Sandbox**: Pipes (`|`) don't work. Use `dangerouslyDisableSandbox: true` when piping output.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.