Install
openclaw skills install spec-first-devSpec-driven development workflow. Before writing any code, generates a comprehensive SPEC.md covering data models, user flows, API contracts, file structure,...
openclaw skills install spec-first-dev80% of "Claude built the wrong thing" failures come from jumping into code before the spec is clear. This skill forces the right order: spec → approval → implementation.
Use at the start of ANY non-trivial build. If the task will touch >2 files or take >15 minutes, run this first.
Invoked as: /spec-first-dev [brief description of what you want to build]
Or auto-triggered by phrases like "build me", "create a", "implement a" when the scope is non-trivial.
Parse $ARGUMENTS for:
If intent is ambiguous, ask ONE clarifying question before proceeding.
Before speccing anything new, understand what already exists:
Write SPEC.md to the project root (or current directory). Include:
# SPEC: [Feature Name]
## Overview
[1-2 sentences. What this does and why.]
## Data Models
[All entities, fields, types, relationships]
## User Flows / API Contracts
[Numbered steps for each major flow. Include request/response shapes for APIs.]
## File Structure
[New files to create, existing files to modify, with brief reason for each]
## Edge Cases & Error Handling
[Specific scenarios to handle: empty states, failures, invalid input, concurrency]
## Out of Scope
[What we are explicitly NOT building in this task]
## Open Questions
[Any decisions that need input before coding starts]
Output the SPEC.md contents to the user and explicitly pause:
SPEC complete. Review above and confirm before I write any code.
Reply 'go' to proceed, or tell me what to change.
Do not write any implementation code until the user explicitly approves the spec.
Once approved:
SPEC.md — written in the project root before implementation startsSPEC_APPROVED.md — copy of approved spec for audit trailWorks well with: