Learn From Fix logo

Learn From Fix

Community
oliver-kriska
learn-from-fix

Capture Elixir/Ecto/LiveView lessons and Hex API rules. Use after corrections or when asked to document learning, record a lesson, prevent a fixed mistake, or remember package guidance with --library.

Overview

Publisheroliver-kriska
Repositoryclaude-elixir-phoenix
Skill namelearn-from-fix
Stars
555
Forks
40
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by oliver-kriska on GitHub. Read the source before you install it.

Installation

Install the Learn From Fix AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/oliver-kriska/claude-elixir-phoenix.git /tmp/claude-elixir-phoenix
mkdir -p .claude/skills
cp -r /tmp/claude-elixir-phoenix/plugins/elixir-phoenix/skills/learn-from-fix .claude/skills/learn-from-fix
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Learn From Fix in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Learn From Fix on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Learn From Fix is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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 ${CLAUDE_SKILL_DIR}/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

--scopeCanonical 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:

markdown
---
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:

ScopeWrite toExample
This projectProject CLAUDE.md"Never use raw SQL in this app"
This project across sessionsProject-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 /phx:compoundDebugging 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:

markdown
### 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:

text
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

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

References (READ-ONLY — do NOT edit)

  • ${CLAUDE_SKILL_DIR}/references/common-mistakes.md — Common Elixir mistakes reference. Consult when checking for duplicates. Ships with the plugin — NEVER modify.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Learn From Fix AI skill do?

Capture Elixir/Ecto/LiveView lessons and Hex API rules. Use after corrections or when asked to document learning, record a lesson, prevent a fixed mistake, or remember package guidance with --library.

Why use Learn From Fix on TypingMind?

Because you install it once and use it with any model. Learn From Fix is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Learn From Fix in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/plugins/elixir-phoenix/skills/learn-from-fix. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Learn From Fix?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Learn From Fix?

As many as you like. As long as a model supports skills, you can use Learn From Fix with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Learn From Fix AI skill free?

Yes. It is published on GitHub by oliver-kriska under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇