Appends new entries to LESSONS-LEARNED.md via opencastle lesson CLI; searches past lessons for matching errors; proposes skill updates when retry patterns exceed thresholds. Use when consulting or updating LESSONS-LEARNED.md, after task failures, when capturing retrospective insights, or when a retry succeeds.
75
94%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Retry with different approach and it works → document lesson immediately. File: .opencastle/LESSONS-LEARNED.md
⛔ HARD GATE — Use the CLI. Do NOT edit LESSONS-LEARNED.md directly.
opencastle lesson --title "Short descriptive title" --category general --severity high \
--problem "What was observed" --wrong "Failing approach" --correct "Working solution" \
--why "Root cause"Required: --title, --category, --severity, --problem · Optional: --wrong, --correct, --why
After writing: if lesson reveals gap in skill/instruction file, update that file too (prevents pitfall at source).
opencastle lesson to record working approach.tail -1 .opencastle/LESSONS-LEARNED.md — confirm entry has title, category, severity. If malformed → re-run with corrected flags.Quick search example:
rg "missing CRON_SECRET" .opencastle/LESSONS-LEARNED.md || trueValid --category and --severity values, tagging format: LESSON-CATEGORIES.md.
--wrong and --correct — the contrast is what makes the lesson usableNever duplicate an existing lesson · Never defer logging to end of session
For expertise tracking, cross-session knowledge graphs, load agent-memory skill.
fa0c341
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.