retrospective
A reflection skill that helps the agent evaluate its process and propose changes when stuck in loops.
Install
mkdir -p .claude/skills/retrospective && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14558" && unzip -o skill.zip -d .claude/skills/retrospective && rm skill.zipInstalls to .claude/skills/retrospective
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Pause and reflect when you've been repeating the same actions or cycling through a failing loop. Produce a structured self-assessment with proposed config changes.Key capabilities
- →Reconstruct the last 5-10 actions taken
- →Assess actions that moved progress forward
- →Identify assumptions that were wrong or areas of spinning
- →Determine the root cause of repetitive or looping patterns
- →Propose specific, actionable config or workflow changes
- →Present self-assessment to the user for feedback
How it works
The skill reconstructs recent actions, assesses performance, identifies root causes of inefficiencies, and proposes specific configuration or workflow changes. It then presents this assessment to the user for approval.
Inputs & outputs
When to use retrospective
- →Debugging agent workflow loops
- →Improving consistency in task execution
- →Analyzing repeated errors
About this skill
Retrospective
Stop and reflect on your recent work before continuing.
When to Invoke
Invoke this skill when you notice either of these patterns:
Repetition pattern — you've used the same category of action 5+ times in a row without a meaningful change in approach. Examples:
- Five or more consecutive DB queries (psql, direct SQL, Flyway inspection)
- Five or more consecutive file reads without acting on what you found
- Five or more consecutive search attempts (Grep/Glob) that return empty or unhelpful results
- Five or more consecutive service restarts or rebuilds
- Five or more consecutive API or MCP calls of the same type (e.g. repeated Jira fetches, repeated Sentry searches, repeated Smartsheet reads)
Loop pattern — you've cycled through the same sequence of actions more than once without net progress. Examples:
- Write migration → start services → test → migration fails → update migration → repeat
- Edit code → run tests → same failure → edit same code again → repeat
- Fetch data → analyze → reach same conclusion → fetch more data → same conclusion → repeat
- Call API or MCP tool → get unexpected result → adjust params → call again → same unexpected result → adjust again → repeat
- Fetch Jira/Sentry/Smartsheet data → form hypothesis → fetch more data to confirm → hypothesis doesn't hold → fetch more data → repeat
What to Do
Step 1: Reconstruct what just happened
Write out the last 5–10 actions you took as a numbered list. Be specific — include tool names and what you were trying to learn or accomplish with each.
Step 2: Assess honestly
Things I did well:
- What actions moved me forward?
- What information did I successfully gather?
- What worked on the first try?
Things I did poorly:
- Where did I spin without making progress?
- What assumptions did I make that turned out to be wrong?
- What did I guess at when I should have read the source?
- Where did I go wide (many searches) when I should have gone deep (read one key file)?
Root cause of the loop or repetition:
- Was I missing a key piece of context I should have fetched first?
- Was I trying to confirm a hypothesis rather than test it?
- Was the approach fundamentally wrong and I kept patching instead of reframing?
Step 3: Propose config/workflow changes
Suggest specific, actionable changes — skewed toward local user configuration (CLAUDE.md additions, settings.json hooks, new skills, memory entries) that would prevent this pattern in future sessions. Examples:
- "Add a note to sp-ux-service/CLAUDE.md that X is always found at Y"
- "Add a memory entry that says always read the Flyway migration before writing a DB query"
- "Add a new skill that triggers before any migration file is created"
- "Add this pattern to the UserPromptSubmit hook's high-miss skills list"
Be concrete. Don't propose "be more careful" — propose a specific file change or hook.
Step 4: Present to user and incorporate feedback
Present your structured self-assessment:
- What just happened (brief)
- Did well / did poorly
- Proposed config changes (with specific file paths and content)
Then ask the user: "Does this match your read? Anything to add or correct?"
Wait for explicit approval before acting on any proposed changes. Do not write to CLAUDE.md files, memory, or settings until the user confirms. They may reject, redirect, or reframe the proposals entirely.
Anti-Patterns to Flag
- Guessing at column names, file paths, or API fields instead of reading the source
- Running the app to discover schema instead of reading migrations
- Making the same failing tool call with slightly different parameters
- Reading the same file multiple times in a session because you forgot what it contained
- Expanding scope to avoid admitting the current approach isn't working
When not to use it
- →When the agent is not repeating the same action 5+ times in a row
- →When the agent is not cycling through the same sequence of actions more than once without net progress
- →When the agent is expected to write to CLAUDE.md files, memory, or settings without explicit user approval
Limitations
- →The skill requires explicit user approval before acting on proposed changes.
- →The skill does not propose vague changes like 'be more careful'.
- →The skill flags anti-patterns like guessing or running the app to discover schema.
How it compares
This workflow provides a structured, self-correcting mechanism for an agent to analyze its own repetitive or failing patterns, leading to explicit configuration adjustments rather than continuing inefficient behaviors.
Compared to similar skills
retrospective side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| retrospective (this skill) | 0 | 4mo | No flags | Intermediate |
| agent-recovery | 0 | 5mo | Review | Beginner |
| n8n-expression-syntax | 6 | 4mo | No flags | Beginner |
| python-repl | 6 | 4mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
agent-recovery
JStaRFilms
Recovery protocols when agent is stuck—escalate to new agent, migrate context to new session, or reset mid-conversation.
n8n-expression-syntax
czlonkowski
Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.
python-repl
gptme
Interactive Python REPL automation with common helpers and best practices
n8n-validation-expert
czlonkowski
Interpret validation errors and guide fixing them. Use when encountering validation errors, validation warnings, false positives, operator structure issues, or need help understanding validation results. Also use when asking about validation profiles, error types, or the validation loop process.
powershell-windows
davila7
PowerShell Windows patterns. Critical pitfalls, operator syntax, error handling.
bats
OleksandrKucherenko
Bash Automated Testing System (BATS) for TDD-style testing of shell scripts. Use when: (1) Writing unit or integration tests for Bash scripts, (2) Testing CLI tools or shell functions, (3) Setting up test infrastructure with setup/teardown hooks, (4) Mocking external commands (curl, git, docker), (5) Generating JUnit reports for CI/CD, (6) Debugging test failures or flaky tests, (7) Implementing test-driven development for shell scripts.