lessons-loop
Skill0 starsChanged 3 months agoMITView on GitHub
Turn corrections and failures into durable procedures.
In this repository4 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Do not create lessons for routine completion, temporary task state, or facts easily rediscovered from authoritative sources.
- Distinctive: line 48
Prefer a project file or existing skill over global memory.
- Distinctive: line 71
After promotion, verify the target loads, parses, and triggers as intended.
≈ “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
Lessons Loop
Convert high-signal corrections, failed approaches, and reusable techniques into durable context without filling global memory with task logs. Capture first; promote only when recurrence proves broader value.
When to Use
- A user corrects scope, behavior, tone, or assumptions.
- An attempted approach fails and a reliable replacement is found.
- The same mistake recurs.
- A technique is likely to be reused.
- A substantial work block ends and lessons may otherwise disappear.
Do not create lessons for routine completion, temporary task state, or facts easily rediscovered from authoritative sources.
Storage Model
Route knowledge by scope and volatility:
- Episode: concise work-block history and lessons.
- Project state/rules: project-specific facts and invariants.
- Skill: reusable procedure triggered by a class of tasks.
- Global operating prompt: rare, stable behavior required every turn.
- Memory: compact cross-session facts that fit no project or skill.
Procedure
1. Capture the correction
Record what failed, the general rule, trigger conditions, and the next checkable behavior. Use two to five lines; omit blame and narrative detail.
Complete when: a future agent can recognize and apply the rule.
2. Choose the narrowest home
Prefer a project file or existing skill over global memory. Do not duplicate the full lesson across surfaces; use a pointer where another surface needs awareness.
Complete when: one canonical owner exists.
3. Apply immediately
Change the current workflow after a correction instead of merely documenting agreement. If the lesson changes files, configuration, skills, or global prompts, follow the active approval boundary.
Complete when: the next relevant action visibly follows the corrected rule.
4. Promote recurring lessons
Periodically review recent episodes and memory. Promote a lesson when it recurs or clearly governs a broad trigger class:
- repeated procedure → patch or create a skill;
- stable universal behavior → propose a global-prompt change;
- project fact → update project state/rules;
- obsolete one-off detail → leave in history or archive.
Complete when: the promoted rule is removed from duplicate temporary stores.
5. Validate the operating surface
After promotion, verify the target loads, parses, and triggers as intended. For skills, check frontmatter, catalogue visibility, linked files, and a realistic scenario. For configuration or prompts, verify the running consumer reloaded where necessary.
Complete when: the rule affects future execution through its intended surface.
Lesson Template
Trigger:
Observed failure or correction:
Reusable rule:
Next-time proof:
Canonical home:Pitfalls
- Capturing the incident without the general rule.
- Saving secrets, raw transcripts, or customer data.
- Treating every preference as a universal prompt rule.
- Creating a new skill when an existing owner should be extended.
- Writing the lesson but continuing the same failed workflow.
- Promoting a one-off before recurrence demonstrates value.
- Duplicating rules until authorities conflict.
Verification
Confirm the lesson has a recognizable trigger, checkable behavior, one canonical home, no sensitive data, and an immediate application where relevant. For promotions, verify the destination loads and remove redundant temporary copies.
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.

