phx-learn-from-fix

phx-learn-from-fix is a skill for Claude Code, Codex from oliver-kriska/claude-elixir-phoenix. It costs 49 tokens per session (1,616 once invoked), scanned A, a copy of learn-from-fix, MIT.

A lesson-recording command for Elixir, Ecto, and LiveView projects. Ecto is Elixir’s database toolkit, and LiveView builds interactive web pages; the command saves verified fixes or explicit package rules for later use.

In plain words
What is it for?
Use it after a tested bug fix, a user correction, or when recording a verified rule for an Elixir package.
Why use it?
It helps prevent the same confirmed mistake from being made again by turning fixes into reusable guidance.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it after a tested bug fix, a user correction, or when recording a verified rule for an Elixir package.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/oliver-kriska/claude-elixir-phoenix/phx-learn-from-fix
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add oliver-kriska/claude-elixir-phoenix --skill phx-learn-from-fix
Clone the repo
git clone --depth 1 https://github.com/oliver-kriska/claude-elixir-phoenix

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for phx-learn-from-fix

README.md
[![agentmods](https://agentmods.dev/badge/skills/oliver-kriska/claude-elixir-phoenix/phx-learn-from-fix/github.svg)](https://agentmods.dev/skills/oliver-kriska/claude-elixir-phoenix/phx-learn-from-fix)
Your own site
<a href="https://agentmods.dev/skills/oliver-kriska/claude-elixir-phoenix/phx-learn-from-fix"><img src="https://agentmods.dev/badge/skills/oliver-kriska/claude-elixir-phoenix/phx-learn-from-fix/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for phx-learn-from-fix

Your own site · 80×15
<a href="https://agentmods.dev/skills/oliver-kriska/claude-elixir-phoenix/phx-learn-from-fix"><img src="https://agentmods.dev/badge/skills/oliver-kriska/claude-elixir-phoenix/phx-learn-from-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,616 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 94% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.01616
Opus 5 $0.00024 $0.00808
Sonnet 5 $0.00010 $0.00323
Haiku 4.5 $0.00005 $0.00162

Measured 6d ago against content hash f06291565acc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

phx-learn-from-fix scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

94% identical to learn-from-fix — 26 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

targets/amp/skills/phx-learn-from-fix/SKILL.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Learn From Fix

After fixing a bug or receiving a correction, capture the lesson to prevent future mistakes.

Usage

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
phx-learn-from-fix --library ical --scope personal ICal.to_ics output needs CRLF line endings
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 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)

Read the full file on GitHub · 180 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 180 lines · 49 tokens per session scan A f06291565acc

Subscribe to this mod's changes

phx-learn-from-fix is a skill published in the GitHub repository oliver-kriska/claude-elixir-phoenix (542 stars, last pushed 4d ago), licensed MIT. It adds 49 tokens to every session and 1,616 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to learn-from-fix, differing in 26 lines, and is treated as a copy.

Related

Other skills, from other repositories

craftcms

Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…

michtio/craftcms-claude-skills · 327 tokens

craft-php-guidelines

Craft CMS 5 PHP coding standards and conventions. ALWAYS load when writing, editing, reviewing, or discussing any PHP in a Craft plugin or module — even small edits. Also when running ECS, PHPStan, or scaffolding with ddev craft make. Covers: PHPDoc blocks (@author, @since, @throws chains), section headers…

michtio/craftcms-claude-skills · 336 tokens

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 353 tokens

import

Import a self-contained NeatContext context bundle shared by another person, or reconcile a newer copy of a context already on this machine, leaving the source bundle unchanged. Use only when the user explicitly invokes this skill or asks to import a NeatContext bundle.

XTSoftwareLabs/neatcontext-plugins · 54 tokens

save

Save durable decisions, findings, plans, and implementation knowledge from the visible Codex conversation into a new or existing NeatContext context. Use only when the user explicitly invokes this skill or asks to preserve the current conversation as reusable context.

XTSoftwareLabs/neatcontext-plugins · 49 tokens

create

Create a fresh NeatContext context from a user-defined behavioral profile and an existing local knowledge folder. Use only when the user explicitly invokes this skill or asks to create a new context rather than save the current conversation.

XTSoftwareLabs/neatcontext-plugins · 45 tokens