plugins/elixir-phoenix/skills/learn-from-fix/SKILL.md
Capture lessons after fixing a bug or receiving a correction — ecto, liveview, oban, iron law mistakes. Use when the user corrects your approach or teaches a pattern.
npx skillsauth add oliver-kriska/claude-elixir-phoenix phx:learn-from-fixInstall 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.
After fixing a bug or receiving a correction, capture the lesson to prevent future mistakes.
/phx:learn-from-fix Fixed N+1 query in user listing - was missing preload
/phx:learn-from-fix String vs atom key mismatch in params handling
/phx:learn-from-fix LiveView assign_async needs render_async in tests
Look at recent conversation context. Ask yourself:
Check if already documented:
${CLAUDE_SKILL_DIR}/references/common-mistakes.md (READ-ONLY plugin
reference — do NOT edit this file)If already documented, tell the user and stop.
CRITICAL: NEVER edit plugin files. Files under
~/.claude/plugins/ are cached and get overwritten on updates.
Always write to project or memory locations.
| Scope | Write to | Example |
|-------|----------|---------|
| This project only | Project CLAUDE.md | "Never use raw SQL in this app" |
| All Elixir projects | Auto-memory MEMORY.md | "jsonb always uses string keys" |
| Detailed fix with context | .claude/solutions/ via /phx:compound | Complex debugging story |
For project CLAUDE.md — append a concise rule:
### [Category] Iron Laws (continued)
N. **[SHORT RULE NAME]** — Do NOT [bad pattern]. Instead [good pattern]
For auto-memory — append to
~/.claude/projects/{project-hash}/memory/MEMORY.md:
### Lesson: [Title]
- **Pattern**: Do NOT [bad] — instead [good]
- **Why**: [root cause explanation]
If the lesson is significant enough to be an Iron Law:
After capturing, confirm:
Lesson captured in [location]
Pattern: Do NOT [bad pattern] — instead [good pattern]
Category: [Ecto/LiveView/OTP/Testing/etc]
~/.claude/plugins/ are cached and overwritten on updates${CLAUDE_SKILL_DIR}/references/common-mistakes.md — Common Elixir mistakes
reference. Consult when checking for duplicates. Ships with
the plugin — NEVER modify.development
Verify Elixir/Phoenix changes — compile, format, and test in one loop. Use after implementation, before PRs, or after fixing bugs.
development
OTP/BEAM patterns and Elixir idioms — GenServer, Supervisor, Task, Registry, pattern matching, with chains, pipes. Use when designing processes or debugging BEAM issues.
tools
Self-improving loop for plugin skills. Reads program.md, proposes one mutation per iteration, evaluates against deterministic scorer, keeps improvements via git, reverts failures. Targets weakest skill+dimension. Use with /loop for overnight runs.
development
Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.