lessons-learned
Skill66 starsChanged 5 months agoMITView on GitHub
Extracts reusable lessons from completed work. Use when a phase or milestone is complete, before shipping, or when reflecting on finished work. Also use when the user says "what did we learn", "capture lessons", "retrospective", "wrap up", "ship this phase", or "done with this phase". A phase must not ship without lesson capture.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- thistleknot/skillstheir own version, first seen Nov 8, 2026
- lklimek/claudiustheir own version, first seen Nov 5, 2026
- pfeff/claude-skillstheir own version, first seen Nov 1, 2026
- mikaeladityan/lessons-learnedtheir own version, first seen Oct 25, 2026
- joeblackwaslike/lessons-learnedtheir own version, first seen Oct 20, 2026
- mavrovde/thekotlin.comtheir own version, first seen Sep 5, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- aplaceforallmystuff/claude-lessons-learned★ 13same name
- pfeff/claude-skills★ 3same name
- shalomb/agent-skills★ 3same name
- lklimek/claudius★ 1same name
- mikaeladityan/lessons-learned★ 1same name
- Suckzoo/skills★ 1same name
- joeblackwaslike/lessons-learned★ 0same name
- kenmulford/PMSkills★ 0same name
- mavrovde/thekotlin.com★ 0same name
- TheophilusChinomona/idev★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- code-simplificationSkill
- documentationSkill
- git-workflowSkill
- import-spec-fileSkill
- import-specSkill
- infrastructure-validationSkill
- parallel-dispatchSkill
- security-auditSkill
- shipyard-brainstormingSkill
- shipyard-debuggingSkill
- shipyard-executing-plansSkill
- shipyard-handoffSkill
- shipyard-tddSkill
- shipyard-testingSkill
- shipyard-verificationSkill
- shipyard-writing-plansSkill
- shipyard-writing-skillsSkill
- using-shipyardSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 13 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Not for "small phases" or "just a bugfix"
- Distinctive: line 18
Not for "we're in a hurry"
- Distinctive: line 19
Not for "nothing notable happened"
- Very specific: line 26
After phase completion during /shipyard:ship (Step 3a)
- Distinctive: line 27
When reflecting on completed work to extract reusable knowledge
- Distinctive: line 28
When a build summary contains notable discoveries worth preserving
- Distinctive: line 79
When multiple lessons compete for a limited CLAUDE.md budget, prioritize in this order:
- Distinctive: line 99
Before presenting prompts, extract candidate lessons from completed build summaries:
- Very specific: line 101
Read all SUMMARY-*.md files in .shipyard/phases/{N}/results/.
- Distinctive: line 110
When lessons come from multiple builder agents working in parallel:
- Distinctive: line 118
Do not skip de-duplication.
- Distinctive: line 122
After the user approves lessons, optionally append to CLAUDE.md:
- Distinctive: line 124
If no CLAUDE.md exists, skip entirely.
- Distinctive: line 130
Not phase-specific (generic enough to apply to future work)
- Distinctive: line 132
Not already captured in existing CLAUDE.md entries
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- TOKEN BUDGET: 215 lines / ~645 tokens -->Lessons Learned
Iron Law
NO PHASE SHIPS WITHOUT LESSON CAPTURENo exceptions:
- Not for "small phases" or "just a bugfix"
- Not for "we're in a hurry"
- Not for "nothing notable happened"
- Even smooth phases confirm what's working — capture it
<activation>When to Use
- After phase completion during
/shipyard:ship(Step 3a) - When reflecting on completed work to extract reusable knowledge
- When a build summary contains notable discoveries worth preserving
Natural Language Triggers
- "what did we learn", "capture lessons", "retrospective", "lessons learned"
</activation>When NOT to Use
- Mid-implementation (wait until the phase ships — partial lessons lack full context)
- Documenting code design decisions (put those in inline comments or architecture docs)
- Tracking active bugs (use issue tracker; lessons capture completed learning, not open problems)
Timing Rule
Run immediately after ship, before the next phase starts. Lessons captured 24+ hours later lose the "why" behind decisions. If you're about to start the next phase, capture lessons first.
Overview
The lessons-learned system captures discoveries, patterns, and pitfalls found during implementation and feeds them back into the project. Lessons are stored in .shipyard/LESSONS.md and optionally surfaced in CLAUDE.md so future agents benefit from past experience.
<instructions>LESSONS.md Format
Store lessons in .shipyard/LESSONS.md using this exact structure:
# Shipyard Lessons Learned
## [YYYY-MM-DD] Phase N: {Phase Name}
### What Went Well
- {Bullet point}
### Surprises / Discoveries
- {Pattern discovered}
### Pitfalls to Avoid
- {Anti-pattern encountered}
### Process Improvements
- {Workflow enhancement}
---New entries are prepended after the # Shipyard Lessons Learned heading so the most recent phase appears first. Each phase gets its own dated section with all four subsections.
Prioritization Order
When multiple lessons compete for a limited CLAUDE.md budget, prioritize in this order:
- Pitfalls to Avoid — prevents repeated mistakes (highest value)
- Process Improvements — improves next phase execution
- Surprises / Discoveries — corrects wrong mental models
- What Went Well — confirms what to repeat (lowest urgency — already working)
Structured Prompts
Present these four questions to the user during lesson capture:
- What went well in this phase? -- Patterns, tools, or approaches that worked effectively.
- What surprised you or what did you learn? -- Unexpected behaviors, new techniques, or revised assumptions.
- What should future work avoid? -- Anti-patterns, dead ends, or approaches that caused problems.
- Any process improvements discovered? -- Workflow changes, tooling suggestions, or efficiency gains.
Pre-populate suggested answers from build artifacts before asking (see Pre-Population below).
Pre-Population
Before presenting prompts, extract candidate lessons from completed build summaries:
- Read all
SUMMARY-*.mdfiles in.shipyard/phases/{N}/results/. - Extract entries from "Issues Encountered" sections -- these often contain workarounds and edge cases.
- Extract entries from "Decisions Made" sections -- these capture rationale worth preserving.
- Present extracted items as pre-populated suggestions the user can accept, edit, or discard.
This reduces friction and ensures discoveries documented during building are not lost.
Multi-Agent Synthesis
When lessons come from multiple builder agents working in parallel:
- Collect — gather SUMMARY-*.md from all agents in the phase
- Group — sort entries by the four lesson categories
- De-duplicate — merge entries that describe the same issue with different wording
- Prioritize by frequency — if 3 agents hit the same pitfall, it ranks higher than a one-off
- Cross-reference — check against existing LESSONS.md entries to avoid duplicates
Do not skip de-duplication. Parallel agents frequently discover the same issues independently.
CLAUDE.md Integration
After the user approves lessons, optionally append to CLAUDE.md:
- If no
CLAUDE.mdexists, skip entirely. - Find or create a
## Lessons Learnedsection. - Append concise single-line bullets (omit phase dates, focus on actionable guidance).
Selection criteria for CLAUDE.md (be selective — CLAUDE.md has a token budget):
- Actionable every session, not just in this phase context
- Not phase-specific (generic enough to apply to future work)
- Fits as a one-liner (two sentences → split or summarize)
- Not already captured in existing CLAUDE.md entries
</instructions><rules>Quality Standards
Lessons must be specific, actionable, and reusable. Apply these filters:
Anti-Patterns to reject:
- Lessons that duplicate existing entries in LESSONS.md
- Lessons that reference specific line numbers or ephemeral file locations
- Lessons that are generic truisms rather than discovered knowledge
- Lessons longer than two sentences -- split or summarize
</rules><examples>Lesson Quality Examples
Good Lesson -- specific, transferable, actionable
### Pitfalls to Avoid
- bats-core `run` captures exit code but swallows stderr -- use `2>&1` to capture bothWhy it works: Names the exact tool and behavior, explains the symptom, and gives the fix.
Good Lesson -- documents a non-obvious decision
### Surprises / Discoveries
- jq `.field // "default"` prevents null propagation in optional config values --
without the fallback, downstream commands silently receive "null" as a stringGood Lesson -- process improvement example
### Process Improvements
- Run `shellcheck` on test helper files, not just source scripts —
helper functions have the same quoting bugs as production codeWhy it works: Identifies a concrete workflow gap and specifies exactly what to add.
Bad Lesson -- vague platitude
### What Went Well
- Tests are importantWhy it fails: Generic truism. Zero discovered knowledge.
Bad Lesson -- too specific, not transferable
### Pitfalls to Avoid
- Fixed a bug on line 47 of parser.pyWhy it fails: Line 47 will change. Future readers cannot act on this.
Bad Lesson -- implementation detail, not a lesson
### Process Improvements
- Changed variable name from x to yWhy it fails: A code change, not a reusable insight.
</examples>Integration
Called by: commands/ship.md — Step 7 for post-phase lesson capture Pairs with: shipyard:shipyard-verification — validate lesson quality before persisting Leads to: shipyard:documentation — update project docs with any discovered conventions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

