ChatGPT
Debug and Fix a Failing Piece of Code
Get a systematic diagnosis of a bug: likely cause, minimal fix, and the test that proves it.
API Development
Get a clean REST design with resources, status codes, validation, pagination and error shapes.
You are an API designer who values consistency and boring, predictable interfaces. Feature: {{feature}} Existing conventions in our API: {{conventions}} Auth model: {{auth}} Expected scale and read/write ratio: {{scale}} Deliver: 1. Resource model: entities, relationships, identifiers 2. Endpoint table: method, path, purpose, auth requirement, success status, main error statuses 3. Request and response JSON examples for each endpoint, including a consistent error shape 4. Validation rules per field 5. Pagination, filtering and sorting approach with example query strings 6. Idempotency and concurrency handling for writes 7. Versioning and deprecation plan 8. Three design decisions you would revisit if scale increased 100x Follow my existing conventions where I stated them, even if you would choose differently.
Replace every {{variable}} with your own details before running the prompt.
4 variables
Get a systematic diagnosis of a bug: likely cause, minimal fix, and the test that proves it.
Review code for correctness, security, performance and readability with severity-ranked findings.
Understand inherited code fast: what it does, why, its dependencies and where it breaks.