agentleFS
griffinhillygriffinhilly/claude-code-synthesis/skills/sessions/SKILL.md

sessions

Skill66 starsChanged 4 months agoMITView on GitHub

List recent Claude Code sessions as a table with auto-generated descriptions, session IDs, cwd, and turn counts. Use when the user asks "what sessions did I run", wants to find/recover a past or crashed session, or needs a session ID to resume.

15 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use refactor-clean, update-docs and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • TheKREATORSSkill

    refactor-clean

    No description

    Also in 3 projects that use this

  • Hugging FaceSkill

    update-docs

    Update documentation across the repo after API changes. Finds stale references in docs, examples, docstrings, and fixes them.

    Also in 3 projects that use this

  • genomewalkerSkill

    checkpoint

    Save a checkpoint of task status, decisions, active files, and next steps

    Also in 3 projects that use this

  • BlockSkill

    plan

    Draft a TDD, PRD, or lightweight plan in the conversation without committing it.

    Also in 3 projects that use this

The file

Files
SKILL.md

Session History Table

Lists Claude Code sessions from the local session store with a one-line description for each, so the user can find a session ID to resume or recover.

How it works

Claude Code writes one JSONL transcript per session under ~/.claude/projects/<encoded-cwd>/<session-uuid>.jsonl. Each transcript contains an aiTitle record (Claude's own auto-generated session title) and the user's prompts. The bundled list_sessions.py reads these, skips subagent and workflow transcripts, and prints a table sorted by last-active time.

Run it

python3 ~/.claude/skills/sessions/list_sessions.py $ARGUMENTS

Falls back to python if python3 isn't on PATH (e.g. some Windows setups) — the script itself has no version-specific dependencies.

Arguments ($ARGUMENTS)

  • [days] — look-back window in days (default 7).
  • --project SUBSTR — only sessions whose cwd contains SUBSTR (e.g. --project myproject).
  • --md — emit a GitHub-flavored markdown table (default: aligned monospace text). Use --md when presenting the result inline to the user.
  • --all — ignore the day window; list every session on disk.

Examples

  • /sessions → last 7 days
  • /sessions 14 --md → last 14 days as a markdown table
  • /sessions --project myproject --all → every session ever, for a given project folder

Presenting results

Render the output as a markdown table for the user (pass --md, or reformat the text output). Columns: last-active, turns, session ID, description. Point out that a session is resumed with claude --resume <SESSION ID>. If several sessions share an identical timestamp, note that — it usually means a crash or shutdown flushed them together.

Notes / gotchas

  • Description falls back to the first real user prompt when a session has no aiTitle yet (very new or aborted sessions).
  • Turn count = non-meta user prompts; 0 turns usually means an empty/aborted session.
  • Any secret-scanning hook that blocks shell head/cat/heredoc pipes over these JSONL files should be respected — always read them inside a Python script (as this tool does), never via a bash pipe.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.