mcpbeat Sign in

Phx Learn From Fix Skill for Claude

Capture Elixir/Ecto/LiveView lessons and Hex API rules. Use after corrections or when asked to document learning…

3k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
514
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/oliver-kriska/claude-elixir-phoenix --skill phx-learn-from-fix

What comes with it

5 929 bytes besides the instruction
references/common-mistakes.md

The instruction itself

14 sections, as written by the author

Learn From Fix

After fixing a bug or receiving a correction, capture the lesson

to prevent future mistakes.

Usage

$elixir-phoenix:phx-learn-from-fix Fixed N+1 query in user listing - was missing preload
$elixir-phoenix:phx-learn-from-fix String vs atom key mismatch in params handling
$elixir-phoenix:phx-learn-from-fix LiveView assign_async needs render_async in tests
$elixir-phoenix:phx-learn-from-fix --library ical --scope personal ICal.to_ics output needs CRLF line endings
$elixir-phoenix:phx-learn-from-fix --library ical --scope project Use method: "PUBLISH" for calendar feeds

Workflow

Step 1: Verify the Lesson

Persist only one of:

  • A completed fix verified by tests, reproduction, or user confirmation
  • An explicit rule the user taught or asked to save

Stop without writing if neither condition is met.

Do not save a hypothesis, unverified workaround, investigation narrative, or

unsolved error. Use $elixir-phoenix:phx-compound for a detailed completed investigation.

Capture the root cause as a concise actionable rule, not the symptom.

Step 2: Select the Route

When both --library <package> and --scope personal|project are present,

use the Library Route. Require both flags; do not guess scope.

For the skill directory only, trim surrounding whitespace and lowercase the

package name. Preserve underscores when forming directory names

(phoenix_live_view becomes hex-phoenix_live_view).

Validate the normalized name against ^[a-z][a-z0-9_]+$. If it does not match,

ask for a valid Hex package identifier instead of replacing characters or

inventing a name. Use the trimmed original identifier, not the normalized

directory name, to look up mix.lock.

Without --library, use the General Correction Route.

Step 3: Check Existing Knowledge

Check if already documented:

  • Grep project CLAUDE.md and ~/.claude/CLAUDE.md for the pattern keyword
  • Check auto-memory files for similar lessons
  • For library lessons, inspect both

~/.claude/skills/hex-<package>/SKILL.md and

.claude/skills/hex-<package>/SKILL.md

  • Read references/common-mistakes.md (READ-ONLY plugin

reference — do NOT edit this file)

Do not duplicate the same lesson across CLAUDE.md, memory, and a package skill.

If the same rule exists, merge wording or report it as already captured.

Library Route

CRITICAL: NEVER edit plugin files. Files under

~/.claude/plugins/ are cached and get overwritten on updates.

Package skills are user-owned files, never plugin cache files.

Resolve Scope and Precedence

| --scope | Canonical destination |

|-----------|-----------------------|

| personal | ~/.claude/skills/hex-<package>/SKILL.md |

| project | .claude/skills/hex-<package>/SKILL.md |

Personal skills override same-named project skills. If a personal

hex-<package> skill exists, never unknowingly create or update a shadowed

project skill: explain the conflict and ask whether to update personal scope or

keep distinct project-only knowledge. If project scope already exists before a

personal write, warn that the new skill will shadow it and offer to merge or

move it. Maintain one canonical skill per package unless the user explicitly

needs distinct scope-specific rules; never create one skill per lesson.

Read the Locked Version

Inspect mix.lock for the package. Record the exact locked version when found.

If it is absent, say the lesson is not tied to a locally locked version and do

not invent one. Qualify version-sensitive rules. When two verified rules

conflict across versions, preserve both with explicit version ranges instead of

replacing either.

Create or Safely Update the Skill

For a new package skill, create:

---
name: hex-<package>
description: <Package/module/API/task trigger terms for this knowledge>
user-invocable: false
---

# <Package> Knowledge

## Verified Rules

- **<Rule>** (verified with <package> <version>): <actionable guidance>

Make the description precise: include the Hex package, Elixir module names,

important APIs/file formats, and tasks that should trigger this knowledge.

Activation is model-selected from this description; package presence in

mix.lock does not guarantee activation.

Before updating an existing skill, read all of it. Preserve unrelated and

hand-authored sections. Merge semantically identical rules. If safe merging is

unclear, show the conflict and ask instead of overwriting content.

Do not add paths: to a personal package skill by default: it is a file-path

activation gate, not a dependency predicate. Add paths: only to project scope

when explicitly appropriate and meaningful package-specific paths exist.

General Correction Route

Choose the narrowest non-library destination:

| Scope | Write to | Example |

|-------|----------|---------|

| This project | Project CLAUDE.md | "Never use raw SQL in this app" |

| This project across sessions | Project-keyed auto-memory | "jsonb uses string keys" |

| All your projects | ~/.claude/CLAUDE.md personal instructions | "Prefer explicit error tuples" |

| Detailed completed fix | .claude/solutions/ via $elixir-phoenix:phx-compound | Debugging narrative |

For project or personal instructions, preserve existing content and append

RULE NAME — Do NOT [bad]. Instead [good] under the relevant category. Use

personal instructions only for rules that should load in every project. For

auto-memory, append to the project-keyed

~/.claude/projects/{project-hash}/memory/MEMORY.md:

### Lesson: [Title]
- **Pattern**: Do NOT [bad] — instead [good]
- **Why**: [root cause explanation]

If the lesson is universal to the plugin rather than one project or package,

suggest a plugin contribution; never write it into cached plugin files.

Output

After capturing, confirm:

Lesson captured in [location]

Pattern: Do NOT [bad pattern] — instead [good pattern]
Category: [Ecto/LiveView/OTP/Testing/etc]
Version: [locked package version, not found, or not applicable]

For package skills, also state that description-based activation is

model-selected, not guaranteed by mix.lock.

Iron Laws

  • NEVER write generated knowledge to plugin cache — use only the user-owned destinations above
  • DO NOT duplicate existing lessons — always check CLAUDE.md and memory before writing
  • NEVER overwrite hand-authored content — read both package skill scopes and merge safely
  • ONLY persist verified knowledge — completed fixes or explicit user-taught rules, never hypotheses
  • DISCLOSE scope precedence — a global package skill shadows its project counterpart

References (READ-ONLY — do NOT edit)

  • references/common-mistakes.md — Common Elixir mistakes

reference. Consult when checking for duplicates. Ships with

the plugin — NEVER modify.

Other skills for the same job

different authors, same section of the catalogue
DOCX
by anthropics
vendor ×16

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

7k tokens
PDF
by anthropics
vendor ×16

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

13k tokens scripts
PPTX
by JayZeeDesign
×15

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

308k tokens scripts
Canvas Design
by anthropics
vendor ×13

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

1388k tokens
PDF
by anthropics
vendor ×10

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

15k tokens scripts
DOCX
by w95
×6

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

5k tokens
PPTX
by w95
×4

Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.

2k tokens
Obsidian Markdown
by ZhanlinCui
×3

Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.

3k tokens

How to use it

Copy the folder

Take oliver-kriska/claude-elixir-phoenix-phx-learn-from-fix from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.