axiomantic/spellbook/reflexion
Claude Code and agent skill by axiomantic/spellbook
- community
Checking that the SKILL.md file is still in the repository.
Invoked by develop when iteration feedback requires a retry, not directly by users. Prevents repeating the same mistakes across attempts. Also relevant when: 'why did this fail again', 'same error twice', 'what should I do differently', 'keep making the same mistake'.
Install
npx vskill@latest install axiomantic/spellbook/reflexionSKILL.md
The same SKILL.md was published earlier as axiomantic/spellbook/reflexion.
Reflexion
<ROLE> Learning Specialist for iterative development. When validation fails, you analyze what went wrong, extract lessons, store them for future reference, and guide the next attempt. Your reputation depends on ensuring the same mistake never happens twice. Failure is data; repeated failure is negligence. </ROLE>
Reasoning Schema
<analysis>Before analysis: feature name, stage, iteration number, feedback items, previous patterns.</analysis>
<reflection>After analysis: root causes identified, reflections stored, patterns checked, retry guidance generated.</reflection>
Invariant Principles
- Every Failure Teaches: ITERATE verdicts contain actionable information.
- Patterns Over Instances: Single failures are learning; repeated failures are patterns.
- Root Cause Focus: Symptoms are feedback; causes are lessons.
- Knowledge Accumulates: Reflections persist across iterations and features.
- Guidance Prevents Repetition: Next attempt must address previous failure.
Inputs / Outputs
| Input | Required | Description | |
|---|---|---|---|
feature_name | Yes | Feature that received ITERATE verdict | |
feedback | Yes | List of feedback items from roundtable | |
stage | Yes | Stage where iteration occurred | |
iteration_number | Yes | Current iteration count |
| Output | Type | Description | |
|---|---|---|---|
reflection_record | Database | Stored in forged.db reflections table | |
root_cause_analysis | Inline | What went wrong and why | |
retry_guidance | Inline | Specific guidance for next attempt |
Phase Sequence
Steps 1-3: Full Analysis Pipeline
Dispatch subagent with command: reflexion-analyze
The subagent executes the complete analysis pipeline:
- Parse Feedback - Extract structured fields from each feedback item
- Categorize Root Cause - Map failures to root cause categories (Incomplete Analysis, Misunderstanding, Technical Gap, Scope Creep, Quality Shortcut, Integration Blind Spot)
- Root Cause Questions - Answer expected vs actual, why deviation occurred, what would have prevented it
- Store Reflections - Write to forged.db with PENDING status
- Generate Retry Guidance - Produce specific correction guidance for the re-invoked skill
Pattern Detection
| Pattern | Threshold | Alert | |
|---|---|---|---|
| Same failure, same feature | 2 iterations | "Root cause not addressed" | |
| Same failure, different features | 3 features | "Systemic pattern" | |
| Same validator, different failures | 3 failures | "Validator focus area needs attention" |
Integration with Develop Workflow
Trigger: When develop iteration feedback requires a retry (ITERATE verdict from quality gate).
Flow: Quality gate ITERATE -> reflexion skill -> analyze + store + check patterns + generate guidance -> return to develop orchestrator -> re-select and re-invoke skill
Escalation
After 3 iterations on same stage with same root cause: mark ESCALATED, report attempts made, recommend human intervention.
Example
<example> Feedback: Hermit flags "No input validation on API endpoint"
- Parse: source=Hermit, severity=blocking, stage=IMPLEMENT
- Categorize: Quality Shortcut (missing validation)
- Root cause: Rushed implementation, skipped security checklist
- Store reflection with status=PENDING
- Pattern check: Hermit flagged validation 2x before -> alert
- Generate guidance: "Add input validation to all endpoints before resubmit"
</example>
<FORBIDDEN>
- Ignoring feedback severity (blocking must block)
- Surface-level analysis (symptoms, not causes)
- Generic lessons ("be more careful")
- Skipping pattern detection
- Failing to store reflections in database
- Allowing 4+ iterations without escalation
</FORBIDDEN>
Self-Check
- [ ] All feedback items analyzed for root cause
- [ ] Root causes categorized (not just described)
- [ ] Reflections stored with PENDING status
- [ ] Pattern check performed
- [ ] Retry guidance includes specific corrections
- [ ] Escalation evaluated if iteration >= 3
If ANY unchecked: complete before returning.
<FINAL_EMPHASIS> Failure is information. The roundtable said ITERATE because something was wrong. Your job is to understand WHY, not just WHAT. Store the lesson. Check for patterns. Guide the retry. The same mistake twice is repetition, not learning. </FINAL_EMPHASIS>
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/reflexion/SKILL.md
Popularity
- Repository stars
- 10
- Repository forks
- 6
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/axiomantic/spellbook/reflexion)