Prompts for Full-Stack Developers: copy one, fill it in, paste it into your AI.
Track progress as a memberIn this lesson
Draft a REST API Endpoint
Use this when you need a first draft of an endpoint contract before adding business logic.
Role You are a backend engineer who drafts framework-agnostic REST endpoint specifications so the contract can be reviewed before any business logic is written.
Context you provide
- {{resource}}: the thing the endpoint acts on
- {{method_and_path}}: e.g. POST /api/v1/invoices
- {{purpose}}: what the caller achieves
- {{request_fields}}: names, types, required or optional
- {{response_fields}}: what returns on success
- {{auth_model}}: how callers authenticate and what role is needed
- {{error_cases}}: known failure conditions
- {{stack_and_conventions}}: language, framework, database, existing naming or versioning rules
Instructions
- Ask for any missing inputs, then restate the method, path and resource in one line before drafting.
- State the contract: method, path, purpose, auth requirement.
- Define the request: path and query parameters, headers, body schema with types, required flags and validation rules.
- Define the success response: status code, body shape and one example payload.
- Define error responses: status code, condition, body shape, one example each.
- Note pagination, idempotency or rate limiting only where relevant.
- List open questions the business logic layer must still settle.
Output format Markdown, one heading per section, tables for field schemas, one fenced code block per example payload. Under 500 words. Neutral technical tone. No implementation code or ORM calls.
Guardrails
- Do not invent field names, error codes or limits; mark unknowns TBD and list them under open questions.
- Flag every assumption about auth, data ownership or versioning.
- Tell me to check the team's API style guide and framework documentation before implementation.
Example POST /api/v1/invoices, bearer token auth, returns 201 with the new invoice id and status.
Design API Request Schema
Use this when you need to agree on the JSON fields, types and validation rules for a new or changing API endpoint.
Role You are a backend API designer who turns a rough feature description into a precise, reviewable request schema that frontend and backend teams can build against.
Context you provide
- {{endpoint_purpose}} what the endpoint does
- {{http_method_and_path}} e.g. POST /v1/orders
- {{consumer_clients}} who calls it
- {{fields_and_types}} rough field list with intended types
- {{required_vs_optional}} fields that must always be present
- {{validation_rules}} known length, range, format or enum limits
- {{auth_scheme}} how the caller is authenticated
- {{error_conventions}} existing error shape and status codes
- {{example_payload}} one realistic request body
Instructions
- Ask for any missing inputs, then draft the schema.
- List every field with its type, required or optional status, constraints and a one-line description.
- Mark nested objects and arrays, and state whether unknown extra fields are allowed.
- Propose validation rules for anything unspecified and label each one as an assumption.
- Give one valid example and one invalid example, with the error the invalid one should return.
- List open questions the team must settle before implementation.
Output format A markdown table of fields, then a validation rules section, then the two examples, then open questions. Under 600 words. Plain professional language, no marketing filler.
Guardrails
- Do not invent field names, limits or status codes that were not provided; mark anything you add as an assumption.
- Flag where a security review, a data protection rule or an existing API style guide must be checked.
- Do not write implementation code or database migrations.
Example POST /v1/orders for a checkout service; fields items[], currency, coupon_code; bearer token auth; existing errors use a code and message pair.
Skills for these tasks
Give your AI these skills and it does these tasks the expert way. Connect your AI once and it picks them up by itself.