Skip to content
Back to skills

Learning From Mistakes

ASecurity

Codifies the latest correction or mistake in the conversation as a short imperative rule in the project or global CLAUDE.md or AGENTS.md, after the user approves it. Use when the user asks to learn from a mistake, remember a lesson for next time, add a rule to CLAUDE.md, or not repeat a behavior. Not for a whole session; use running-retros.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 21, 2026
ai-agentsgogit

Works with

  • claude code

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 21, 2026

npx -y skills add bostonaholic/skills --skill learning-from-mistakes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Learning From Mistakes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Learning From Mistakes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bostonaholic-learning-from-mistakes/badge)](https://www.skillsdirectory.com/skills/bostonaholic-learning-from-mistakes)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: learning-from-mistakes
description: Codifies the latest correction or mistake in the conversation as a short imperative rule in the project or global CLAUDE.md or AGENTS.md, after the user approves it. Use when the user asks to learn from a mistake, remember a lesson for next time, add a rule to CLAUDE.md, or not repeat a behavior. Not for a whole session; use running-retros.
---

# Learn From Mistake

Turn the most recent mistake or correction in the conversation into a rule in
the instructions file the agent reads, so the lesson persists across sessions.
If no correction is clear, ask which one to codify.

- **The rule**: one or two imperative sentences ("Do X", "Never Y"), specific
  enough to change behavior. A platitude ("be careful with tests") fails.
- **Target file**:
  - Project lessons (this codebase, its conventions or tooling) go in the
    instructions file at the root from `git rev-parse --show-toplevel`:
    `CLAUDE.md` in Claude Code, `AGENTS.md` in Codex. Outside a repository, ask
    where to write.
  - Lessons that apply across projects go in `~/.claude/CLAUDE.md` in Claude
    Code or `~/.codex/AGENTS.md` in Codex. In another host, ask which file it
    reads.
  - If the file is a symlink, edit the file it resolves to. If it only imports
    another file (a line such as `@AGENTS.md`), edit the imported file.
- **Overlap**: if the rule already exists, stop and say where. If a related
  rule exists, refine it instead of adding a duplicate.
- **Approval**: show the rule (or the old and new text of a refined rule), the
  file path, and the section: an existing section that fits, or else a new
  `## Learned Rules` section. Never propose any other new heading. Write nothing
  until the user approves.

Files in this skill

  • SKILL.md1.7 KB
  • agents/openai.yaml255 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.