From vibe-replay
Finds, analyzes, and shares AI coding sessions (Claude Code, Cursor, Codex) using vibe-replay. Generates replay artifacts, session summaries, and attaches context to PRs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/vibe-replay:replayThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill helps agents find local AI coding sessions, generate shareable replay artifacts, and paste polished session context into PRs. It uses [vibe-replay](https://github.com/tuo-lei/vibe-replay) for the raw session discovery, parsing, redaction, analytics, and export work, then uses agent judgment for review, cleanup, and sharing decisions.
This skill helps agents find local AI coding sessions, generate shareable replay artifacts, and paste polished session context into PRs. It uses vibe-replay for the raw session discovery, parsing, redaction, analytics, and export work, then uses agent judgment for review, cleanup, and sharing decisions.
Use this skill when the user asks to:
Plain text summaries of an AI session - stats, tool breakdown, per-prompt details - are hard for an agent to write from scratch. Delegate that to vibe-replay, then use agent reasoning to handle the things a CLI cannot decide well:
Each cleanup step is opt-in. Ask the user before rewriting their content.
Prefer structured discovery over manually browsing local history.
Use the provided path. Infer the provider when possible:
~/.cursor/projects/.../agent-transcripts/....~/.claude/projects/.../*.jsonl.vibe-replay sessions; if the path is not obviously Claude or Cursor, pass the provider returned by search or ask the user.Find the current session file with ${CLAUDE_SESSION_ID}:
grep -l '"sessionId":"${CLAUDE_SESSION_ID}"' ~/.claude/projects/*/*.jsonl 2>/dev/null
If multiple files match (normal after /resume), pick the oldest. vibe-replay auto-discovers related files by slug/project.
Use vibe-replay sessions first. Prefer --json so results can be ranked without scraping terminal text:
npx vibe-replay sessions --query "<terms>" --limit 10 --json
Useful filters:
npx vibe-replay sessions --project "vibe-replay" --json
npx vibe-replay sessions --provider cursor --query "auth bug" --json
npx vibe-replay sessions --query "codex parser" --scan --json
npx vibe-replay sessions --query "PR review CI" --any --brief --dedupe --json
Search workflow:
--query or --project, --limit 10, and --json.--any.--brief when the user asks a fuzzy retrospective question; it adds matchQuality, matched/unmatched terms, whyMatched, brief, signals, and suggestedNextAction.--dedupe when repeated long-prompt sessions from multiple workspaces clutter results.--scan for a narrowed candidate set when the user asks about retro, efficiency, prompt quality, cost, tool usage, compactions, API errors, files modified, or session quality.Avoid broad --scan over many sessions. It is intentionally available, but expensive compared with metadata search.
If --json returns an empty array, verify vibe-replay is installed and accessible:
npx vibe-replay --version
Then broaden or drop the query, retry with --any, filter by project/provider, or ask the user for a session path directly.
For search results, return a short ranked list with provider, timestamp, project, title or first prompt preview, slug/session id, why it matched, and whether deeper scan/replay is recommended. Do not dump full raw prompts unless the user asks.
After choosing a session, branch by intent:
Once you have a session path and provider, run vibe-replay with the provider when known:
npx vibe-replay --provider <provider> --session <PATH> --github
For Claude Code, --provider claude-code may be omitted because it is the default, but include the provider when it came from vibe-replay sessions. For Cursor, use --provider cursor. For Codex, use --provider codex.
This writes to ~/.vibe-replay/<slug>/:
github-summary.md - the markdown summary to paste into the PR.redactions.json - credential audit report.session-preview.gif / .svg - preview animations; skip unless the user explicitly asks.If the user asks for an interactive local replay instead of PR artifacts, run:
npx vibe-replay --provider <provider> --session <PATH> --open
Read redactions.json. It has two fields:
alreadyRedactedCount - how many secrets vibe-replay already replaced with [REDACTED] automatically. Just report this number to the user.leftoverFindings - regex hits in the final markdown that vibe-replay was not confident enough to auto-redact.If leftoverFindings is empty, say so and move on.
If leftoverFindings is non-empty, present the findings to the user. For each one:
If the user chooses to redact any finding, first copy the original to a working file. Do not overwrite github-summary.md:
cp ~/.vibe-replay/<slug>/github-summary.md ~/.vibe-replay/<slug>/github-summary.clean.md
Then apply replacements to github-summary.clean.md. The original stays intact so the user can recover the unedited version. All later steps (translation, tone) also operate on the .clean.md copy. Create it on the first edit, then keep using it.
Read the working file (github-summary.clean.md if it exists from step 3, otherwise github-summary.md):
cat ~/.vibe-replay/<slug>/github-summary.clean.md 2>/dev/null || cat ~/.vibe-replay/<slug>/github-summary.md
Detect the language of the user-prompt sections. If the dominant language is not English (or does not match the repo's primary language - check README.md if unsure), ask:
"The prompts are in {detected language}. Translate to {target language} before sharing? [Yes / No]"
If yes, apply this prompt to the user-prompt sections of the markdown (always write the result to github-summary.clean.md, creating it from a copy of the original if it doesn't exist yet):
You are a translation assistant for AI coding sessions.
Translate the following user prompts from {source} to {target}.
Rules:
- Only translate natural language text
- Preserve code blocks, file paths, variable names, CLI commands verbatim
- Preserve markdown formatting
- Keep technical jargon in English (API, endpoint, middleware, etc.)
- Maintain the original intent and tone
- If a prompt is already in {target}, return it unchanged
Only rewrite the prompt text. Do not touch tool-call output, file diffs, or stats.
Scan the user-prompt sections for harsh language, profanity, frustration, or passive-aggressive tone toward the AI. If you find any, ask:
"Some prompts contain {brief example, e.g. 'frustrated language'}. Soften the tone before sharing? [Professional / Neutral / Friendly / Skip]"
If the user picks a style, apply this prompt to the affected user prompts (write the result to github-summary.clean.md, same rule as step 3):
You are a tone adjustment assistant for AI coding sessions.
Rewrite the following user prompts to be more {style}.
Rules:
- Preserve the EXACT technical meaning and intent
- Remove frustration, harsh language, profanity, or passive-aggressive tone
- Keep code references, file paths, and technical terms unchanged
- If a prompt is already appropriate, return it unchanged
- Do NOT add excessive politeness or corporate-speak - keep it natural
Style guide:
- Professional: direct but respectful, suitable for work sharing
- Neutral: factual and unemotional, like documentation
- Friendly: warm and collaborative, like messaging a teammate
If the user asked for a session retro instead of PR sharing, do not generate or clean github-summary.md. Narrow the candidate set first, then use scan-backed results:
npx vibe-replay sessions --project "<project>" --limit 5 --scan --json
If the user gave search terms instead of a project, use a narrowed query:
npx vibe-replay sessions --query "<terms>" --limit 5 --scan --json
Separate observations from recommendations.
For efficiency analysis, look at:
Prefer actionable advice such as "the first prompt had a clear goal but missed verification criteria" or "the session became expensive because it searched broadly before narrowing to one file."
Show the user the final markdown (or a diff against the original if changes were made). Ask:
"Paste into a PR now? [Append to current PR's body / Replace current PR's body / Open new PR / Just save the file / Cancel]"
Important: gh pr edit --body-file <file> replaces the entire PR body. If the user already has a hand-written summary, checklist, or screenshots in the PR body, replacing wipes them silently. Default to appending under a ## Session Replay heading instead.
To append (recommended default):
# Read existing body, then write existing + separator + cleaned summary
gh pr view --json body --jq .body > /tmp/pr-body.md
SUMMARY=$(ls ~/.vibe-replay/<slug>/github-summary.clean.md 2>/dev/null || echo ~/.vibe-replay/<slug>/github-summary.md)
echo "" >> /tmp/pr-body.md
echo "---" >> /tmp/pr-body.md
echo "" >> /tmp/pr-body.md
echo "## Session Replay" >> /tmp/pr-body.md
echo "" >> /tmp/pr-body.md
cat "$SUMMARY" >> /tmp/pr-body.md
gh pr edit --body-file /tmp/pr-body.md
To replace, only if the user explicitly chooses this, confirm out loud what is about to be lost first:
gh pr edit --body-file ~/.vibe-replay/<slug>/github-summary.clean.md
If saving locally only, the cleaned version is already at ~/.vibe-replay/<slug>/github-summary.clean.md from earlier steps. Just report the path. If no cleanup steps ran, copy the original first so the user has a .clean.md to share without touching the source.
github-summary.clean.md is the only shareable markdown file the skill edits. The original github-summary.md is treated as read-only so the user can always recover the raw output.${CLAUDE_SESSION_ID} is interpolated by the Claude Code harness when this skill runs. If it is empty or no file matches, ask the user which session to use or search with vibe-replay sessions.vibe-replay sessions as metadata/subsequence search, not semantic search. If results are weak, broaden terms, filter by project/provider, or inspect a small number of returned transcripts.npx claudepluginhub tuo-lei/vibe-replay --plugin vibe-replayRecaps Claude Code sessions using claude-view tools to list recent ones, fetch details, and summarize duration, model, turns, commits, metrics. Activates on recap/summary/review requests.
Searches, recovers, and analyzes AI session histories across Claude Code, AI Studio, and Gemini CLI. Useful for recovering lost files after compaction, searching conversations, detecting corrections, and self-improvement workflows.
Reflects on the current Claude Code session to produce a structured retrospective with what went well, what didn't, and actionable takeaways.