lessonlisted
Install: claude install-skill elitecoder/assistant
# /lesson — capture a rule into ~/.claude/CLAUDE.md
The mechanism by which Claude Code agents learn from corrections. Lessons live inside the `## Lessons` section of `~/.claude/CLAUDE.md`. CLAUDE.md is officially auto-loaded by Claude Code into every session, so a rule captured here is enforced everywhere from the next conversation forward.
## When this skill MUST fire (auto-trigger, not just on `/lesson`)
If the conversation contains any of these signals, capture a lesson **before continuing the prior task**:
- **Correction signals**: `no`, `don't`, `stop`, `wrong`, `that's not`, `I told you`, `we discussed`, `you keep doing`, `again`, `damn`, `actually`.
- **Name-the-rule signals**: `always X`, `never Y`, `from now on Z`, `remember this`, `this needs to be a lesson`, `make this an enforced lesson`, `record this rule`.
- **Self-discovered constraint**: you tried something, hit an error, learned the actual rule. If a future session would benefit from that knowledge, capture it.
Do NOT silently absorb the correction and move on. The user has named a rule; future sessions need to see it. Capture the rule first, then continue the original task.
## What a lesson looks like
A lesson is a markdown block under `## Lessons` in `~/.claude/CLAUDE.md`:
```markdown
<!-- lesson: <slug>, scope: <scope>, added: <YYYY-MM-DD> -->
**<one-line trigger sentence>** <rule body, one paragraph, specific and actionable>
```
There is **no "why" field**. A rule is a rule — the body should be s