/shipyard:lessons-learnedfrom shipyard
Extracts reusable lessons from completed work phases. Captures what went well, surprises, pitfalls, and process improvements into a structured LESSONS.md file. Use after phase completion before shipping.
Ships in shipyard. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
NO PHASE SHIPS WITHOUT LESSON CAPTURE
No exceptions:
/shipyard:ship (Step 3a)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.
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.
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.
When multiple lessons compete for a limited CLAUDE.md budget, prioritize in this order:
Present these four questions to the user during lesson capture:
Pre-populate suggested answers from build artifacts before asking (see Pre-Population below).
Before presenting prompts, extract candidate lessons from completed build summaries:
SUMMARY-*.md files in .shipyard/phases/{N}/results/.This reduces friction and ensures discoveries documented during building are not lost.
When lessons come from multiple builder agents working in parallel:
Do not skip de-duplication. Parallel agents frequently discover the same issues independently.
After the user approves lessons, optionally append to CLAUDE.md:
CLAUDE.md exists, skip entirely.## Lessons Learned section.Selection criteria for CLAUDE.md (be selective — CLAUDE.md has a token budget):
Lessons must be specific, actionable, and reusable. Apply these filters:
Anti-Patterns to reject:
### Pitfalls to Avoid
- bats-core `run` captures exit code but swallows stderr -- use `2>&1` to capture both
Why it works: Names the exact tool and behavior, explains the symptom, and gives the fix.
### Surprises / Discoveries
- jq `.field // "default"` prevents null propagation in optional config values --
without the fallback, downstream commands silently receive "null" as a string
### Process Improvements
- Run `shellcheck` on test helper files, not just source scripts —
helper functions have the same quoting bugs as production code
Why it works: Identifies a concrete workflow gap and specifies exactly what to add.
### What Went Well
- Tests are important
Why it fails: Generic truism. Zero discovered knowledge.
### Pitfalls to Avoid
- Fixed a bug on line 47 of parser.py
Why it fails: Line 47 will change. Future readers cannot act on this.
### Process Improvements
- Changed variable name from x to y
Why it fails: A code change, not a reusable insight.
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
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lgbarn/shipyard --plugin shipyard19 skills in this plugin
/code-simplificationFinds and removes duplication, dead code, over-engineering, and AI-generated bloat such as verbose error handling and redundant type checks. Use after implementing features, before claiming a phase is complete, when reviewing AI-generated code, or when code feels overly complex. Also use when a pattern repeats across files, a function exceeds 40 lines, nesting exceeds 3 levels, or an abstraction has only one implementation./documentationGenerates and updates code docs, README files, API docs, and architecture documentation. Use when a feature with public interfaces lacks docs, when documentation is incomplete or outdated, or before shipping any phase. Also use when adding breaking changes or complex algorithms, or when a public function lacks a docstring./git-workflowManages branches, worktrees, atomic commits, and branch completion by merge, PR, preserve, or discard. Use when starting feature work that needs a branch or an isolated workspace, making commits during development, or finishing a development branch. Also use when the user says "set up worktree", "create PR", "finish this branch", or "start feature"./import-specImports a spec-kit feature spec into Shipyard in place of brainstorming. Use when a spec-kit feature directory with spec.md exists./import-spec-fileImports a handwritten spec document into Shipyard in place of brainstorming. Use when a freeform spec, requirements, or design document already exists./infrastructure-validationValidates infrastructure-as-code with tool chains and checks for common mistakes. Use when working with Terraform (.tf, .tfvars), Ansible (playbooks, roles, inventory), Docker (Dockerfile, docker-compose.yml), Kubernetes (manifests, Helm charts), or CloudFormation. Also use when running terraform plan/apply, building Docker images, writing Helm templates, or when IaC changes touch security groups, IAM policies, or secrets.Other plugins' skills for the same job