Write the spec, then ask the agent to implement
A 30-line spec.md beats a 3-line prompt every time — agents follow written specs better than free-form chat.
- Type: Prompt
- Tags: Coding Agent Hacks, Intermediate, Claude Code, Codex, Cursor
- Updated: 2026-10-01
Prompt
A 30-line spec.md beats a 3-line prompt every time — agents follow written specs better than free-form chat. Drop a `spec.md` next to the code. List: goal, acceptance criteria, files to touch, things to NOT touch, and the test you want passing. Then ask the agent to implement against the spec. You'll catch design issues before code is written and the agent has a checklist it can self-verify against. Implementation example: # spec.md — Add rate limiting ## Goal Per-user 60 req/min on /api/* — return 429 with Retry-After. ## Acceptance - [ ] middleware.ts intercepts /api/* - [ ] Redis-backed (use existing src/redis.ts) - [ ] Test: 61st req in a minute returns 429 - [ ] Existing /api/health stays unlimited ## Don't touch - auth middleware (separate concern) - /api/webhooks (provider retries need no limit)
More prompts
- Expense Report Automation System — Save More Time
- Meeting Scheduling Link Standardization — Save More Time
- Invoice Generation and Delivery Automation — Save More Time
- Document Template Automation Library — Save More Time
- Calendar Management Automation Rules — Save More Time
- File Organization and Naming System — Save More Time
- Recurring Payment Automation Setup — Save More Time
- Data Entry Elimination Framework — Save More Time