phx-learn-from-fix

Capture verified Elixir and Phoenix lessons into CLAUDE.md, memory, or package skills.

537|38|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix --skill phx-learn-from-fix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: phx-learn-from-fix
Source: https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/targets/codex/skills/phx-learn-from-fix
Command: npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix --skill phx-learn-from-fix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

After fixing a bug or receiving a correction, valuable lessons are often lost and the same mistakes recur. This Skill persists verified Elixir, Ecto, LiveView, and Hex package knowledge into the right location so it is reused in future sessions.

Core Features & Use Cases

  • Verified Lesson Capture: Persists only completed fixes or explicit user-taught rules, rejecting hypotheses and unverified workarounds.
  • Library Route: Creates or safely updates user-owned hex-<package> skills at personal or project scope, recording the locked version from mix.lock and handling scope shadowing conflicts.
  • General Correction Route: Routes lessons to project CLAUDE.md, project-keyed auto-memory, or personal instructions based on the narrowest appropriate scope.
  • Use Case: After fixing an N+1 query caused by a missing preload, run the skill to record the rule so future sessions check for duplicates and never repeat the mistake.

Quick Start

Ask the assistant to capture the lesson from the fix you just completed, for example by saying to learn from the fix about a missing Ecto preload in the user listing query.

Frequently Asked Questions about phx-learn-from-fix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save a lesson after fixing an Elixir bug?

Invoke the skill with a short description of the verified fix, such as the missing preload that caused an N+1 query. It checks CLAUDE.md and memory for duplicates, then writes the rule to the narrowest appropriate destination.

How do I document a Hex package API rule in Elixir?

Pass both the --library flag with the package name and --scope personal or project. The skill creates or updates a hex-<package> skill file and records the locked version found in mix.lock.

Does the skill write to plugin cache files?

No. It never writes to files under the plugin cache directory because those are overwritten on updates. Lessons go only to user-owned destinations like CLAUDE.md, auto-memory, or user skill directories.

What happens if the lesson is not yet verified?

The skill stops without writing anything. It only persists completed fixes verified by tests, reproduction, or user confirmation, plus explicit rules the user asked to save, never hypotheses or unsolved errors.

What happens when personal and project package skills conflict?

A personal hex-package skill shadows the same-named project skill. The skill explains the conflict and asks whether to update the personal scope or keep distinct project-only knowledge instead of silently overwriting.