error-learning

error-learning is a command for Claude Code from jonathondouglasyager-debug/claude-error-learning. It costs 17 tokens per session (881 once invoked), scanned A, original, MIT.

A command interface for managing the error-learning system's recorded mistakes, fixes, learned patterns, and pattern packs.

In plain words
What is it for?
Use it to view statistics, review pending patterns, list or enable pattern packs, and manage learned error data.
Why use it?
It gives you one place to check what the system has learned and decide which recurring error patterns should be enabled.

Command for Claude Code

Written for Claude Code: arguments in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the error-learning plugin — 1 command shipped together

Good fit Use it to view statistics, review pending patterns, list or enable pattern packs, and manage learned error data.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add jonathondouglasyager-debug/claude-error-learning
Claude Code
/plugin install error-learning

Made for: Claude Code.

Or install error-learning, the plugin that ships this one along with the rest of its 1 command.

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 error-learning

README.md
[![agentmods](https://agentmods.dev/badge/commands/jonathondouglasyager-debug/claude-error-learning/error-learning/github.svg)](https://agentmods.dev/commands/jonathondouglasyager-debug/claude-error-learning/error-learning)
Your own site
<a href="https://agentmods.dev/commands/jonathondouglasyager-debug/claude-error-learning/error-learning"><img src="https://agentmods.dev/badge/commands/jonathondouglasyager-debug/claude-error-learning/error-learning/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 error-learning

Your own site · 80×15
<a href="https://agentmods.dev/commands/jonathondouglasyager-debug/claude-error-learning/error-learning"><img src="https://agentmods.dev/badge/commands/jonathondouglasyager-debug/claude-error-learning/error-learning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 881 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 original No closer match found 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.00017 $0.00881
Opus 5.5 $0.00007 $0.00352
Sonnet 5.5 $0.00003 $0.00176
Haiku 4.5 $0.00002 $0.00088

Measured 1mo ago against content hash 124059b2febd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

error-learning 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 1mo 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.

commands/error-learning.md · 127 lines

How it starts

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

Error Learning Management

You are helping manage the error learning system. Based on the action requested, perform the appropriate task.

Available Actions

/error-learning (or /error-learning status)

Show current status and statistics:

  1. Read config.json to show enabled packs
  2. Read patterns/active.json to count active patterns
  3. Read data/errors.jsonl to count errors and fixes
  4. Display summary with:
    • Number of active patterns
    • Number of errors logged
    • Number of fixes captured
    • Enabled pattern packs

/error-learning review

Review pending patterns for approval:

  1. Run: python hooks/error-curator.py --review
  2. Show the output which lists:
    • All error signatures found
    • Which are NEW vs EXISTS
    • Sample error and fix commands
    • Instructions for adding patterns

/error-learning packs

List available pattern packs and their status:

  1. Read config.json to get enabled_packs
  2. List all .json files in patterns/packs/
  3. For each pack, show:
    • Pack name
    • Enabled/disabled status
    • Number of patterns
    • Description

/error-learning packs enable

Enable a pattern pack:

  1. Read config.json
  2. Add pack name to enabled_packs if not present
  3. Write updated config.json
  4. Run: python hooks/error-curator.py --merge
  5. Confirm the change

/error-learning packs disable

Disable a pattern pack:

  1. Read config.json
  2. Remove pack name from enabled_packs
  3. Write updated config.json
  4. Run: python hooks/error-curator.py --merge
  5. Confirm the change

/error-learning add ""

Manually add a pattern:

  1. Parse the pattern description
  2. Read patterns/packs/custom.json
  3. Create a new pattern entry with:
    • Unique ID based on description
    • Match type (contains, regex, or exact)
    • Block message
    • Learned fix (if provided)
  4. Append to custom.json patterns array
  5. Run: python hooks/error-curator.py --merge
  6. Confirm the addition

Example Outputs

Status Output

Error Learning Status
=====================
Active Patterns: 12
  - common: 5 patterns
  - windows: 4 patterns
  - learned: 3 patterns

Error Log: 47 errors, 23 fixes (49% fix rate)

Enabled Packs: common, learned, custom

Read the full file on GitHub · 127 lines

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. 1mo ago First seen · 127 lines · 17 tokens per session scan A 124059b2febd

Subscribe to this mod's changes

error-learning is a command published in the GitHub repository jonathondouglasyager-debug/claude-error-learning (3 stars, last pushed 6mo ago), licensed MIT. It adds 17 tokens to every session and 881 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.