agent-retro
Installation
SKILL.md
Agent retro
Find changes to the agent's environment that would have prevented the trouble in these sessions. Return a report and change nothing.
Steps
- Collect the session logs from every local agent harness, such as Claude Code and Codex, for the requested timeframe. Without a timeframe, use the current session.
- Search the logs for trouble before reading them in full: user corrections, interrupts, denied or failed tool calls, approval prompts, reverted edits, repeated searches, and repeated review findings. Read the excerpts around each.
- Group the trouble by cause. Across several sessions, keep a cause only when it appears in at least two of them. Count a subagent or review thread as part of the session that started it. Tag each cause as global, specific to one repo, or specific to one tech stack.
- Propose a fix for each cause from the categories below, in the place its tag points to. Prefer a check or a review rule to an always-loaded instruction, because the implementing agent carries the most context. Apply
write-for-agentsto any instruction you propose. - Return the candidates ranked by how often each recurred and what it cost. Give each its category, tag, evidence (session, date, and a short quote with secrets redacted), and proposed fix. Mark a cause whose fix already exists as fixed, and say how to confirm the fix took effect. Finish when every cause from step 3 has a candidate.