From harness-kit
Write scannable, progressive-discovery documentation using layered contract pattern
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-kit:documentation-writerThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Write documentation that scales: PURPOSE ≤10 tokens (skim-worthy), CRITICAL ≤20 tokens (failure modes), STANDARD PATH ≤30 lines (80% workflow), DETAIL (opt-in). Full content ≤1500 tokens.
Write documentation that scales: PURPOSE ≤10 tokens (skim-worthy), CRITICAL ≤20 tokens (failure modes), STANDARD PATH ≤30 lines (80% workflow), DETAIL (opt-in). Full content ≤1500 tokens.
Create documentation that readers can scan quickly: short PURPOSE, non-negotiable CRITICAL constraints, happy-path STANDARD PATH, and optional DETAIL sections.
Add YAML with name, description, tools:
---
name: skill-name
description: [One-liner, <80 chars, specific]
allowed-tools: [Bash(pattern*), Read, Write, ...]
---
Skip model: on skills — they run in the parent conversation context, so pinning a model can break long-context sessions. Agents (read-only advisors) get a fresh context and can specify model: safely.
Write in order: PURPOSE, CRITICAL, ASSUMES, STANDARD PATH, EDGE CASES, DETAIL.
Run this test for each section:
PURPOSE answers: "What does this do? When would I use it?" in ONE sentence, ≤10 tokens, answerable without reading more.
Can someone skim PURPOSE (5 seconds) and decide whether to read further? If no, rewrite shorter.
| Bad | Good |
|---|---|
| "Format code using Prettier" | "Auto-format JavaScript/TypeScript files to maintain consistent style" |
| "Commit changes" | "Create conventional commits with quality gates: validate, stage, commit" |
| "Write documentation" | "Create scannable documentation: PURPOSE ≤10 tokens, CRITICAL constraints, STANDARD PATH 80% workflow, optional DETAIL" |
Remove adjectives and examples. Answer only: what + when.
CRITICAL constrains failure modes — things that break catastrophically if ignored.
For each constraint: "If someone ignores this, does the skill catastrophically fail?" If not, move it to STANDARD PATH or EDGE CASES.
| Bad (Nice-to-Know) | Good (Critical) |
|---|---|
| "Remember to add tests" | "Never commit secrets. Run detect-private-key before staging." |
| "Keep code clean" | "Formatting must run before validators. Validators must gate commits." |
| "Follow conventions" | "All skills must use PURPOSE/CRITICAL/STANDARD PATH structure or audit fails." |
STANDARD PATH is the 80% happy case: step-by-step with prose + code.
Mix narrative and code. Each step is 1-2 sentences + example:
### 1. [Step Name]```bash and ending with ```Example structure:
### 1. [Step Name]
[Prose: what to do and why]
[command showing the action]
[Prose: what to expect next]
Can 80% of users follow this without consulting EDGE CASES? If no, skill does too much or needs redesign.
If PURPOSE or CRITICAL are running long:
If the skill covers multiple domains ("format AND test AND commit"), split it.
Can you describe the happy path in 2-3 steps without conditionals? If no, split it.
If EDGE CASES section has >5 items, skill is doing too much.
Does 80% of users follow the STANDARD PATH? If <80% follow the same path, you're covering too many workflows.
/skill-writer — Structure skills using this pattern/harness audit — Audit skills for progressive disclosure complianceCLAUDE.md — Project documentation conventionsnpx claudepluginhub dougborg/harness-kit --plugin harness-kitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.