skills/lesson-capture/SKILL.md
Capture project-specific operational lessons from mistakes, discoveries, and hard-won insights
npx skillsauth add liza-mas/liza lesson-captureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Extract a lesson from the current conversation context and persist it as a structured file. Lessons are project-specific operational knowledge — gotchas, patterns, and hard-won insights that prevent recurring mistakes.
Lessons complement the contract: the contract governs how to work (behavioral, project-agnostic); lessons capture what we learned here (operational, project-specific).
Lessons are split by audience:
| Audience | Directory | Read During Init | Content |
|----------|-----------|------------------|---------|
| Agents | lessons/agents/ | Yes | Project-specific gotchas agents hit repeatedly |
| Humans | lessons/humans/ | No | Workflow habits, domain pitfalls, invariants to preserve |
If audience is ambiguous, ask.
Each lesson is a small .md file with yaml frontmatter.
---
title: "Descriptive title"
trigger: "When [succinct situational condition]"
keywords: [keyword1, keyword2, keyword3]
date: YYYY-MM-DD
---
## Context
[Situation, intent, and conditions that led to this lesson]
## Failure Mode
[What went wrong and why]
## Solution
[What to do instead]
## References
- [Links to relevant files, docs, specs, or external resources]
Frontmatter fields:
Body sections:
| Audience | Location |
|----------|----------------------------|
| Agents | GUARDRAILS.md (Tier 2) |
| Humans | lessons/humans/README.md |
### G2.x: Lessons — [Agents|Humans]
Operational lessons from project experience. Read when a trigger matches.
| Trigger | File |
|---------|------|
| When ... | [filename.md](filename.md) |
The index is the discovery mechanism. Agents read it during session initialization and consult full lessons when a trigger matches their current task.
Identify the lesson from the current conversation. Look for:
Determine audience:
If unclear, ask: "Is this a lesson for agents, humans, or both?" If both, write two separate lessons tailored to each audience.
Propose the lesson content in the standard format. Present for approval before writing.
Naming convention: kebab-case, descriptive. Examples:
csv-field-escaping.mdfile-locking-shared-state.mddeployment-order-migrations.mdQuality bar:
After approval:
README.md index — append a row to the table"Lesson captured: [title] → lessons/[audience]/[filename]. Index updated."When invoked on an existing lesson (update or delete):
Position in workflow:
mistake/discovery → reflection → lesson-capture skill → lessons/ persisted
Invoked manually by the human. May later support automated triggers (post-bug-fix, post-review-finding, post-struggle).
Session initialization: Agents read lessons/agents/README.md during init. When a trigger matches current work, read the full lesson file before proceeding.
Discovery limitation: The trigger+keyword model relies on agents predicting which lessons are relevant. This handles known-unknowns (agent recognizes the trigger) but cannot surface unknown-unknowns (agent working on CSV export won't search for "file locking" until it's already hit the problem). Mitigation: write triggers and keywords broadly enough to match adjacent situations, not just the exact scenario where the lesson was learned.
Relation to other artifacts:
specs/ — Requirements and architecture (what to build)docs/ — Usage and setup (how to use)lessons/ — Operational knowledge (what we learned)development
Coordinate Pairing-mode doer/reviewer sessions through a Markdown blackboard. Use when the user invokes /adversarial-pairing with role and blackboard-path arguments or asks multiple pairing agents to coordinate plan review, implementation, staged code review, and follow-up review rounds without Liza multi-agent mode.
data-ai
Analyze Liza agents logs
development
Code Review Protocol
tools
Analyze Liza `.liza/agent-prompts/` and `.liza/agent-outputs/` from a context-engineering perspective: prompt payload shape, context budget use, cacheability, duplicated or missing context, instruction hierarchy, tool-output pressure, role-specific context fit, and prompt-output feedback loops. Use when diagnosing agent context bloat, prompt drift, poor agent handoffs, repeated misunderstandings, excessive tool output, or whether Liza agents received the right information at the right time.