---
id: sm-lesson
name: "lesson"
url: https://skills.yangsir.net/skill/sm-lesson
author: win4r
domain: education
tags: ["educational-content", "lesson-planning", "knowledge-retention", "lancedb", "learning-design"]
install_count: 329
rating: 4.10 (20 reviews)
github: https://github.com/win4r/memory-lancedb-pro
---

# lesson

> 记录从对话中学习到的经验教训，通过`/lesson`命令触发。

**Stats**: 329 installs · 4.1/5 (20 reviews)

## Before / After 对比

### 对话经验教训存储效率对比

| Metric | Before | After | Change |
|---|---|---|---|
| - | - | - | - |
| - | - | - | - |

## Readme

# Lesson Extraction & Storage

When triggered, extract and store lessons from the **recent conversation context**.

## Steps

1. **Scan recent context** — identify the pitfall, bug fix, or key insight just discussed
2. **Store technical layer** (category: fact, importance ≥ 0.8):
   ```
   Pitfall: [symptom]. Cause: [root cause]. Fix: [solution]. Prevention: [how to avoid].
   ```
3. **Store principle layer** (category: decision, importance ≥ 0.85):
   ```
   Decision principle ([tag]): [behavioral rule]. Trigger: [when]. Action: [what to do].
   ```
4. **Verify** — `memory_recall` with anchor keywords to confirm both entries retrievable
5. **Report** — tell Master what was stored (brief summary)

## Rules

- Keep entries short and atomic (< 500 chars each)
- If the lesson also affects a checklist or SKILL.md, update those files too
- If no clear lesson is found in recent context, ask Master what to store


---
*Source: https://skills.yangsir.net/skill/sm-lesson*
*Markdown mirror: https://skills.yangsir.net/api/skill/sm-lesson/markdown*