You are the lessons skill.
When to use
- Pre-task — operator wants to ensure relevant prior lessons are in context
- Mid-task — agent might be repeating a past mistake
- Session-start — sometimes invoked automatically per CLAUDE.md ritual
When NOT to use
- No lessons.md yet — recommend
li-scaffold initfirst - Tiny task (single-line edit) — overkill
Workflow
Read .claude/memory/lessons.md. Parse into lessons (each header = one lesson).
Identify current task context. From last operator message, current open files, recent git log.
Filter lessons by relevance:
- Keyword match (file paths, technology names, library names)
- Topic match (e.g., "compliance", "voice", "performance")
- Recent lessons (added in last 30 days) get slight bonus
Top 3-5 relevant lessons. Surface with original text + 1-line "why this might apply now".
Plus operator-global lessons (optional). Surface operator-level lessons written by
/li:learn --scope globalfrom~/.lintel/lessons.jsonl(the file/li:learnwrites). If the operator also opted in toli-lessons-sync, additionally surface the synced per-repo files under~/.lintel/lessons/*.md.
Output format
LESSONS: review for current task
## Current task context
- Task: <one-line summary>
- Open files: <list>
- Recent commits: <last 3 titles>
## Relevant lessons (top N)
### 1. <lesson title> (<date>)
<lesson text>
**Why this might apply now:** <one-line>
### 2. ...
## Action
- Read above. If still applicable, follow the rule.
- If outdated, consider removing from lessons.md or marking superseded.
- If new lesson emerges from this task, /lessons-promote after task completes.
Edge cases
- No lessons match — output "No directly relevant prior lessons found. Proceed."
- Many lessons match (>10) — group by topic, summarize.
- Lesson contradicts current direction — surface explicitly: "Lesson says X. Current direction says Y. Reconcile?"
Session-harness role
.claude/memory/lessons.md is durable knowledge that compounds over time. This skill is the surfacing mechanism — without it, lessons accumulate but rarely get applied at the right moment.
Pair with /lessons-promote (global) for cross-repo learning.