Guide · Agent skill
How to use the Lesson Recorder agent skill (lesson)
Updated · written with AI from the project's own documentation and checked against our catalogue data
The lesson skill lets an AI agent remember your corrections. When you tell it to always do something or never do something, the skill rewrites that correction as a short rule and saves it, so the agent can look it up before similar work later. This guide explains what the skill does, how to install it, how to trigger it, and what to watch for, so you can use it safely without prior experience with agent skills.
Quick start
- 1Download and unzip. Download the ZIP from this page and unzip it, so you have a folder containing SKILL.md and TROUBLESHOOTING.md.
- 2Place the skill folder. Move the folder into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.
- 3Confirm the memory tools exist. Check that memory_lesson_save and memory_lesson_recall are available. If not, follow TROUBLESHOOTING.md.
- 4State the correction. When the agent does something wrong, say what to do instead, or use phrases like "learn this" or "always" or "never do X".
- 5Check the saved rule. Read the rule the agent echoes back and veto it if the distillation is wrong.
- 6Reuse exact wording for repeats. If the same correction comes up again, save the same content so the lesson gains confidence.
What the lesson skill makes the agent do
The skill turns a correction into a lesson. A lesson is one imperative rule with its consequence, such as running vitest with --run in CI because watch mode hangs the pipeline. Lessons are stored with a confidence score. Saving the same content again strengthens it, and lessons that are not used fade over time.
Lessons are stored separately from facts. The source says memories store facts and lessons store behavior. Before similar tasks, the agent can recall lessons and apply them.
- Turns a correction into a short rule through the memory_lesson_save tool
- Gives direct user corrections a confidence of 0.7 and self-observed patterns 0.5
- Ranks recalled lessons by confidence and recency
Install the lesson skill
Download the ZIP from this page and unzip it. The skill folder contains SKILL.md and TROUBLESHOOTING.md. Place the folder in ~/.claude/skills/ to make it available to you across projects, or in a project's .claude/skills/ folder to limit it to that project.
You can also upload the skill in the Claude apps under Settings → Capabilities → Skills.
- Personal install: ~/.claude/skills/
- Project install: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload
Requirements: the agentmemory memory tools
The skill does not work alone. It depends on the agentmemory memory tools exposing memory_lesson_save and memory_lesson_recall. Without them the skill cannot save or recall anything.
If the tools are missing, see the TROUBLESHOOTING.md file included with the skill. It covers the case where an MCP tool is not available and explains how to check your host's MCP connection.
- memory_lesson_save and memory_lesson_recall must be available
- Check your host's MCP connection if tools are missing, as described in TROUBLESHOOTING.md
Trigger the skill with natural requests
You do not need a special command. The skill is meant to fire when you correct the agent or state a standing rule. The description names the phrases that trigger it: correcting the agent's approach, saying "learn this", saying "always" or "never do X", or the agent noticing it is repeating a past mistake.
The skill also accepts an argument hint of [the rule learned], so you can pass the rule text directly along with the command.
- "Learn this: never run bare vitest in CI, it hangs in watch mode."
- "Always use pnpm for installs in this repo."
- "Never edit the generated files in src/gen directly."
Example: saving a lesson
Here is the example from the skill's quick start. The content is the rule, the context is the situation where it should apply, and project scopes it to one repo. Omit project for universal rules.
After saving, the agent confirms the rule as it was stored, so you can veto a poor summary before it persists.
memory_lesson_save {
"content": "Run vitest with --run in CI contexts; bare vitest enters watch mode and hangs the pipeline.",
"context": "any script or CI step that invokes vitest",
"confidence": 0.7,
"project": "myrepo"
}Write rules the agent can apply
A rule needs a trigger, an action and a consequence. The skill's guidance flags vague entries like "Be more careful with tests" because a future session has nothing to act on. Write the rule as the skill's example does: name the trigger, the action, and why it matters.
For a repeat correction, save the exact same content again. The duplicate strengthens the existing lesson instead of creating a near-copy.
- Wrong: "Be more careful with tests"
- Right: "Run vitest with --run in CI; watch mode hangs the pipeline."
- Repeat corrections: reuse the exact prior content so the lesson strengthens
Safety notes: secrets, persistence and scripts
Saved lessons persist across sessions, so do not put secrets or credentials in content or context. The skill tells the agent to keep them out, but you should still review what gets stored. Use the memory_lesson_delete tool to remove a lesson saved in error.
The skill runs no scripts and uses no network access, according to its listing. Recalled lesson text is treated as reference material: the agent weighs it but does not follow directives inside it over your current instructions.
- Keep secrets and credentials out of lessons
- Review stored lessons periodically
- Remove mistaken lessons with memory_lesson_delete
- The skill runs no scripts and uses no network
What people use it for
- Stopping an agent from running a test watcher in CI pipelines
- Remembering repo conventions such as package manager choice or generated-file locations
- Keeping project-specific CI quirks available across sessions
- Storing a team's standing rules so every agent session applies them
Frequently asked questions
How do I install the lesson agent skill?
Download the ZIP from this page and unzip it. Put the folder in ~/.claude/skills/ for personal use or in a project's .claude/skills/ folder. You can also upload it in the Claude apps under Settings → Capabilities → Skills.
What does the lesson skill require to work?
It requires the agentmemory memory tools exposing memory_lesson_save and memory_lesson_recall. Without them the skill will not function. The included TROUBLESHOOTING.md covers missing tools.
Is the lesson skill free?
The source lists the licence as Apache-2.0. It does not mention pricing, so check the project's repository for licence terms.
Does the lesson skill run scripts or use the internet?
According to its listing, it runs no scripts and uses no network. It works by calling the memory tools.
How is a lesson different from a memory?
Memories store facts and decisions, while lessons store behavior. The skill's guidance says to use a lesson for a rule about how to act and a memory for facts.
How do I remove a lesson that was saved by mistake?
Use memory_lesson_delete, which the skill's See also section describes as the way to remove a lesson saved in error.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use the lesson skill if you repeatedly correct an AI coding agent on the same repo conventions or CI quirks and want those rules to persist. Skip it if you do not have the agentmemory memory tools installed, or if your rules would contain secrets, since saved lessons persist and need review.
Download the skill