learning-from-mistakes
Skill1 starsChanged 2 months agoMITView on GitHub
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 other projects use a version of this.
Adopted by
Most recently taken up by
- oxbshw/watch-skilltheir own version, first seen Jul 5, 2026
- syahiidkamil/Software-Engineer-AI-Agent-Atlastheir own version, first seen Jun 16, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- oxbshw/watch-skill★ 439same name
- syahiidkamil/Software-Engineer-AI-Agent-Atlas★ 397same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- version-bumpSkill
- addressing-pr-commentsSkill
- attaching-pr-screenshotsSkill
- auditing-agent-token-usageSkill
- auditing-complexitySkill
- auditing-rails-tech-debtSkill
- auditing-repo-securitySkill
- auditing-testsSkill
- capturing-screenshotsSkill
- configuring-zshSkill
- diagnosing-react-codeSkill
- drawing-mermaid-diagramsSkill
- explaining-architectureSkill
- explaining-codeSkill
- freeing-disk-spaceSkill
- grooming-backlogsSkill
- investigating-design-rationaleSkill
- landing-prsSkill
- merging-dependabot-prsSkill
- proving-claimsSkill
- rebasing-branchesSkill
- rebasing-dependabot-prsSkill
- rebasing-open-prsSkill
- redoing-implementationsSkill
- removing-commentsSkill
- reviewing-codeSkill
- reviewing-design-docsSkill
- reviewing-rails-codeSkill
- reviewing-ruby-codeSkill
- simplifying-ruby-codeSkill
- summarizing-friction-logsSkill
- using-gh-cliSkill
- using-jqSkill
- verifying-production-changesSkill
- watching-authored-prsSkill
- watching-reviewed-prsSkill
- writing-technical-design-docsSkill
- being-extremely-fucking-briefSkill
- composing-agent-promptsSkill
- conducting-deep-researchSkill
- cutting-skillsSkill
- improving-promptsSkill
- pricing-creativitySkill
- running-retrosSkill
- summarizing-shipped-workSkill
- writing-proseSkill
- writing-system-promptsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Use CLAUDE.md in Claude Code and AGENTS.md in Codex.
- Very specific: line 28
If the chosen file is a symlink, edit the file it resolves to.
- Distinctive: line 31
Check for overlap: Read the target file. If the rule already exists, stop and say where.
- Very specific: line 39
Write: Add the approved rule to that section, or to a new ## Learned Rules section when no section fits.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
Steps
- Identify the mistake: Find the most recent correction, mistake, or suboptimal behavior in the conversation and summarize what went wrong in one sentence. If none is clear, ask the user which correction to codify and wait.
- Draft a rule: One or two imperative sentences ("Do X", "Never Y"), specific enough to change behavior, not a platitude.
- Choose the target file:
- Project, for lessons about this project's codebase, conventions, or
tooling: the instructions file at the repository root from
git rev-parse --show-toplevel(outside a repository, ask where to write). UseCLAUDE.mdin Claude Code andAGENTS.mdin Codex. - Global, for lessons that apply across projects:
~/.claude/CLAUDE.mdin Claude Code,~/.codex/AGENTS.mdin Codex. In another host, ask which file it reads. - If the chosen 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.
- Project, for lessons about this project's codebase, conventions, or
tooling: the instructions file at the repository root from
- Check for overlap: Read the target file. If the rule already exists, stop and say where. If a related rule exists, refine it instead of adding a duplicate.
- Confirm: Show the drafted rule (or the old and new text of a refined rule), the target file path, and the section it goes in. Wait for approval, and apply any edits the user asks for.
- Write: Add the approved rule to that section, or to a new
## Learned Rulessection when no section fits. - Verify: Re-read the file and confirm the rule appears once, exactly as approved. Report the file path and the rule.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

