- Home
- Skills
- Code Quality & Review
- Write the Spec Before Any Code
More screenshots
Works with the AI Agents you already use
Write the Spec Before Any Code
The agent writes a spec, a plan, and a task list before it writes any code — then a different model checks the result against the spec.
$12
Write the Spec Before Any Code
Example session with this skill installed
Start a spec-first build for a Python CLI tool that converts JSON files to CSV. Use the five-phase protocol.
- Read your context and instructions
- Compiled the write the spec
- Generated the data export
I have initiated Phase 1 of the Spec-First Agent Development protocol. I have created spec.md in your root directory. Please review the scope and requirements below. Once you approve or suggest edits, we will freeze this document and move to Phase 2 (Planning).
spec.md
| Section | Content |
|---|---|
| Purpose | A lightweight Python CLI tool to transform complex JSON data into flattened CSV files for spreadsheet analysis. |
| Users | Data analysts who need to process nested API responses without writing custom scripts. |
| Scope | Input single/multiple JSON files; flatten nested objects; output CSV to specified directory; basic logging. |
| Non-Goals | No GUI; no direct API integration; no support for XML or YAML; no data visualization. |
| Requirements | R1: Accept --input path. R2: Support --flatten flag for nested keys. R3: Valid JSON schema check. R4: Output naming convention [filename]_converted.csv. |
| Acceptance Criteria | AC1: CLI runs via python main.py. AC2: Nested JSON {"a": {"b": 1}} becomes a.b column in CSV. AC3: Error message shown for invalid JSON. |
| Constraints | Python 3.9+; standard library preferred; pandas allowed only if standard csv module fails flattening requirements. |
Next steps
- Review the
spec.mdfile and confirm the requirements are complete. - Reply with "Approved" to freeze the spec and trigger Phase 2: Plan the build.
- If changes are needed, specify the Requirement (R) or Criteria (AC) number to modify.
_converted.csv
CSV · data export
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Prompt-and-eyeball development fails in a predictable way: the agent builds something plausible, you react to it, the conversation drifts, and three hours later nobody can say what the thing was supposed to be. The fix is old-fashioned engineering discipline applied to agents — write down what is being built before building it, and keep that document in charge. The spec, not the chat, is the source of truth.
Inside the package: the skill file with the five phases and the amendment rule, a complete example spec, and the cross-check protocol. The spec is one document, written before any code, answering in plain language: the purpose; who uses it and where; the complete scope as behavior ("a user can export the list as a spreadsheet file," not "use a spreadsheet library"); the non-goals — what it deliberately does not do, the section that earns its keep the first time the agent cheerfully builds a feature nobody asked for; the requirements, numbered so later phases can point at them; how a human will know each requirement is met (if that can't be checked, it isn't a requirement yet); and the constraints. The plan phase turns the spec into architecture and technology choices, each tied to a numbered requirement — anything in the plan serving no requirement is either a missing requirement or gold-plating, and gets dealt with as one of those. The task phase breaks it into small, ordered steps, each naming its requirements and its own observable done-test.
A run goes like this: the agent does not advance to the next phase until the current one exists as a file and you have seen it — arguing about a spec for twenty minutes is cheaper than arguing about finished code for two days. Once you approve it, the spec is frozen. Building goes one task at a time, in order, each checked off with its done-test; commits reference task numbers, and task numbers reference requirements, so any line of work traces back to a human decision. If the agent finds the spec is wrong mid-build, it stops and amends it properly — edit, one change-log line with date and reason, re-derive the affected tasks — instead of improvising quietly. At the end, a different model gets the frozen spec and the finished work and nothing else — no build chat, no excuses — and reports every requirement as met, partially met, or not met, with the evidence. It does not fix anything. The model that wrote the code is the worst reviewer of it, and the first time the checker finds the requirement the builder quietly dropped, the overhead pays for itself.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.
Requires manual human approval between phases. Effective cross-checking requires a second model or fresh context. Not suitable for rapid prototyping where documentation is unwanted.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 6 days ago
- Software
- A coding agent and a build idea to spec