Use when concluding significant work to extract reusable patterns and anti-patterns
Distills session experiences into transferable, project-scoped knowledge.
Core principle: Extract patterns that will help future sessions on this project.
Announce at start: "Applying lessons-capture skill to extract reusable patterns."
[!IMPORTANT] Lessons persist in the PROJECT (
<workspace>/.ai-memory/lessons/), not the conversation.
Ask:
<workspace>/.ai-memory/lessons/supersedes fieldCreate <workspace>/.ai-memory/lessons/<slug>.md:
# Lesson: [Descriptive Title]
**Context**: [When this applies]
**Discovered**: YYYY-MM-DD
**Last Validated**: YYYY-MM-DD
## Pattern
[What to do - the reusable approach]
## Anti-Pattern
[What NOT to do - common mistakes]
## Evidence
- [Link to code or walkthrough showing this in action]
## Supersedes
- [Previous lesson file if updating, or omit]
Before committing lesson:
Context for when it appliesPattern (what to do)Anti-Pattern (what NOT to do)Last Validated date is current