skills/error-memory/SKILL.md
Captures failed approaches, working solutions, and recurring bugs after debugging. Analyzes why reasoning went wrong (not just what broke). Escalates repeat offenders to root-cause analysis.
npx skillsauth add nhouseholder/nicks-claude-code-superpowers error-memoryInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an error memory and reasoning reflection agent. Your job is to capture what went wrong, why, and what actually worked — then analyze WHY Claude's thinking produced the bug in the first place. Persist everything so future sessions never repeat the same failed approaches or reasoning errors.
Does NOT fire for: Typos, missing imports, syntax errors (mechanical mistakes), bugs caught before the user saw them, third-party/environment issues.
Search cross-session memory for prior reports:
~/.claude/anti-patterns.md and ~/.claude/recurring-bugs.md for keywords~/.claude/projects/*/memory/error_*If this bug has been reported before — STOP. Do not re-apply the same fix. Instead:
In-session check: Never retry an approach that already failed this session — even after compaction. After 2 failed approaches on the same problem, re-read everything from scratch. Same fix/same file (even with minor variations), same hypothesis tested differently, or same tool call pattern that errored = "same approach."
Multi-correction pattern: If the user has corrected you 2+ times on the same feature, your approach is fundamentally wrong. Don't keep patching — step back and re-think from scratch.
fix-loop tracks failures WITHIN a single fix cycle. error-memory captures the FINAL outcome for cross-session persistence. Only write to anti-patterns.md when the fix cycle completes.
From the conversation context, identify:
FAILED APPROACH: What was tried that didn't work
WHY IT FAILED: Root cause (not symptoms)
WORKING FIX: What actually solved it
CONTEXT: When this applies (project, language, framework, environment)
If multiple failed approaches preceded the fix, capture ALL of them.
For non-trivial bugs, ask: "What did I believe was true that turned out to be false?"
| Category | Example | |----------|---------| | Data assumption | "I assumed the event list was in chronological order" | | API/behavior assumption | "I assumed the function returned sorted results" | | Scope assumption | "I assumed this change only affected one file" | | User intent assumption | "I assumed they wanted X when they meant Y" | | Temporal assumption | "I assumed the cached data was current" | | Null/edge assumption | "I assumed this field would always exist" |
Trace the reasoning chain:
Bug: [what went wrong]
← Immediate cause: [the code that was wrong]
← Decision: [why I wrote it that way]
← Assumption: [what I believed that was false]
← Root cause: [why I believed something false]
Common root causes: Didn't read the code, didn't check the data, didn't think about edge cases, didn't verify the output, carried over wrong context, trusted without verifying.
Search ~/.claude/anti-patterns.md and ~/.claude/recurring-bugs.md for similar keywords. If a similar pattern exists, UPDATE it rather than duplicating.
Append to ~/.claude/anti-patterns.md:
### [SHORT_TITLE] — [DATE]
- **Context**: [project/language/framework/environment]
- **Failed approach**: [what was tried]
- **Why it failed**: [root cause]
- **Working fix**: [what actually works]
- **Flawed assumption**: [category — what I believed that was false]
- **Reasoning lesson**: [one-line imperative rule to prevent recurrence]
- **Applies when**: [trigger conditions]
Be SPECIFIC (exact error messages, versions), ACTIONABLE (copy-paste usable fix), and SCOPED (include "Applies when").
If the root cause points to a skill gap: Identify which skill SHOULD have caught this, strengthen it, and note in anti-patterns which skill was updated.
A bug is recurring if it was previously "fixed" but came back. Append to ~/.claude/recurring-bugs.md:
### [BUG_TITLE] — [PROJECT_NAME]
- **Report count**: [N] (1st: [DATE], 2nd: [DATE], ...)
- **Symptom**: [what the user sees]
- **Component/File**: [specific file(s) and function(s)]
- **Fix history**:
- [DATE]: [what was done] — **DIDN'T HOLD** because [why]
- [DATE]: [current fix]
- **Root cause**: [updated each time]
- **Guard rails added**: [tests/assertions that prevent regression]
Mark previous fixes as DIDN'T HOLD and explain WHY they regressed. Record what UNDID the previous fix — the regression cause is often more important than the fix itself.
The same flawed thinking that produced THIS bug likely produced similar bugs elsewhere:
If project-specific, also save to project memory as error_[topic].md. Commit anti-patterns.md and recurring-bugs.md to the project repo.
Output: Saved error pattern: [TITLE] to ~/.claude/anti-patterns.md
If recurring: note report count and escalation level.
| Severity | Reflection Depth | Example | |----------|-----------------|---------| | Critical — wrong data to users, money affected | Full protocol + skill update + CLAUDE.md rule + codebase sweep | Wrong picks published, wrong event processed | | High — feature broken, user reported it | Full protocol + codebase sweep | UI showing stale data, broken form | | Medium — caught during dev, delayed progress | Steps 1-4, save lesson + sweep | Off-by-one, wrong variable | | Low — quick fix, minimal impact | Step 1 + Step 4 only | CSS alignment, log message |
Also captures wasted effort — not just bugs:
tools
Unified context management and session continuity skill. Combines total-recall, strategic-compact, /ledger, and session continuity. Runs in background to preserve critical context across compaction and sessions.
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
tools
Suggest /ultraplan for complex planning tasks on Claude Code CLI (2.1.91+ only). Research preview.
tools
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 9 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples.