lgbarn/shipyard/shipyard-writing-skills
Claude Code and agent skill by lgbarn/shipyard
- community
Checking that the SKILL.md file is still in the repository.
Applies test-driven development to creating and editing skills. Use when creating, editing, or improving a skill, editing any SKILL.md file, writing skill descriptions, or debugging why a skill does not activate. Also use when the user says "create a skill", "write a skill", "new skill", "improve this skill", or "skill isn't triggering", or when reviewing skill quality.
Install
npx vskill@latest install lgbarn/shipyard/shipyard-writing-skillsSKILL.md
Writing Skills
<activation>
When This Skill Activates
- Creating a new skill (SKILL.md file)
- Editing or improving an existing skill
- Verifying a skill works before deployment
- Reviewing skill quality or effectiveness
Natural Language Triggers
- "create a skill", "write a skill", "new skill", "improve this skill"
</activation>
Overview
Writing skills IS Test-Driven Development applied to process documentation.
Personal skills live in agent-specific directories (`~/.claude/skills` for Claude Code, `~/.codex/skills` for Codex)
You write test cases (pressure scenarios with subagents), watch them fail (baseline behavior), write the skill (documentation), watch tests pass (agents comply), and refactor (close loopholes).
Core principle: If you didn't watch an agent fail without the skill, you don't know if the skill teaches the right thing.
REQUIRED BACKGROUND: You MUST understand shipyard:shipyard-tdd before using this skill. That skill defines the fundamental RED-GREEN-REFACTOR cycle. This skill adapts TDD to documentation.
What is a Skill?
A skill is a reference guide for proven techniques, patterns, or tools. Skills help future Claude instances find and apply effective approaches.
Skills are: Reusable techniques, patterns, tools, reference guides
Skills are NOT: Narratives about how you solved a problem once
<instructions>
TDD Mapping for Skills
| TDD Concept | Skill Creation | |
|---|---|---|
| Test case | Pressure scenario with subagent | |
| Production code | Skill document (SKILL.md) | |
| Test fails (RED) | Agent violates rule without skill (baseline) | |
| Test passes (GREEN) | Agent complies with skill present | |
| Refactor | Close loopholes while maintaining compliance | |
| Write test first | Run baseline scenario BEFORE writing skill | |
| Watch it fail | Document exact rationalizations agent uses | |
| Minimal code | Write skill addressing those specific violations | |
| Watch it pass | Verify agent now complies | |
| Refactor cycle | Find new rationalizations -> plug -> re-verify |
The entire skill creation process follows RED-GREEN-REFACTOR.
When to Create a Skill
Create when:
- Technique wasn't intuitively obvious to you
- You'd reference this again across projects
- Pattern applies broadly (not project-specific)
- Others would benefit
Don't create for:
- One-off solutions
- Standard practices well-documented elsewhere
- Project-specific conventions (put in CLAUDE.md)
- Mechanical constraints (if it's enforceable with regex/validation, automate it -- save documentation for judgment calls)
Skill Types
Technique
Concrete method with steps to follow (condition-based-waiting, root-cause-tracing)
Pattern
Way of thinking about problems (flatten-with-flags, test-invariants)
Reference
API docs, syntax guides, tool documentation (office docs)
Directory Structure
Flat namespace - all skills in one searchable namespace
Separate files for:
- Heavy reference (100+ lines) - API docs, comprehensive syntax
- Reusable tools - Scripts, utilities, templates
Keep inline:
- Principles and concepts
- Code patterns (< 50 lines)
- Everything else
SKILL.md Structure
Frontmatter (YAML):
name: max 64 chars, lowercase letters, numbers, and hyphens only; no "anthropic" or "claude"description: max 1024 chars, no XML tags, third person- One short clause on what the skill does, then "Use when..." with the triggering conditions
- Put the key use case first; Claude Code shortens descriptions in the skill listing when the budget runs out
- Include specific symptoms, situations, and contexts
- NEVER summarize the skill's process or workflow steps (see CSO section for why)
- Keep under 500 characters if possible
- Claude Code supports more optional fields (
argument-hint,allowed-tools,disable-model-invocation, and others). Seeanthropic-best-practices.md. Shipyard skills use onlyname,description, andargument-hint.
Claude Search Optimization (CSO) — Quick Reference
| Element | Rule | Example | |
|---|---|---|---|
| Description | One-clause outcome + triggering conditions, no workflow steps | "Fixes flaky async tests. Use when tests hang waiting for async ops" | |
| Keywords | Error messages, symptoms, tool names | "ENOTEMPTY", "flaky", "bats-core" | |
| Name | Verb-first, hyphenated | condition-based-waiting not async-helpers | |
| Token budget | <150 words getting-started, <500 words others | Compress, cross-reference | |
| Cross-refs | Skill name + requirement marker, no @ links | **REQUIRED SUB-SKILL:** Use shipyard:foo |
Why no `@` links: @ syntax force-loads files immediately, consuming context tokens you may not need yet.
Critical CSO rule — Description = Outcome + When to Use, NOT the Workflow: When a description summarizes the skill's workflow, Claude follows the description instead of reading the full skill. A description saying "code review between tasks" caused Claude to do ONE review even though the skill showed TWO stages. State the outcome in one short clause, then the triggering conditions. Never list the workflow steps.
Flowchart Usage
Use flowcharts ONLY for:
- Non-obvious decision points
- Process loops where you might stop too early
- "When to use A vs B" decisions
Never use flowcharts for reference material, code examples, linear instructions, or labels without semantic meaning.
Code Examples
One excellent example beats many mediocre ones
Choose most relevant language (testing → TypeScript/JS, system debug → Shell/Python, data → Python).
Good example: complete, runnable, well-commented WHY, from real scenario, ready to adapt.
Don't: implement in 5+ languages, create fill-in-the-blank templates, write contrived examples.
File Organization
| Pattern | Structure | When | |
|---|---|---|---|
| Self-contained | SKILL.md only | All content fits | |
| With reusable tool | SKILL.md + example.ts | Tool is reusable code | |
| With heavy reference | SKILL.md + ref.md + scripts/ | Reference too large for inline |
</instructions>
<examples>
CSO Description Examples
<example type="good" title="Outcome and triggering conditions, no workflow summary">
Outcome plus triggering conditions -- Claude reads the full skill to learn the workflow. </example>
<example type="bad" title="Workflow summary in description">
Summarizes workflow -- Claude follows description instead of reading skill body, misses two-stage review. </example>
Skill Content Examples
<example type="good" title="Well-structured skill with XML tags and clear activation">
Clear activation, XML structure, rules separated. </example>
<example type="bad" title="Missing structure, narrative style">
Narrative style, no activation triggers, no XML structure, not reusable. </example>
</examples>
<rules>
The Iron Law (Same as TDD)
This applies to NEW skills AND EDITS to existing skills.
Write skill before testing? Delete it. Start over. Edit skill without testing? Same violation.
No exceptions:
- Not for "simple additions"
- Not for "just adding a section"
- Not for "documentation updates"
- Don't keep untested changes as "reference"
- Don't "adapt" while running tests
- Delete means delete
Spirit vs. Letter: Technically having a test scenario counts as "testing" only if you watched it fail first. Running a test after writing the skill is not RED-GREEN — it's just GREEN. Always establish a failing baseline first.
REQUIRED BACKGROUND: The shipyard:shipyard-tdd skill explains why this matters.
Testing All Skill Types
| Skill Type | Test Approach | Pass Condition | |
|---|---|---|---|
| Discipline-Enforcing | Pressure scenarios (time + sunk cost + exhaustion combined) | Agent follows rule under maximum pressure | |
| Technique | Application scenarios + edge-case variations | Agent applies technique correctly to new scenarios | |
| Pattern | Recognition + application + counter-examples | Agent identifies when/how AND when NOT to apply | |
| Reference | Retrieval tasks + coverage gaps | Agent finds and correctly applies reference info |
Common Rationalizations for Skipping Testing
| Excuse | Reality | |
|---|---|---|
| "Skill is obviously clear" | Clear to you ≠ clear to other agents. Test it. | |
| "Testing is overkill" | Untested skills have issues. Always. 15 min saves hours. | |
| "Academic review is enough" | Reading ≠ using. Test application scenarios. | |
| "No time to test" | Deploying untested wastes more time fixing later. |
Bulletproofing Skills Against Rationalization
Discipline skills must resist rationalization:
- Close every loophole explicitly -- forbid specific workarounds with "No exceptions" lists
- Address "Spirit vs Letter" -- add early: violating the letter violates the spirit
- Build rationalization tables from baseline testing -- every excuse gets a counter
- Create red flags lists for agent self-check (e.g., "Code before test", "This is different because...")
- Update CSO descriptions with violation symptoms as triggers
Anti-Patterns
| Anti-Pattern | Symptom | Fix | |
|---|---|---|---|
| Narrative example | "Last week I found that..." | Rewrite as reusable pattern | |
| Multi-language dilution | Same example in 5 languages | Keep only most relevant language | |
| Code in flowcharts | Can't copy-paste, hard to read | Use markdown code blocks | |
| Generic labels | helper1, step3 have no meaning | Use descriptive names |
</rules>
RED-GREEN-REFACTOR for Skills
RED: Write Failing Test (Baseline)
Run pressure scenario with subagent WITHOUT the skill. Document exact behavior:
- What choices did they make?
- What rationalizations did they use (verbatim)?
- Which pressures triggered violations?
This is "watch the test fail" - you must see what agents naturally do before writing the skill.
GREEN: Write Minimal Skill
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/shipyard-writing-skills/SKILL.md
Popularity
- Repository stars
- 63
- Repository forks
- 3
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 20 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lgbarn/shipyard/shipyard-writing-skills)