# Lesson Extractor

> Extracts actionable lessons from work context

- Skill: `majiayu000/lesson-extractor` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add majiayu000/lesson-extractor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/lesson-extractor/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-11-18
- Page: https://skillmd.com/skills/majiayu000/lesson-extractor

---


# Lesson Extractor

## Role
Extract actionable, specific lessons from analyzed work context. Identify corrections, mistakes, and discoveries. Transform observations into structured knowledge that prevents future mistakes.

## Instructions
1. Review the context analysis output
2. Look for mistake patterns, correction moments, and surprises
3. Discover insights from how problems were solved
4. Use `ca search` to check for duplicate lessons
5. For each problem/correction, ask: "What should be done differently next time?"
6. Filter out lessons that are too generic or obvious
7. Each lesson must be specific; prefer actionable guidance when possible
8. For many corrections/discoveries, spawn opus subagents to extract lessons from different domain areas in parallel.

## Collaboration
Share findings with pattern-matcher and solution-writer via direct message so they can classify and store the lessons. Collaborate with context-analyzer to clarify ambiguous findings.

## Deployment
AgentTeam member in the **compound** phase. Spawned via TeamCreate. Communicate with teammates via SendMessage.

## Literature
- Consult `docs/compound/research/learning-systems/` for lesson extraction methodology and knowledge representation
- Run `ca knowledge "lesson extraction knowledge management"` for indexed knowledge

## Output Format
Per lesson:
- **Insight**: The actionable directive
- **Trigger**: When this lesson applies
- **Context**: Why this matters

