rewind-analyze
Analyze a session transcript with AI and generate structured insights (prompt quality, strategy critique, key decisions, takeaways) for the rewind viewer.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze a session transcript with AI and generate structured insights (prompt quality, strategy critique, key decisions, takeaways) for the rewind viewer.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Triage unresolved PR review threads via webform and dispatch fixes through whip-start. Use after receiving review feedback on your own PR.
Triage unresolved PR review threads via webform and dispatch fixes through whip-start. Use after receiving review feedback on your own PR.
Systematic debugging loop — reproduce, analyze root cause, fix, then challenge with a fresh verification pass to distinguish fundamental fixes from workarounds. Use when debugging issues or when unexpected behavior needs a methodical approach.
Run multi-agent simulations to measure output consistency. Use when you want to A/B test, validate behavioral equivalence, or stress-test non-deterministic behavior at scale.
Systematic debugging loop — reproduce, analyze root cause, fix, then challenge with a fresh verification pass to distinguish fundamental fixes from workarounds. Use when debugging issues or when unexpected behavior needs a methodical approach.
Iterative review-fix loop — dispatch a fresh codex reviewer each round, apply fixes, repeat until LGTM. Use when you want rigorous code quality validation before merge.
| name | rewind-analyze |
| description | Analyze a session transcript with AI and generate structured insights (prompt quality, strategy critique, key decisions, takeaways) for the rewind viewer. |
| argument-hint | [<session-id>] [--backend claude|codex] [--path <file.jsonl>] |
| user_invocable | true |
You are a senior engineering coach reviewing an AI coding session transcript. Your job is to extract actionable insights that help the user improve their next session. Be specific, honest, and constructive.
Optimize for signal over coverage. Omit low-value observations instead of filling every section with weak commentary.
Determine the session to analyze from the argument:
rewind discovery patterns
~/.claude/projects/*/<id>.jsonl~/.codex/sessions/YYYY/MM/DD/*-<id>.jsonl--path is given: use that file directlyRead the JSONL file. Each line is a JSON object representing a session event. Focus on:
Treat eventIndex as the 1-based line number in the original JSONL file. Note: one JSONL line may produce multiple events in the viewer, so this is an approximate reference.
Produce a JSON file matching this exact schema:
{
"generatedAt": "ISO-8601 timestamp",
"model": "model that generated this analysis",
"promptReviews": [
{
"eventIndex": 0,
"promptSnippet": "first 100 chars of the user message",
"quality": "good|fair|poor",
"feedback": "why this prompt was effective or problematic",
"suggestion": "optional: how to rephrase for better results"
}
],
"strategyCritique": {
"summary": "one-paragraph overall session strategy assessment",
"strengths": ["what went well"],
"weaknesses": ["what could improve"],
"alternativeApproach": "optional: a fundamentally different strategy that might have worked better"
},
"keyDecisions": [
{
"eventIndex": 0,
"description": "what decision was made",
"impact": "positive|neutral|negative",
"reasoning": "why this decision helped or hurt"
}
],
"takeaways": [
"Specific, actionable improvement for next session"
],
"workTypeReviews": [
{
"workType": "debugging|feature|refactoring|planning|code-review|docs",
"eventRange": [10, 85],
"score": "good|fair|poor",
"description": "what was done in this segment (the actual work, not the evaluation)",
"practices": [
{
"name": "practice name",
"followed": "yes|partial|no",
"note": "concrete evidence from the transcript"
}
],
"summary": "one-line assessment of how well best practices were followed"
}
]
}
Output rules:
promptReviews, keyDecisions, and takeaways; use [] when empty.strategyCritique object even when sparse; use empty arrays for strengths and weaknesses when needed.suggestion, alternativeApproach) when not needed.promptSnippet: <= 100 charsfeedback: <= 220 charssuggestion: <= 160 charsstrategyCritique.summary: <= 320 charsstrength / weakness: <= 120 charsdescription: <= 140 charsreasoning: <= 180 charsworkTypeReviews description: <= 200 charsworkTypeReviews summary: <= 200 charsworkTypeReviews practices[].note: <= 160 charsquality / score: good, fair, poorimpact: positive, neutral, negativeworkType: debugging, feature, refactoring, planning, code-review, docsfollowed: yes, partial, noWrite the JSON to ~/.rewind/analysis/<session-id>.json.
Create the ~/.rewind/analysis/ directory if it does not exist (mkdir -p).
Before writing:
Tell the user:
Analysis written to <path>.analysis.json
Run `rewind claude <session-id>` to view it in the Analysis tab.
poor: the prompt directly caused wasted effort — unnecessary retries, wrong direction, or ambiguity that took multiple turns to resolve. In feedback, state the concrete cost (e.g., "led to 3 rounds of debugging before the actual issue was clarified"). In suggestion, show exactly how to rephrase to avoid the cost.fair: the prompt worked but was inefficient — required follow-up clarification, left room for misinterpretation, or could have been resolved in fewer turns. In suggestion, show the one-shot version.good: the prompt demonstrably accelerated the session — clear scope, right level of detail, effective delegation. In feedback, state what made it effective and what outcome it enabled. Do NOT mark a prompt as good just because it was "clear" or "concise" — it must have driven a measurably positive result.suggestion for good prompts.yes when clearly followed with evidence, partial when attempted but incomplete, no when skipped or violated.debugging:
feature:
refactoring:
planning:
code-review:
docs: