# Lessons

> Mid-session review of accumulated lessons from .claude/memory/lessons.md — surfaces relevant ones for current task.

- Skill: `jokerman89/lessons` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jokerman89/lessons`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jokerman89/lessons/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: jokerman89 (https://skillmd.com/u/jokerman89)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/jokerman89/lessons

---


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 init` first
- Tiny task (single-line edit) — overkill

## Workflow

1. **Read .claude/memory/lessons.md.** Parse into lessons (each header = one lesson).

2. **Identify current task context.** From last operator message, current open files, recent git log.

3. **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

4. **Top 3-5 relevant lessons.** Surface with original text + 1-line "why this might apply now".

5. **Plus operator-global lessons (optional).** Surface operator-level lessons written by `/li:learn --scope global` from `~/.lintel/lessons.jsonl` (the file `/li:learn` writes). If the operator also opted in to `li-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.

