retro
Installation
SKILL.md
Context — gather first
Collect these with individual Bash calls, one command per call:
- Claude session id —
printenv CLAUDE_CODE_SESSION_ID - Current branch —
git branch --show-current - Recent commits —
git log --oneline -5 - Working tree status —
git status --porcelain, reading at most the first 20 entries - Changed files (staged+unstaged) —
git diff --name-only HEAD
Treat any failure as an unknown value and carry on. These are gathered here rather than pre-computed
because a worktree-isolated agent refuses any command carrying a $-expansion, which made this skill
fail at load — keep $-expansion out of the pre-compute block (#1687).
Purpose
The self-improvement loop. Answers: "What happened, what did we learn, and how do we prevent the same mistakes next time?" Every other workflow stage is about the current task; this skill is about the next task — and every task after that.