Feature Scaffolding with Working Tests
Turn a short feature spec into code, runnable tests, and integration wiring that match your existing project.
Before & after
Same prompt, same agent — the only difference is the skill.
Here's a general structure for an invoices REST endpoint: - POST /invoices to create an invoice - GET /invoices to list them - Validate the input on create - Return appropriate status codes - Handle errors You'd want a model or schema for the invoice, a route handler, and probably some validation. Depending on your stack, the exact code varies. Add tests to cover the main paths. What framework and language are you using? Then I can give you specific code.
Scaffold from the spec — code, tests, and boilerplate together, matched
to your project's existing conventions (not a generic template).
FROM "create and list invoices" I generate:
ROUTES
POST /invoices — create, validated body, 201 + Location header
GET /invoices — list, paginated (?page, ?limit), 200
(plus GET /invoices/:id — you'll want it within the hour)
VALIDATION
A schema for the invoice body — amount is a positive number, currency
is a known code, line items non-empty. Invalid input → 400 with the
field that failed, not a generic error.
HANDLER
Create: validate → persist → return the created resource.
List: parse pagination, return { data, total, page }. Empty result
is [] with 200, never null — the bug that breaks every client.
TESTS (generated alongside, not as an afterthought)
✓ 201 on valid create, body matches schema
✓ 400 on missing amount
✓ list returns paginated shape, empty = []
✓ 404 on GET of a nonexistent id
BOILERPLATE
Error handler, the model/type, and the route wiring — matched to how
your project already structures these, so it drops in rather than
fighting your conventions.
THE DEFAULTS THAT SAVE YOU LATER
Pagination on the list (unbounded lists break in production), and
[]-not-null on empty. Both are baked in.
Tell me your framework and I'll generate the actual files.About this skill
“Generate this endpoint” often produces a convincing file that the application never loads, plus tests that prove very little. This skill turns a short feature spec into a small, integrated implementation that follows your project's conventions and exercises the behavior you requested.
What it does
- Finds a comparable implementation, its tests, and the registration point before choosing a file structure.
- Converts vague requirements into explicit inputs, outputs, failure behavior, and testable examples.
- Generates working code and the exports, routes, providers, or other wiring needed to reach it.
- Tests boundaries and failure paths through the project's existing test setup.
- Reports what actually ran, what passed, and which assumptions or integration checks remain unresolved.
What you get
A focused patch when repository access is available, or complete files and placement instructions when it is not. Each delivery includes behavioral tests, integration wiring, and an accurate verification status.
Best for
Developers adding modules, handlers, components, and repeated application patterns to an existing codebase without introducing a competing architecture.
SKILL.md preview
---
name: feature-scaffolding-with-working-tests
description: >-
Turn a short feature specification into working code, behavioral tests, and integration wiring that follow an existing project's conventions. Inspect a comparable implementation, define observable contracts, build the smallest complete slice, and verify it with the project's own checks. Use when the user says "scaffold this endpoint", "generate a module from this spec", "add tests with the boilerplate", "follow the existing pattern", "my generated code never plugs into the app", "this scaffold is full of TODOs", or "turn this feature description into working files".
---
# Feature Scaffolding with Working Tests
… (sign up to view the full skill)Featured in
More development skills
View all Development skills →Performance Bottleneck Profiling: Node, Python, Go
Classifies a slowdown, gives exact profiler commands, reads the output, and proves the fix with same-conditions p95/p99 numbers.
Feature Flag Rollouts and Kill Switches
Design staged flag rollouts, verify rollback paths, and audit flag debt with explicit defaults, gates, and retirement plans.
Microcontroller Firmware and RTOS Engineering
Build and debug MCU firmware with bounded ISR/RTOS timing, safe DMA ownership, and measured power budgets.
Engineering Session Status & Handoff Report
Turn session changes, test results, and open decisions into an evidence-backed team update with clear handoff steps.