lessons
/lessons
Search the lessons database before debugging or starting a task, and record a lesson when a problem is solved. Use at the start of any debugging, error, build or CI failure, "why is this failing" or "have we seen this before" task; before repeating an approach that failed once; and whenever a problem is resolved, a root cause is found, or an approach is ruled out. Also use when asked to "add a lesson", "record this", "search lessons", "check the db", or after any post-mortem. Wraps the `lessons` CLI (and the same tools if the lessons MCP server is registered).
- Author
- HidekiAI ↗
- Repository
- llm-lessons ↗
- Licence
- MIT
- Last repository change
- 13.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Search the lessons database before debugging or starting a task, and record a lesson when a problem is solved. Use at the start of any debugging, error, build or CI failure, "why is this failing" or "have we seen this before" task; before repeating an approach that failed once; and whenever a problem is resolved, a root cause is found, or an approach is ruled out. Also use when asked to "add a lesson", "record this", "search lessons", "check the db", or after any post-mortem. Wraps the `lessons` CLI (and the same tools if the lessons MCP server is registered).
Triggers from the description
Original author description
Search the lessons database before debugging or starting a task, and record a lesson when a problem is solved. Use at the start of any debugging, error, build or CI failure, "why is this failing" or "have we seen this before" task; before repeating an approach that failed once; and whenever a problem is resolved, a root cause is found, or an approach is ruled out. Also use when asked to "add a lesson", "record this", "search lessons", "check the db", or after any post-mortem. Wraps the `lessons` CLI (and the same tools if the lessons MCP server is registered).
How it works
- Before a task: search
- After a problem is solved: record
- Not for this skill
SKILL.md preview
---
name: lessons
description: 'Search the lessons database before debugging or starting a task, and record a lesson when a problem is solved. Use at the start of any debugging, error, build or CI failure, "why is this failing" or "have we seen this before" task; before repeating an approach that failed once; and whenever a problem is resolved, a root cause is found, or an approach is ruled out. Also use when asked to "add a lesson", "record this", "search lessons", "check the db", or after any post-mortem. Wraps the `lessons` CLI (and the same tools if the lessons MCP server is registered).'
---
# Lessons
`lessons` is the owner's post-mortem database: problems, root causes, fixes and the attempts that did NOT work,
kept in SQLite files per domain (`work`, `personal`, `shared`) under `$LESSONS_HOME` (default `~/.lessons/`).
Use the installed binary (or the `search_lessons` and `record_lesson` MCP tools). Never open the `.db` with `sqlite3`.
## Before a task: search
1. Search with the exact error text or two or three keywords: `lessons search "<text>"`.
2. Choose the domains by where you are: at work `--in work,shared`, at home `--in personal,shared`. Without `--in`
the configured default applies. A machine without a domain's file skips it.
3. Read the hits as leads, not as truth: check the date and context of the lesson against the present code.
4. If a lesson helped, `lessons hit <id>`. If it proved wrong, `lessons retire <id> --by <new-id>` after adding the
corrected one.
## After a problem is solved: record
Record in the same session, while the exact error text is still in front of you.
```sh
lessons add --to <shared|personal|work> --title "<one line>" --problem "<what went wrong, with the exact error>" \
--root-cause "<why>" --resolution "<what worked>" --failed "<what did NOT work>" --context "<repo or place>" \
--tags "<space separated>"
```
- Pick the file by scope: `shared` generic, `personal` home, `work` employer (it may hold proprietary data and must
never reach a public repo). `--to` is required: the domain is never guessed.
- Search first and update rather than duplicate: `lessons update <id> --resolution "..."` takes the same field flags (not `--to`).
- Keep the failed attempts: they are what saves the next reader time.
- Never put secrets, tokens or customer data in a lesson.
## Not for this skill
- Syncing between machines (`lessons sync`) and resolving sync conflicts are the owner's decisions, not a step to run
unasked.
- If `lessons` is not on the PATH, say so in one line and keep the lesson in docs or memory to import later.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · HidekiAI/llm-lessons | 100 | MIT |
| optimiziramsi/skills | 100 | MIT |
| mo-cmyk/mazarbul | 100 | Apache-2.0 |
| samplexbro/agentsmesh | 90 | MIT |
| samplexbro/agentsmesh | 90 | MIT |
| samplexbro/agentsmesh | 90 | MIT |
| samplexbro/agentsmesh | 90 | MIT |
Database snapshot: 13.11.2026 · package version c3b8e4a74a78 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100distilling-lessons
Use when a bug fix, architectural change, interface contract update, or recurring pitfall has been resolved and has clear reuse value — to record a durable lesson in project memory before the context is lost - 100search-before-building
Use when about to add a new helper, utility, or abstraction, a task sounds like a solved problem, a new external dependency is being considered, or custom code is proposed without checking what already exists. - 100ce-compound
Document a solved problem as a durable repo learning. Use when verified work produced non-obvious reasoning absent from its final code, tests, or existing docs; avoid routine fixes whose artifacts already explain the lesson. - 100retrospective-lesson
当用户想"复盘"——把刚解决的问题/对话变成可复用经验时触发。三个触发分支: ① 用户明说复盘/沉淀/总结/SOP/更新记忆;② 刚完成踩坑、架构决策等非平凡任务;③ 没明说但意图是把过程变成可复用的东西。 Triggers: retrospective, lessons learned, post-mortem, update memory, form an SOP. - 82problem
Saves a bug/problem and its solution to the second brain's central problem library (problems); it first searches whether the same problem exists. Use it when a bug is solved or when the user says "write this to problems". - 90rseng-lessons-learned
Covers capturing and reusing what a project learns: a lessons-learned record fed from debugging sessions, code review findings, failed and successful research approaches, incidents and near-misses; blameless postmortems for the big ones; retrospectives on a cadence; and routing…