write-spec
Break large features into independently verifiable, human-reviewable slices under a feature directory in specs/.
Skill by dzhng
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dzhng-write-spec
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, backend, security, writing, documentation
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/write-spec
What's inside
- Skill name
write-spec- Description
- Break large features into independently verifiable, human-reviewable slices under a feature directory in specs/. Use for risky or multi-step feature work that needs upfront questioning, API seams, browser-playable checkpoints, HTML visualizations, screenshot gates, staged implementation plans, recursive fog-of-war reslicing, or proactive research into reference implementations/best practices before slicing. Pairs with your project's verification harness and screenshot gates (the browser checkpoints), [refactor-clean](../refactor-clean/SKILL.md) (review the materialized spec so the plan describes one-owner architecture, not the feature bolted on), [screenshot-critique](../../visual/screenshot-critique/SKILL.md) and [compare-screenshots](../../visual/compare-screenshots/SKILL.md) (the visual gates), and a code-review pass (audit each slice before it lands).
- License
- MIT
- Instructions
- 295 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Write Spec
Turn a large feature into a ladder of small contracts. Each rung should be
understandable to the human, testable by an agent, and useful before the
whole feature is done.
## First Principles
1. **Grill before planning.** Ask one question at a time until you know the
desired outcome, non-goals, review surface, sacred contracts, missing
assets, and first useful playable checkpoint. Give your recommended
answer with each question so the user can accept, reject, or edit it.
Inspect the repo instead of asking questions the code can answer.
Close the interview by asking whether the plan must carry backward
compatibility or data migrations — the default is **neither**: hard
cutovers, no compat shims, no migration scaffolding, no deploy-order
dances. Only the user opting in puts them in the plan.
2. **Slice at API seams.** Each slice should behave like a tiny library where
possible: named module boundary, typed inputs/outputs, deterministic
fixtures, and tests at the seam. If a slice needs three unrelated systems
booted before it can be checked, sharpen the seam.
3. **Research the fog.** When the feature depends on an unfamiliar domain,
high-fidelity visual target, named reference, benchmark, external repo,
library, or "how do people usually do this?" question, do targeted online
research before finalizing slices. Prefer primary sources: official docs,
source repos, papers, case studies, talks, and shipped examples. If a
reference implementation exists, add a replication spike before translation
or approximation.
4. **Make progress visible.** For visual or interactive work, every slice
should produce something playable: a route, fixture page, harness, CLI
probe, or HTML visualization the human can run, inspect, screenshot, and
critique. Tests prove contracts; demos expose taste and intent.
5. **Optimize feedback loops.** Slice so the next useful question can be
answered quickly. Prefer tiny runnable surfaces, hot-reloadable harnesses,
sample fixtures, and self-contained workbenches over plans that require the
whole feature to exist before anyone can learn from it. For asset-heavy
work, plan an asset app/workbench where humans and artists can add samples,
upload replacements, preview them live, and see validation failures fast.
6. **Use the repo's natural shape.** If the repo is a monorepo, plan apps and
packages instead of forcing everything into the current app. Give each
testable surface a first-class route or command; avoid piling new behavior
behind opaque query flags when a small dedicated app would be clearer.
7. **Do not block on missing inputs.** If art, data, credentials, or external
assets are missing, plan generated placeholders plus a replacement contract.
The feature should advance with placeholders, while a separate handoff path
explains exactly what the human or external partner must provide later.
8. **Draft in parallel, then synthesize.** For any multi-slice feature, don't
trust one pass to find the right cut. Fan out a few independent drafts and
merge the best into one plan (see the Workflow). Divergence is the point —
so engineer it on two axes: give each draft a different *bias* (a lens it
optimizes for) and, when more than one model family is available, a mix of
*models*. Blind, differently-biased drafts surface slices, seams, and risks
a lone plan misses — and where they independently agree, you know the cut
is solid.
9. **Recursively uncover fog of war.** The first slice graph is a scouting pass,
not proof the field is known. After drafting, inspect each high-risk slice as
if it were its own feature. If it hides multiple variables, unknown external
practice, unproven architecture, or "we'll figure it out during
implementation," reslice that subset and repeat until every next slice has
one question, one seam, one review surface, and one verdict.
10. **One visual variable per slice.** Visual slices fail when they ask one pass
to match the final hero image. Split by the thing being judged: density,
silhouette, colour, texture, lighting, fog, water placement, water material,
label legibility, animation rhythm. Each slice gets a crop/mask and a verdict
for that variable only. Whole-frame comparison belongs at compose/integration,
after the variables have their own evidence.
## Workflow
1. **Interview:** keep asking until you can name the slices without
hand-waving. Stop when remaining unknowns can safely be discovered by the
first slice.
2. **Research:** inspect the repo and research unfamiliar external practice
before drafting when the feature names a reference, library, technique,
standard, visual target, or performance pattern. Capture the discovered
source/repo/article/paper links in the spec and turn any exemplar into a
reproduction spike before a porting slice.
If prior experiments already established an accepted approach, apply
**From research to implementation** below before drafting alternatives.
3. **Draft in parallel:** for a multi-slice feature, spawn **at least three
independent subagents** to draft the whole plan — fresh context each, a git
worktree apiece if they must run or build to validate, otherwise have them
return the plan inline. Three is the floor, not the count: scale the pool
with the feature's complexity, adding a drafter for each genuinely distinct
approach or lens the problem supports. Give each the *same* brief from the
interview and nothing else (never another draft) — but assign each a
**distinct bias** so their divergence is structured, not accidental. The
baseline trio:
- **A — fewest-slices bias:** the smallest ladder that still ships; merge
slices aggressively, question every rung.
- **B — risk-first bias:** front-load the scariest unknowns; order slices so
the plan dies fast if an assumption is wrong.
- **C — seam-quality bias:** optimize API boundaries, ownership, and
testability at each seam, even at the cost of more slices.
Swap in or add lenses when the feature demands them (e.g. asset-pipeline
bias, perf bias, migration-safety bias), but keep the biases orthogonal —
grow the pool by adding a new lens, never by running the same lens twice.
Also **mix model families**: if you're currently instructed to draft with
codex, run at least one draft with claude — and vice versa — so the pool
balances different models' blind spots, not just different prompts. Family
means vendor (claude vs codex), not tier: every draft uses a
state-of-the-art model; never diversify by dropping to a weaker tier of the
same family. Each drafter: recon the real code and tests (measured facts,
failed approaches, scope firewalls, greppable file/test names), then propose
the slice graph, package/app boundaries, dependencies, API seams, playable
deliverables, verification gates, and human review checkpoints. Skip the
fan-out only for a genuinely single-slice problem.
4. **Synthesize:** read every draft and build the canonical plan yourself —
don't anoint one. Take the strongest slicing, union the seams, risks, andFrom dzhng/skills, MIT.
More from dzhng/skills
- 0.831score
explore-unknowns
dzhng
Guide the user through a quadrant walk that maps the unknowns of a task — open by listing the known knowns, then work through known unknowns, unknown knowns…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.831score
isometric-motion
dzhng
Build animations and interactive elements (explainers, figures, hero visuals, step-through walkthroughs) in the crafted isometric "Anatomy" style, with many…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.831score
cinematic-shot
dzhng
Shoot software UI like a film.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.831score
xiaohei-illustrations
dzhng
Generate Ian-style Xiaohei illustrations for articles, posts, blogs, Notion documents, workflows, methods, processes, structures, states, metaphors, and…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.827score
compare-screenshots
dzhng
Compare screenshots against the intended design, distinguishing approved references from historical baselines.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.827score
screenshot-critique
dzhng
Use the unprimed sub agent as a second set of eyes before accepting visual work — MANDATORY before declaring any user-reported visual bug fixed or claiming a…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.825score
claude
dzhng
Use Claude Code as an independent `claude -p` subagent when the user explicitly asks for Claude, wants a second-agent opinion from Claude, or asks to delegate…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.825score
audit-tests
dzhng
Audit whether tests earn their maintenance cost and which suite owns each contract.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.825score
codex
dzhng
Use the local Codex CLI as an independent second agent.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.825score
refactor-clean
dzhng
Refactor cleanly instead of layering sediment.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.825score
code-review
dzhng
Review changed code for naming, stale references, unnecessary complexity, and comment quality.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.825score
auto-research
dzhng
Run fast, progressive experiments to map tunable parameters and their effects.
SkillAFreshness: A★ 1.4KClaude Code +9
Signals
- Stars
- 1,379
- Forks
- 84
- Open issues
- 0
- Last commit (this folder)
- Sep 26, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/dzhng/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from dzhng
- 0.831score
cinematic-shot
dzhng
Shoot software UI like a film.
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.831score
explore-unknowns
dzhng
Guide the user through a quadrant walk that maps the unknowns of a task — open by listing the known knowns, then work through known unknowns, unknown knowns…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.831score
xiaohei-illustrations
dzhng
Generate Ian-style Xiaohei illustrations for articles, posts, blogs, Notion documents, workflows, methods, processes, structures, states, metaphors, and…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.831score
isometric-motion
dzhng
Build animations and interactive elements (explainers, figures, hero visuals, step-through walkthroughs) in the crafted isometric "Anatomy" style, with many…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.827score
screenshot-critique
dzhng
Use the unprimed sub agent as a second set of eyes before accepting visual work — MANDATORY before declaring any user-reported visual bug fixed or claiming a…
SkillAFreshness: A★ 1.4KClaude Code +9 - 0.827score
compare-screenshots
dzhng
Compare screenshots against the intended design, distinguishing approved references from historical baselines.
SkillAFreshness: A★ 1.4KClaude Code +9
Cite this page
write-spec skill. Agent Mart. https://agentmart.dev/skills/dzhng-write-spec (last updated 2026-10-24)