# recap

Adopt this skill: https://proskills.md/skills/other/noluyorabi-claude-code-recap-skills-recap

Page: https://proskills.md/skills/other/noluyorabi-claude-code-recap-skills-recap
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skills/recap/SKILL.md
size: 8006
upstream: https://github.com/noluyorabi/claude-code-recap/blob/main/skills/recap/SKILL.md

````text
---
name: recap
description: Show recent Claude Code sessions across all projects, so the user can re-enter work after a reboot or context switch. Lists per session the absolute project path, a short summary, where the session stopped, last activity, turn count, git branch, model, and a ready-to-paste resume command; can search sessions by what was said in them, flag projects with uncommitted or unpushed work, and re-open every session at once in new terminal tabs. Use when the user asks "what was I working on", "which projects did I touch recently", "where did I leave off", "list my recent sessions", "how do I get back into that session", "open all my sessions again", "which session did I fix X in", "where do I still have uncommitted work", or invokes /recap. Reads only local files; the default run is instant and offline.
license: MIT
metadata:
  version: "1.3.0"
  author: noluyorAbi
  source: https://github.com/noluyorAbi/claude-code-recap
---

# recap: re-entry radar for Claude Code sessions

One command, full overview of recent sessions across every project on this machine. Built for the post-reboot moment: which projects, what was each session about, and the exact command to jump back in.

## How to run it

Personal or project install (the skill directory is on disk next to this file):

```bash
python3 ~/.claude/skills/recap/recap.py [flags]
```

Plugin install (Claude Code exports the plugin root):

```bash
python3 "$CLAUDE_PLUGIN_ROOT/skills/recap/recap.py" [flags]
```

Nothing to install beyond Python 3 (stdlib only, no third-party packages).

| Flag | Meaning |
|------|---------|
| (none) | last 15 sessions, newest first, instant, no network |
| `--since 7d` | only sessions active in the window (`30m`, `24h`, `7d`, `2w`) |
| `--project foo` | filter by substring of the absolute project path; separators are interchangeable (`my_app`, `my-app`, `work/my_app`) |
| `--grep PATTERN` | only sessions whose conversation matches PATTERN (regex, case-insensitive); the matching excerpt replaces the `↳` line |
| `--dirty` | annotate each row with its project's uncommitted and unpushed counts (read-only git calls) |
| `--limit N` | max rows (default 15) |
| `--json` | machine-readable output with full session ids and resume commands |
| `--no-tail` | hide the `↳` line that says where each session stopped |
| `--smart` | real one-sentence summaries via ONE `claude -p` haiku call (network, ~10s) |
| `--pick` | choose a row interactively, then `cd` + `claude -r` into it directly |
| `--open` | open EVERY listed session in its own new terminal tab and resume it there |
| `--claude-flags "..."` | extra flags for each resumed `claude` (e.g. `"--chrome --dangerously-skip-permissions"`); also shown in the printed resume lines and `--json` |
| `--terminal NAME` | which terminal `--open` drives: `iTerm2`, `Terminal`, `tmux`, `wezterm`, `kitty`, `gnome-terminal`, `konsole` (default: auto-detected) |
| `--yes` / `-y` | skip the `--open` confirmation prompt (required when stdin is not a TTY) |
| `--dry-run` | with `--open`: print the tabs and commands, open nothing |
| `--color` | force ANSI colors when output is piped (e.g. inside Claude Code) |
| `--plain` | no ANSI at all (also honors NO_COLOR / FORCE_COLOR env) |

## Usage examples

```bash
# after a reboot: what was I doing?
python3 ~/.claude/skills/recap/recap.py

# everything in one repo this week
python3 ~/.claude/skills/recap/recap.py --since 7d --project my-repo

# which session did I solve this in?
python3 ~/.claude/skills/recap/recap.py --grep "connection pool" --limit 5

# where did I leave work uncommitted?
python3 ~/.claude/skills/recap/recap.py --dirty --since 7d

# jump straight back into a session
python3 ~/.claude/skills/recap/recap.py --pick

# re-open yesterday's whole working set in terminal tabs, browser enabled, no permission prompts
python3 ~/.claude/skills/recap/recap.py --since 24h --limit 12 \
  --open --yes --claude-flags "--chrome --dangerously-skip-permissions"

# preview first, open nothing
python3 ~/.claude/skills/recap/recap.py --open --dry-run

# feed into other tooling
python3 ~/.claude/skills/recap/recap.py --json --limit 50
```

## The `--open` flag

Restores a whole working set at once. It opens one new tab per listed session and types the resume command into it. Rules:

- The session recap itself runs in is skipped automatically (matched on `CLAUDE_CODE_SESSION_ID`), so it never re-opens itself.
- Sessions whose project directory no longer exists are skipped and reported, never opened.
- Scope comes from the normal filters, so `--limit` / `--since` / `--project` decide exactly which tabs appear. Check with `--dry-run` before committing.
- Without `--yes` it asks for confirmation; with piped stdin (Claude Code's Bash tool) it refuses to open unless `--yes` is passed.
- `--claude-flags` is passed through verbatim to every tab. `--dangerously-skip-permissions` disables all permission checks in each opened session; the script prints a warning before doing it.
- The terminal is auto-detected: tmux when running inside it (even on macOS), else iTerm2/Terminal on macOS via `osascript`, else wezterm, kitty, gnome-terminal or konsole. `--terminal NAME` forces one. Where none can be driven, `--open` says so and opens nothing; `--open --dry-run` needs no terminal and still prints the commands.
- Every opened tab outlives `claude`: quitting a resumed session leaves a shell in that project instead of closing the restored window.

## When Claude runs this skill

Run the script with Bash, ALWAYS with `--color` (tool output is piped, auto-detection would strip the colors; Claude Code renders ANSI). Add `--since`/`--project` if the user narrowed the question, then relay the table. Quote the resume command (`cd <path> && claude -r <id>`) for any session the user wants to re-enter. Only add `--smart` if the user explicitly asks for better summaries; it makes a network call.

Reach for `--grep` when the user is looking for a session by what happened in it ("where did I fix the connection pool"), not by when it ran. Reach for `--dirty` when the question is about unfinished work ("what did I leave half-done", "where do I still have uncommitted changes"); it runs read-only git commands, so it is safe but not instant.

Use `--open` only when the user explicitly asks to re-open or resume the sessions. Because the Bash tool pipes stdin, `--open` needs `--yes`; treat the user's request as the confirmation, and set the scope with `--limit`/`--since` so no unwanted session gets a tab. Pass `--claude-flags` only with flags the user named; state the permission-bypass warning in your reply whenever `--dangerously-skip-permissions` is among them.

## Data sources and guarantees

- `~/.claude/history.jsonl` is the fast index (prompt text, timestamp, project path, session id). `CLAUDE_CONFIG_DIR` is honored when set.
- `~/.claude/projects/<encoded>/<session>.jsonl` transcripts are parsed only for the displayed rows (title, branch, model, turn count). Project paths always come from the `cwd`/`project` fields, never decoded from folder names (that encoding is lossy). Because `claude -r` only finds a session from the directory it started in, recap resolves the path to the first recorded `cwd` whose encoding matches the transcript's folder, so a mid-session `cd` never produces an unresumable command; a session with no `cwd` at all borrows one from a sibling transcript.
- Summary preference: Claude Code's own `ai-title` line, else the first real user prompt, else the first slash command the session ran, else `(no prompt)`. A transcript's user role also holds what Claude Code injects into it, and none of it counts as a prompt: command blocks, local command output, the body of an invoked skill, hook text, task notifications, `!` bash runs and interrupt markers.
- The `↳` line is where the session stopped: Claude's last reply when the run finished, the unanswered prompt when it was interrupted, whichever came last. `--
````

## File: README.md
upstream: https://github.com/noluyorabi/claude-code-recap/blob/main/README.md

````text
<div align="center">

<img src="assets/banner.png" width="100%" alt="recap — get back into every Claude Code session">

<b>See every recent Claude Code session across every project on your machine, and get the exact command to jump back into any of them.</b>

<br>
<br>

<a href="https://github.com/noluyorAbi/claude-code-recap/stargazers">
  <img src="https://img.shields.io/badge/%E2%98%85%20Star%20this%20repo-0b0b0b?style=for-the-badge&logo=github&logoColor=white&labelColor=0b0b0b" height="54" alt="Star claude-code-recap on GitHub">
</a>
&nbsp;&nbsp;
<a href="https://www.npmjs.com/package/claude-code-recap">
  <img src="https://img.shields.io/badge/Install-npx%20claude--code--recap-d97757?style=for-the-badge&logo=npm&logoColor=white&labelColor=0b0b0b" height="54" alt="Install via npx">
</a>
&nbsp;&nbsp;
<a href="https://www.adatepe.dev/blog/resume-claude-code-sessions-across-projects">
  <img src="https://img.shields.io/badge/Read%20the%20write--up-adatepe.dev-3a3a3a?style=for-the-badge&logo=readme&logoColor=white&labelColor=0b0b0b" height="54" alt="Read the write-up on adatepe.dev">
</a>

<br>
<br>

<code>npx claude-code-recap</code>&nbsp;&nbsp;then&nbsp;&nbsp;<code>/recap</code>

<br>
<br>

<a href="https://www.npmjs.com/package/claude-code-recap"><img src="https://img.shields.io/npm/v/claude-code-recap?style=for-the-badge&logo=npm&logoColor=white&label=npm&labelColor=0b0b0b&color=d97757" alt="npm version"></a>
<a href="https://www.npmjs.com/package/claude-code-recap"><img src="https://img.shields.io/npm/dm/claude-code-recap?style=for-the-badge&logo=npm&logoColor=white&label=downloads&labelColor=0b0b0b&color=3a3a3a" alt="npm downloads per month"></a>
<a href="https://code.claude.com/docs/en/skills"><img src="https://img.shields.io/badge/Claude_Code-skill_%2B_plugin-d97757?style=for-the-badge&logo=claude&logoColor=white&labelColor=0b0b0b" alt="Claude Code skill and plugin"></a>
<a href="package.json"><img src="https://img.shields.io/badge/dependencies-zero-3a3a3a?style=for-the-badge&labelColor=0b0b0b" alt="zero dependencies"></a>
<a href="https://github.com/noluyorAbi/claude-code-recap/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/noluyorAbi/claude-code-recap/ci.yml?branch=main&style=for-the-badge&logo=githubactions&logoColor=white&label=ci&labelColor=0b0b0b" alt="ci"></a>

<br>

<a href="assets/demo.mp4"><img src="assets/demo.gif" alt="recap listing recent Claude Code sessions across several projects, then re-opening them in terminal tabs" width="100%"></a>

<sub>The GIF above is a downsampled loop. Full-quality recording: <a href="assets/demo.mp4"><code>assets/demo.mp4</code></a>.</sub>

</div>

<br>

Claude Code's built-in `/resume` only lists sessions for the directory you are standing in. After a reboot, a crash, or a week of jumping between five repos, there is no way to answer "what was I working on, and where did I leave off". `recap` answers that in one command, and can re-open a whole working set in terminal tabs.

> The full story behind `recap`, why it reads exactly two files and writes nothing, the `shlex.quote` safety in `--open`, and the zero-dependency stance: [**Resume Claude Code Sessions Across Every Project**](https://www.adatepe.dev/blog/resume-claude-code-sessions-across-projects) on adatepe.dev.

---

## <img src="assets/icons/clock.svg" width="16" align="center"> What it does

`recap` reads the session logs Claude Code already writes to disk and prints a day-grouped timeline of your recent sessions. Per session: last activity, the absolute project path, a short summary, where the session stopped, an approximate turn count, the git branch, the model, the session id, and a ready-to-paste `cd <path> && claude -r <id>` resume command.

- Every project on the machine, not just the current directory.
- Every row says where that session stopped, so you re-enter on the open question rather than the opening prompt.
- `--pick` jumps straight into one session.
- `--open` re-opens all of them, each in its own terminal tab, already resumed. iTerm2, Terminal, tmux, wezterm, kitty, gnome-terminal, konsole.
- `--grep` finds the session you solved something in. `--dirty` shows which projects you left work sitting in.
- Pure Python 3 standard library. No dependencies, no build step.
- Offline and read-only by default. The only network path is the opt-in `--smart` flag.

## <img src="assets/icons/download.svg" width="16" align="center"> Install

Three ways in, all live. The plugin marketplace is the native path; `npx` and `curl | sh` install the same skill into `~/.claude/skills/recap`.

### 1. Plugin marketplace (recommended)

The repo is its own Claude Code marketplace. Two lines inside any Claude Code session:

```
/plugin marketplace add noluyorAbi/claude-code-recap
/plugin install claude-code-recap@noluyorabi-plugins
```

Then `/reload-plugins`, and invoke it as:

```
/claude-code-recap:recap
```

Plugin skills are namespaced `plugin-name:skill-name`, so this cannot collide with anything else you have installed. Add the marketplace by repo (`owner/repo`), not by a direct URL to `marketplace.json`: a URL-added marketplace downloads only that one file, and the entry's relative source (`./`) would not resolve.

### 2. npx

Installs the skill into your Claude Code skills directory (`~/.claude/skills/recap`, or `$CLAUDE_CONFIG_DIR/skills/recap`):

```bash
npx claude-code-recap
```

Then invoke it as `/recap`. The package has no postinstall hook; it writes only when you run the command. It records a sha256 manifest of the files it wrote and refuses to clobber a directory it did not install or files you have edited, unless you pass `--force`.

```bash
npx claude-code-recap --force      # overwrite local edits
npx claude-code-recap --uninstall  # remove what it installed
```

### 3. curl

Same install, no Node:

```bash
curl -fsSL https://raw.githubusercontent.com/noluyorAbi/claude-code-recap/main/install.sh | sh
```

Same guarantees as the npx path: sha256 manifest, no silent overwrite, `--force` and `--uninstall` supported.

```bash
curl -fsSL https://raw.githubusercontent.com/noluyorAbi/claude-code-recap/main/install.sh | sh -s -- --uninstall
```

### 4. skills CLI

If you use the [`skills`](https://skills.sh) directory CLI, recap resolves straight from this repo and installs across every agent it manages:

```bash
npx skills add noluyorAbi/claude-code-recap
```

Claude Code picks up `~/.claude/skills` without a restart. Restart only if that directory did not exist when the session started.

Pick one path. Installing the skill *and* the plugin gives you `/recap` and `/claude-code-recap:recap` side by side; they will not conflict, but you carry two copies of the description in the skill listing.

## <img src="assets/icons/terminal.svg" width="16" align="center"> What you see

```
◆ recap                                         6 sessions · 5 projects   14d ▂▁▄▃▅▂▆█▃▅▇▄▆█

── Today ─────────────────────────────────────────────────────────────────────────────────

  1 ● 14:22 12m ago  Fix the flaky auth test in the checkout flow                a3f91c02
             ↳ claude: Both tests pass now. Shall I squash and open the PR?
             ~/repos/shop-web  ·  ⎇ fix/flaky-auth  ·  opus-4.8  ·  46 turns  ·  ✎ 4 uncommitted  ·  ↑ 2 unpushed
             cd ~/repos/shop-web && claude -r a3f91c02-7b4e-4d19-9c2a-5f83e6d1b704

  2 ● 11:05  3h ago  Rewrite the ingest worker to stream instead of buffer       6d20be14
             ↳ you: hold on, the backpressure case is still wrong
             ~/repos/pipeline  ·  ⎇ main  ·  sonnet-4.5  ·  18 turns  ·  ✎ 1 uncommitted
             cd ~/repos/pipeline && claude -r 6d20be14-0a8f-49c7-8b31-1e4d90c7aa52

  3 ● 09:41  5h ago  Draft the migration plan for the billing schema             c17ff5a9
             ↳ claude: Plan written to MIGRATION.md, nothing applied yet.
             ~/repos/billing-svc  ·  ⎇ chore/migrate  ·  opus-4.8  ·  7 turns
             cd ~/rep
````
