list-sessions

Lists Claude Code sessions across project directories with timestamps, previews, and resume commands.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/Takkuya/claude-skills --skill list-sessions-takkuya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: list-sessions
Source: https://github.com/Takkuya/claude-skills/tree/main/list-sessions
Command: npx skills add https://github.com/Takkuya/claude-skills --skill list-sessions-takkuya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Claude Code stores sessions per project directory, and the claude --resume command only works from the directory where the session was created, making it hard to find and reopen old conversations from other projects. This Skill scans all session files and gives you a ready-to-paste resume command. ## Core Features & Use Cases - Cross-directory session listing: Scans ~/.claude/projects/ for all .jsonl session files, showing decoded project path, timestamp, session ID, and a preview of the first user message. - Directory filtering: Accepts optional project paths as arguments to narrow the listing to specific directories. - Ready-to-paste resume commands: Outputs cd <dir> && claude --resume <id> so you can reopen a session from its original directory. - Use Case: You remember discussing a bug fix in a Claude session last week but not which project folder it was in. Run the skill, scan the previews, and copy the resume command for the matching session. ## Quick Start Ask the assistant to list all your Claude Code sessions across every project directory, optionally passing one or more project paths to filter the results.

Frequently Asked Questions about list-sessions

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

FAQPage Schema
How do I list all Claude Code sessions from every project?

Run the list-sessions skill with no arguments to scan all subdirectories of ~/.claude/projects for .jsonl session files. It displays a table with timestamp, decoded project path, first-message preview, and abbreviated session ID, sorted by most recent.

Why does claude --resume fail with 'No conversation found with session ID'?

The claude --resume command only works from the directory where the session was originally created. To resume a session from another project, first cd into that project's directory, then run claude --resume with the full session ID.

How do I resume a Claude session from another directory?

Use the command cd "<original-project-dir>" && claude --resume <session-id> in your terminal. The skill generates this exact command for you after you pick a session from the listing, since resuming requires an interactive terminal.

Can I filter Claude session listings to specific project folders?

Yes, pass one or more project paths as arguments, for example /list-sessions ~/projects/foo ~/Desktop. Each path is converted to its encoded directory name and only sessions from those folders are shown.

Where does Claude Code store session history files?

Sessions are stored as .jsonl files under ~/.claude/projects/<encoded-project-path>/<session-id>.jsonl, where the encoded path replaces every non-alphanumeric character of the absolute working directory path with a hyphen.

Does listing Claude sessions modify or delete any session files?

No, the listing is strictly read-only. It only runs find, stat, and a small python3 snippet to read the first user message from each .jsonl file, and never alters or deletes anything inside ~/.claude/projects.