Claude Prompt Library

30 Claude Prompts for API Specs

30 copy-paste prompts

Paste your product details and get draft OpenAPI, endpoint contracts, versioning rules, and error payloads you can review with engineering before build starts.

In short: This page contains 30 copy-paste ready prompts, organized into 6 categories with a description and pro tip for each. The first 5 prompts are free instantly, no signup needed. Hand-curated and tested by the AI Academy team.

Louis Corneloup
By Louis Corneloup · Founder, Techpresso
Last updated ·Hand-curated & tested by the AI Academy team

OpenAPI Drafts

5 prompts

OpenAPI 3.1 skeleton from a product brief

1/30

✨ What it does

Produces a first-pass OpenAPI 3.1 YAML skeleton with CRUD paths, schemas, and a list of decisions to confirm.

You are a senior API designer who writes OpenAPI 3.1 documents that backend and frontend teams can implement from without a follow-up meeting. <context> I am a product manager preparing the first OpenAPI draft for a new resource so engineering can estimate work and start stubs next sprint. </context> <inputs> - Product name: [PRODUCT NAME] - Base URL: [BASE URL] - Primary resource: [RESOURCE NAME] - Auth method: [AUTH SCHEME] - OpenAPI version target: [3.1.0] </inputs> <task> Draft a complete OpenAPI 3.1 skeleton covering info, servers, securitySchemes, tags, and one CRUD path set for the primary resource, including request and response schemas. </task> <constraints> Use YAML. Do not invent fields the product brief never mentioned. Mark unknown fields as TODO comments. Keep operationIds stable and kebab-case. No marketing language in descriptions. </constraints> <format> Return the YAML first, then a short list of decisions you made and questions I should confirm with engineering before this becomes the source of truth. </format>

💡

Pro tip: Paste the user stories for this resource, not a slide title, so the paths match how the product actually works.

Path item and operation object draft

2/30

✨ What it does

Writes one OpenAPI path item with parameters, request body, and the four response cases teams usually miss.

You are an API specification lead who writes path items that stay consistent across a large OpenAPI file. <context> I have a resource name and a verb, and I need one well-formed path item with request body, parameters, and response objects before I add it to our spec repo. </context> <inputs> - Path template: [PATH TEMPLATE] - HTTP method: [HTTP METHOD] - Operation summary: [OPERATION SUMMARY] - Required path parameters: [PATH PARAMETERS] - Success status code: [SUCCESS STATUS] </inputs> <task> Write the path item and operation object, including parameters, requestBody if needed, and responses for success, validation failure, not found, and auth failure. </task> <constraints> Follow OpenAPI 3.1 object shapes. Use $ref for any schema you introduce more than once. Keep descriptions under 25 words. Do not add query parameters I did not list. </constraints> <format> Return YAML for the path item, then a table of status code to when it fires, then two open questions for the backend owner. </format>

💡

Pro tip: Give the real path template with braces, like /orders/{orderId}, so parameter names stay aligned with the route.

Reusable schema and component set

3/30

✨ What it does

Builds a reusable OpenAPI components block and maps each endpoint to the correct $ref, flagging shape conflicts.

You are a platform API architect who keeps components/schemas DRY so product teams stop duplicating the same object in every path. <context> Our spec has the same customer object copied into four endpoints and they already drifted. I need one reusable component set. </context> <inputs> - Shared object name: [SCHEMA NAME] - Required fields: [REQUIRED FIELDS] - Optional fields: [OPTIONAL FIELDS] - Endpoints that reuse it: [ENDPOINT LIST] - Existing conflicting shapes: [CONFLICT NOTES] </inputs> <task> Design a components/schemas block for the shared object, plus any nested types, and show how each listed endpoint should $ref it for request and response. </task> <constraints> Prefer one shared schema plus a write-variant if create and read differ. Call out any field that cannot be shared. Do not silently pick a winner when two endpoints disagree. Keep YAML valid. </constraints> <format> Return the components YAML, a mapping table of endpoint to $ref, and a short note on each conflict that needs a product decision. </format>

💡

Pro tip: List the fields each consumer actually reads. Shared schemas that carry unused fields become a source of accidental breaking changes.

Request and response examples for OpenAPI

4/30

✨ What it does

Adds OpenAPI request and response examples for success, validation failure, and not-found that match the schema.

You are a developer experience writer who adds realistic examples to OpenAPI so mock servers and contract tests have something concrete to run. <context> Our spec validates, but reviewers keep asking what a real payload looks like. I need examples that match the schemas, not marketing sample data. </context> <inputs> - OperationId: [OPERATION ID] - Resource: [RESOURCE NAME] - Happy-path payload facts: [SAMPLE FACTS] - Known edge case: [EDGE CASE] - Media type: [APPLICATION/JSON] </inputs> <task> Write OpenAPI examples for the request body and for 200, 400, and 404 responses. Each example must be valid against the implied schema and use the facts I provided. </task> <constraints> No lorem ipsum and no fake emails like [email protected] if I gave a real domain pattern. Keep IDs looking like production IDs. Mark any invented field with a comment so I can strip it. </constraints> <format> Return YAML example objects keyed the way OpenAPI expects, then a one-line note on which example a contract test should pin first. </format>

💡

Pro tip: Use one real anonymized production payload if you have it. Reviewers trust examples that look like traffic they already see.

Servers, security schemes, and tags block

5/30

✨ What it does

Writes the OpenAPI servers, securitySchemes, and tags block so new paths inherit the same env and auth rules.

You are a staff API platform engineer who sets the top of an OpenAPI file so environments and auth stay consistent across product teams. <context> I am opening a new spec for a product line and need the servers, securitySchemes, and tags blocks decided before anyone writes paths. </context> <inputs> - Environments: [DEV, STAGING, PROD URLS] - Auth schemes in use: [AUTH SCHEMES] - Audience: [INTERNAL OR PUBLIC] - Tag list by domain: [TAG LIST] - Rate limit header name: [RATE LIMIT HEADER] </inputs> <task> Draft the info, servers, security, securitySchemes, and tags sections, including how auth is applied by default and which tag each future path should pick. </task> <constraints> Do not invent a second auth scheme. If two environments share a host pattern, say so. Keep tag descriptions factual. Mention the rate limit header only as a documented response header convention, not as a fake security scheme. </constraints> <format> Return YAML for those top-level objects, then a five-line usage note for authors adding a new path. </format>

💡

Pro tip: Put staging and prod as named servers, not comments. Codegen and mock tools read the servers list, not your README.

Endpoint Design

5 prompts

Resource naming and URL map

6/30

✨ What it does

Produces a resource and URL map with method, path, and rationale, plus names you should not use.

You are a principal API designer who names resources so URLs stay stable for years and stay obvious to a new engineer on day one. <context> I have a list of product nouns and actions, and I need a URL map before we start writing OpenAPI paths. I do not want verbs in the path unless there is no noun that fits. </context> <inputs> - Product nouns: [NOUN LIST] - User actions: [ACTION LIST] - Existing paths we cannot break: [EXISTING PATHS] - Collection style we already use: [PLURAL NOUNS OR MIXED] - Tenant scope: [TENANT SCOPE] </inputs> <task> Propose a resource and URL map: collection paths, item paths, and sub-resources. Call out any action that should be a verb path versus a field change on an existing resource. </task> <constraints> Prefer plural nouns and nest only one level unless a child cannot exist without the parent. Do not rename an existing path. If two nouns collide, pick one and explain why. Keep paths lowercase and hyphenated. </constraints> <format> Return a table of action, method, path, and rationale, then a short list of names you rejected and why. </format>

💡

Pro tip: Start from the nouns customers already use in the UI. If the path says job and the screen says campaign, support tickets will never match the spec.

HTTP method and status code map

7/30

✨ What it does

Maps each product operation to an HTTP method and status codes, including which work should return 202.

You are a senior backend engineer who reviews whether product asks map to the right HTTP method and status codes before the spec is published. <context> I have a set of product operations that were written as user stories, and I need each one mapped to a method and a success status so the frontend and backend stop arguing in Slack. </context> <inputs> - Operations to map: [OPERATION LIST] - Idempotency expectation: [IDEMPOTENT OR NOT] - Partial update need: [PATCH OR PUT] - Async jobs: [ASYNC JOB LIST] - Current frontend assumption: [FRONTEND ASSUMPTION] </inputs> <task> Map each operation to a method, success status, and failure statuses. Flag any operation that should be 202 with a job resource instead of a synchronous 200 or 201. </task> <constraints> Do not use 200 for a create. Do not use PUT if the client cannot send the full resource. Call out any mismatch with the frontend assumption. Keep the map implementable in a typical REST stack. </constraints> <format> Return a table with columns for operation, method, success status, failure statuses, and a one-line note. End with questions that still need a product call. </format>

💡

Pro tip: If the UI already fires and forgets, mark that operation async now. Changing a 201 to a 202 after launch is a breaking change for clients.

Filter, sort, and pagination contract

8/30

✨ What it does

Defines a reusable filter, sort, and pagination contract with a sample URL, envelope, and style rules.

You are an API product owner who writes list-endpoint contracts that stay the same across every collection in the product. <context> We have three list screens that each invented their own query params. I need one contract for filter, sort, and pagination that new endpoints can copy. </context> <inputs> - Collection name: [COLLECTION NAME] - Filterable fields: [FILTER FIELDS] - Sortable fields: [SORT FIELDS] - Default page size: [DEFAULT PAGE SIZE] - Pagination style we prefer: [CURSOR OR OFFSET] </inputs> <task> Write the query parameter contract and the list response envelope, including how empty pages, unknown filters, and oversize page requests are handled. </task> <constraints> Pick one pagination style and do not mix cursor and offset on the same collection. Unknown filters must fail closed with a 400, not be ignored. Cap page size. Keep parameter names consistent with the rest of our API if I named a style. </constraints> <format> Return a parameter table, a sample request URL, a sample JSON envelope, and a five-rule style guide other endpoints should follow. </format>

💡

Pro tip: Cursor pagination is safer once a list can grow past a few thousand rows. Offset is fine for admin tables that stay small.

Idempotency and write semantics

9/30

✨ What it does

Specifies idempotency-key behavior for a write endpoint, including replay, conflict, and expiry cases.

You are a distributed systems engineer who specifies write semantics so retries from mobile and payment clients do not create duplicate records. <context> Our create-order path is called from a flaky mobile network. I need the spec to state how idempotency keys work and what a replay returns. </context> <inputs> - Write endpoint: [WRITE ENDPOINT] - Idempotency header name: [IDEMPOTENCY HEADER] - Key lifetime: [KEY LIFETIME] - Conflicting replay behavior: [CONFLICT BEHAVIOR] - Side effects on create: [SIDE EFFECTS] </inputs> <task> Write the write-semantics section for this endpoint: required headers, stored key scope, response on first success, response on a matching replay, and response on a conflicting replay. </task> <constraints> Be explicit about whether a replay returns the original body and status. State what happens if the key expires mid-retry. Do not assume the client can safely POST twice. Mention side effects so product knows what a duplicate would cost. </constraints> <format> Return a spec section with subsections for Header, First write, Replay, Conflict, and Expiry, plus a short client implementation note. </format>

💡

Pro tip: Scope the key to the caller identity plus the path. A global key store lets one tenant collide with another if keys are short.

Nested resource versus flat design

10/30

✨ What it does

Recommends nested or flat resource design with a path table and client impact notes.

You are an API strategist who decides when a child should live under a parent path and when it should be a top-level resource with a foreign key. <context> I am specifying comments on tickets and I am not sure whether /tickets/{id}/comments or /comments?ticketId= is the right long-term shape. </context> <inputs> - Parent resource: [PARENT RESOURCE] - Child resource: [CHILD RESOURCE] - Access pattern: [ACCESS PATTERN] - Lifecycle rule: [CHILD LIFECYCLE] - Existing client consumers: [CLIENT LIST] </inputs> <task> Recommend nested versus flat, with a path set for the recommended option and a migration note if we later need the other shape. </task> <constraints> If a child is queried across parents, lean flat. If a child cannot exist without the parent and is always listed in that context, lean nested. Do not recommend both as first-class without a reason. Keep the recommendation to one primary shape. </constraints> <format> Return the recommendation in one paragraph, then the path table, then a list of client impacts for the consumers I named. </format>

💡

Pro tip: Ask who owns delete. If deleting the parent must cascade, nesting usually matches the lifecycle better than a loose foreign key.

Versioning Strategy

5 prompts

URI versus header versioning decision

11/30

✨ What it does

Writes a versioning decision memo covering URI versus header, how clients opt in, and what you will not support.

You are an API governance lead who has shipped both URI versioning and header versioning and can explain the tradeoffs to a product manager without a slide deck. <context> We are about to publish a public API and I need a written decision on /v1 versus an Accept-Version header before we cut the first client SDK. </context> <inputs> - Audience: [PUBLIC OR PARTNER] - Client types: [CLIENT TYPES] - Expected breaking-change rate: [CHANGE RATE] - Gateway we use: [API GATEWAY] - Existing URL style in the company: [EXISTING URL STYLE] </inputs> <task> Recommend URI versioning, header versioning, or a hybrid. Write the decision, the default for new endpoints, and how a client opts into a new version. </task> <constraints> Pick one primary approach. Do not recommend both as equals. Account for the gateway I named. Mention cache and CDN behavior. Keep the memo under 400 words and free of vendor marketing. </constraints> <format> Return a decision memo with sections for Recommendation, Why, How clients opt in, and What we will not support in year one. </format>

💡

Pro tip: If you already have partner bookmarks and Postman collections, URI versions are easier to support than a custom header those collections never send.

Breaking change changelog

12/30

✨ What it does

Produces a partner-ready changelog with before and after JSON, client action, and a sunset date.

You are a technical writer who maintains API changelogs that partner engineers actually read before they upgrade a client. <context> We are shipping a breaking change on a public endpoint and I need a changelog entry that states what breaks, what to do, and when the old shape dies. </context> <inputs> - Endpoint: [ENDPOINT PATH] - Current version: [CURRENT VERSION] - Next version: [NEXT VERSION] - What changed: [CHANGE LIST] - Sunset date: [SUNSET DATE] </inputs> <task> Write a changelog entry that a partner engineer can act on: old versus new request and response, required code change, and the date the old version stops accepting traffic. </task> <constraints> No vague phrases like improved payload. Show before and after JSON. If a field was renamed, show both names. Do not hide a type change inside a wording tweak. Keep it under 350 words after the samples. </constraints> <format> Return markdown with headings for Summary, Before, After, Client action, and Sunset. Include one curl example for the new version. </format>

💡

Pro tip: Lead with the field that will 400 if they do nothing. Partners skim. If the first line is a narrative, they miss the break.

Deprecation timeline for an endpoint

13/30

✨ What it does

Builds a deprecation timeline with headers, partner email copy, and a fallback if a named partner is late.

You are an API program manager who writes deprecation timelines that legal, support, and partner success can all send without rewriting. <context> We need to retire an old list endpoint that still serves 12 percent of traffic. I need a timeline and the messages each team will send. </context> <inputs> - Endpoint to retire: [DEPRECATED ENDPOINT] - Replacement endpoint: [REPLACEMENT ENDPOINT] - Current traffic share: [TRAFFIC SHARE] - Notice period we promised: [NOTICE PERIOD] - Top consuming partners: [PARTNER LIST] </inputs> <task> Draft a deprecation timeline with dates, headers we will start returning, emails or status-page notes, and the hard cutover. Include a fallback if a named partner is not ready. </task> <constraints> Honor the notice period I gave. Do not propose a silent break. Name the deprecation and sunset headers. Keep dates relative to TODAY plus the notice period if I did not give calendar dates. </constraints> <format> Return a dated timeline table, the exact header names and values, a 120-word partner email, and a one-paragraph internal fallback plan. </format>

💡

Pro tip: Measure the named partners against the traffic share before you lock the cutover. Twelve percent can be two customers or two hundred.

Compatibility matrix across versions

14/30

✨ What it does

Creates an SDK-to-API version matrix with supported cells, exclusive features, and canned support replies.

You are a solutions architect who builds compatibility matrices so support can answer which client version talks to which API version. <context> We have three API versions live and four official SDKs. Support keeps guessing. I need one matrix I can paste into the partner portal. </context> <inputs> - API versions still live: [API VERSIONS] - Official SDKs and versions: [SDK LIST] - Features added per version: [FEATURE LIST] - Known broken pairings: [BROKEN PAIRINGS] - Support policy: [SUPPORT POLICY] </inputs> <task> Build a compatibility matrix of SDK version versus API version, mark supported, deprecated, and unsupported cells, and list the features that appear only on newer API versions. </task> <constraints> Do not mark a pairing supported if I listed it as broken. If a cell is unknown, mark it unknown rather than guessing. Keep the matrix to one page. Use the support policy I gave for how long deprecated stays answerable. </constraints> <format> Return a markdown table, a short feature-by-version list, and three canned support replies for the most common tickets. </format>

💡

Pro tip: Update the matrix the same day you tag an SDK. A stale matrix is worse than none because support will quote it with confidence.

Sunset notice for a field or endpoint

15/30

✨ What it does

Writes a sunset notice, grace-period headers, and the post-cutover error body for a field or endpoint.

You are a partner communications lead who writes sunset notices that are specific enough a lawyer and an engineer can both sign off. <context> A response field is going away and I need the public notice, the response header we will send during the grace period, and the error body after cutover. </context> <inputs> - Item being removed: [FIELD OR ENDPOINT] - Replacement: [REPLACEMENT] - Grace period end: [CUTOVER DATE] - Header we will emit: [SUNSET HEADER] - Audience: [PARTNER OR INTERNAL] </inputs> <task> Write the public sunset notice, the header contract during the grace period, and the error payload clients receive after the cutover if they still send or expect the old item. </task> <constraints> State the cutover date in ISO 8601. Do not promise we will keep a shadow field after that date. Keep the notice under 200 words. The error payload must match our error contract style if I described one, otherwise use RFC 9457. </constraints> <format> Return three blocks labeled Notice, Grace-period headers, and Post-cutover error, each ready to paste. </format>

💡

Pro tip: Put the cutover date in the header and the notice. Clients that only read one of the two still get a date they can parse.

These prompts give you the what. Tutorials give you the why.

Learn when to use extended thinking, how to build Claude Projects, and workflows that compound. 300+ tutorials and growing.

Try AI Academy Free

Error Contracts

5 prompts

RFC 9457 problem details envelope

16/30

✨ What it does

Designs an RFC 9457 problem-details envelope with OpenAPI schema, examples, and a legacy-field map.

You are an API designer who standardizes error bodies on RFC 9457 so every product team stops inventing a new error JSON shape. <context> Our services return three different error objects and the mobile team cannot share a parser. I need one problem-details envelope and the OpenAPI schema for it. </context> <inputs> - API name: [API NAME] - Type URI base: [TYPE URI BASE] - Fields we must keep from today: [LEGACY FIELDS] - Default language: [LANGUAGE CODE] - Correlation header: [CORRELATION HEADER] </inputs> <task> Design a problem-details error envelope that meets RFC 9457, maps any legacy fields I listed, and includes a type URI pattern plus an OpenAPI schema. </task> <constraints> Use type, title, status, detail, and instance. Put product-specific fields under a documented extension member, not at the root if they collide with the RFC. Keep titles stable and details safe to show a user. Do not put stack traces in the body. </constraints> <format> Return the JSON schema in YAML, one example for 400 and one for 500, and a mapping table from each legacy field to the new member. </format>

💡

Pro tip: Keep type URIs on a docs host you control. If the type URL 404s, partner engineers lose the only page that explains the code.

Stable error code catalog

17/30

✨ What it does

Builds a stable error-code catalog with HTTP status, retry guidance, and a process for adding codes later.

You are a platform PM who owns the error code catalog so support macros and client switch statements stay stable across releases. <context> Engineers keep adding stringly-typed error names in PRs. I need a catalog with codes, HTTP status, retry guidance, and a user-safe title. </context> <inputs> - Domain: [DOMAIN NAME] - Codes already in production: [EXISTING CODES] - New failure modes: [NEW FAILURE MODES] - Retry policy default: [RETRY POLICY] - Who may add a code: [OWNING TEAM] </inputs> <task> Produce a catalog of error codes for the domain, reuse existing codes where they still fit, and add codes only for the new failure modes. Include status, retry, and a one-line client action. </task> <constraints> Codes are uppercase with dots or underscores, never sentences. Do not reuse a code for a new meaning. If a failure is the same as an existing code, say so instead of minting a twin. Keep the catalog under 25 rows unless I listed more failures. </constraints> <format> Return a table with code, HTTP status, title, retry, and client action, then a two-rule process for adding a code later. </format>

💡

Pro tip: Freeze codes once a partner SDK ships a switch on them. A renamed code is a breaking change even if the HTTP status stays the same.

Validation error payload for field lists

18/30

✨ What it does

Specifies a multi-field validation error payload with pointers the frontend can map onto a form.

You are a frontend-platform engineer who specifies validation errors so a form can highlight the right fields from one response body. <context> Our 400 responses say invalid request and the form cannot mark which input failed. I need a field-level error list that matches our problem-details envelope. </context> <inputs> - Endpoint: [ENDPOINT PATH] - Fields that can fail: [FIELD LIST] - Validation rules per field: [VALIDATION RULES] - Pointer style: [JSON POINTER OR FIELD NAME] - Envelope we already use: [ERROR ENVELOPE] </inputs> <task> Specify the validation error payload, including how multiple field errors are listed, how pointers are written, and one example covering two fields failing at once. </task> <constraints> Every field error needs a stable code and a pointer. Do not return only the first error if two fields fail. Keep messages safe for end users. Match the envelope I named. No HTML in messages. </constraints> <format> Return the schema as YAML, one multi-field JSON example, and a short note for the frontend on how to map pointers to form fields. </format>

💡

Pro tip: Use JSON Pointer if the body is nested. Flat field names break as soon as you validate an item inside an array.

Rate limit and retry-after contract

19/30

✨ What it does

Defines the 429 body, rate-limit headers, and a short client retry algorithm including Retry-After.

You are an API reliability engineer who writes the 429 contract so clients back off the same way and do not retry in a tight loop. <context> We are adding rate limits to a public write API. I need the 429 body, the headers, and the retry rules written so SDKs can implement them once. </context> <inputs> - Limit window: [LIMIT WINDOW] - Requests per window: [REQUEST QUOTA] - Header names: [RATE LIMIT HEADERS] - Burst behavior: [BURST RULE] - Write endpoint this applies to: [WRITE ENDPOINT] </inputs> <task> Specify the 429 response, the rate-limit headers on success and on throttle, and the retry algorithm clients should use, including Retry-After. </task> <constraints> Name exact header names. State whether Retry-After is seconds or an HTTP date. Do not tell clients to retry immediately. Document what happens if they ignore the limit. Keep the body aligned with RFC 9457 if you introduce a type URI. </constraints> <format> Return a header table, a 429 JSON example, and a numbered client retry algorithm of no more than six steps. </format>

💡

Pro tip: Send remaining and reset headers on 200s, not only on 429. Clients that only learn the quota after they are blocked will keep bursting.

Multi-error and partial-success envelope

20/30

✨ What it does

Designs a batch envelope for partial success with item correlation and a status-code decision table.

You are a staff API designer who specifies batch endpoints that can succeed in part without leaving the client guessing which item failed. <context> We are adding a batch create. Some items will pass and some will fail validation. I need an envelope that reports both without looking like a 200 that hid errors. </context> <inputs> - Batch endpoint: [BATCH ENDPOINT] - Max items per call: [MAX ITEMS] - Per-item success shape: [SUCCESS SHAPE] - Per-item error shape: [ERROR SHAPE] - HTTP status if mixed: [MIXED STATUS] </inputs> <task> Design the request and response for partial success, including the status code for a mixed result, how items are correlated to the request, and when the whole call fails instead. </task> <constraints> If I did not pick a mixed status, recommend 207 or 200 with a documented errors array and explain the tradeoff. Every item needs a stable index or client-supplied id. Cap the batch size. Do not drop failed items from the response. </constraints> <format> Return request JSON, mixed-result JSON, all-fail JSON, and a four-row decision table for which status to return. </format>

💡

Pro tip: Require a client item id. Array index correlation breaks as soon as someone retries a subset of the batch.

Request and Response Contracts

5 prompts

Request body field matrix

21/30

✨ What it does

Produces a create-and-update field matrix with types, role write access, and read visibility.

You are a product operations analyst who turns a feature brief into a field matrix so engineering and design argue about columns, not Slack threads. <context> I have a create-and-update flow for one resource and I need every field listed with type, required on create, required on update, and who can write it. </context> <inputs> - Resource: [RESOURCE NAME] - Fields from the brief: [FIELD LIST] - Roles that call the API: [CALLER ROLES] - Immutable after create: [IMMUTABLE FIELDS] - Secret or write-only fields: [WRITE-ONLY FIELDS] </inputs> <task> Build a field matrix for create and update, including type, nullability, default, write access by role, and whether the field is returned on read. </task> <constraints> Do not add fields I did not list unless they are standard metadata like createdAt. Mark write-only fields so they never appear in GET. If a role cannot write a field, say so in the matrix, not in a footnote only. </constraints> <format> Return a markdown table, then a short list of fields that need a product decision before the spec is locked. </format>

💡

Pro tip: Review write-only fields with security. Tokens and secrets that leak on GET are the most common spec bug in a first draft.

List response pagination envelope

22/30

✨ What it does

Specifies a list envelope with pagination fields, first-page and last-page examples, and a client fetch algorithm.

You are a mobile-client engineer who specifies list envelopes so infinite scroll and pull-to-refresh share one contract. <context> Our list endpoints return a bare array and the app cannot tell if more pages exist. I need a standard envelope with cursors or page links. </context> <inputs> - Collection: [COLLECTION NAME] - Pagination style: [CURSOR OR OFFSET] - Default and max page size: [PAGE SIZES] - Sort default: [DEFAULT SORT] - Extra top-level metadata: [METADATA FIELDS] </inputs> <task> Specify the list response envelope, including items, pagination fields, and empty-result behavior. Include a sample first page and a sample last page. </task> <constraints> Never return a bare array. Last page must make hasMore or nextCursor unambiguous. Do not put pagination only in Link headers unless I asked for both. Keep metadata optional and documented. </constraints> <format> Return the JSON schema in YAML, two example payloads, and a four-line client algorithm for fetching the next page. </format>

💡

Pro tip: Make nextCursor absent or null on the last page, not an empty string. Empty strings get stored and sent back as a real cursor.

Webhook payload and retry contract

23/30

✨ What it does

Writes a webhook contract covering payload, signature, retries, and how partners ignore duplicate deliveries.

You are an integration engineer who specifies outbound webhooks so partners can verify, retry, and ignore duplicates without emailing support. <context> We will POST events to customer URLs when a resource changes. I need the payload, signature, and retry schedule written as a contract, not a blog post. </context> <inputs> - Event names: [EVENT NAMES] - Payload fields: [PAYLOAD FIELDS] - Signature header: [SIGNATURE HEADER] - Retry schedule: [RETRY SCHEDULE] - Timeout we wait: [TIMEOUT SECONDS] </inputs> <task> Write the webhook contract: HTTP method, required headers, JSON body, signature method, retry and backoff, and what we do after the last failure. </task> <constraints> Events must include an event id for idempotency. Do not retry on 4xx except 408 and 429. State clock skew tolerance for signatures. Keep the payload small enough for a 10-second consumer timeout if that matches what I set. </constraints> <format> Return a header table, one JSON example per event name I listed, the retry schedule as a table, and a partner verification snippet in prose steps, not code for a specific language. </format>

💡

Pro tip: Deliver the event id and a stable event name at the top of the body. Partners who parse only the resource object will miss the type.

PATCH semantics and JSON Merge Patch rules

24/30

✨ What it does

Defines PATCH rules for omit versus null, forbidden fields, and stale-client rejection with a 412 example.

You are a backend lead who writes PATCH rules so clients know how to clear a field, leave a field alone, and avoid accidental wipes. <context> Frontend wants partial updates. I need the spec to say whether we use JSON Merge Patch, JSON Patch, or a custom PATCH, and how null is treated. </context> <inputs> - Resource: [RESOURCE NAME] - Patch style we prefer: [PATCH STYLE] - Fields that cannot be patched: [FORBIDDEN FIELDS] - Null means: [CLEAR OR REJECT] - Concurrent edit protection: [ETAG OR VERSION] </inputs> <task> Write the PATCH contract: media type, how omitted fields are treated, how null is treated, forbidden fields, and how a stale client is rejected. </task> <constraints> Pick one patch style. If I said merge patch, follow RFC 7396. If I said JSON Patch, follow RFC 6902. Do not silently ignore unknown fields unless I asked for that. Require a precondition header if I named ETag or version. </constraints> <format> Return a rules list, a before-and-after example that clears one field, an example that changes one field, and the 412 body when the precondition fails. </format>

💡

Pro tip: Write the null rule in the spec and in the SDK docs. Most accidental wipes come from a client sending null for fields it never loaded.

Content negotiation and header contract

25/30

✨ What it does

Documents Accept and Content-Type rules, the default when Accept is missing, and a 406 example.

You are an API platform engineer who documents headers so clients send the right Accept, Content-Type, and idempotency values on every call. <context> We are adding CSV export next to JSON and I need the header contract written before someone hard-codes application/json in the SDK. </context> <inputs> - Supported media types: [MEDIA TYPES] - Default if Accept is missing: [DEFAULT MEDIA TYPE] - Required auth header: [AUTH HEADER] - Optional headers: [OPTIONAL HEADERS] - Endpoint this applies to: [ENDPOINT PATH] </inputs> <task> Write the header contract for request and response, including what happens on an unsupported Accept, and how CSV versus JSON is selected. </task> <constraints> Name exact header names and example values. A missing Accept must have one documented default. Unsupported Accept must be 406, not a silent JSON body. Keep CORS notes out unless I asked for them. </constraints> <format> Return a request-header table, a response-header table, and three short examples: JSON, CSV, and 406. </format>

💡

Pro tip: Pin the charset on CSV. Excel and some SDKs misread the file if the Content-Type is only text/csv with no charset.

Most people use 10% of Claude. Tutorials unlock the rest.

AI Academy: 300+ hands-on tutorials on Claude, ChatGPT, Midjourney, and 50+ AI tools. New tutorials added every week.

Start Your Free Trial

Review and Handoff

5 prompts

PM spec review checklist

26/30

✨ What it does

Applies a product-focused review checklist to a spec draft and lists the highest-risk gaps.

You are a principal product manager who reviews API specs before they go to engineering, looking for product gaps rather than YAML syntax. <context> I drafted an OpenAPI file with Claude and I need a review checklist applied to it so I catch missing auth, pagination, and error cases before the kickoff. </context> <inputs> - Spec excerpt or summary: [SPEC SUMMARY] - User jobs this API must support: [USER JOBS] - Auth model: [AUTH MODEL] - Launch date: [LAUNCH DATE] - Known open questions: [OPEN QUESTIONS] </inputs> <task> Review the spec against the user jobs. List gaps, contradictions, and missing error cases. Produce a pass/fail checklist a PM can run in 20 minutes. </task> <constraints> Do not nitpick YAML indentation. Focus on whether a client can complete each user job, including failure paths. If a job cannot be completed with the listed paths, say so plainly. Keep the checklist under 15 items. </constraints> <format> Return a checklist table with item, pass or fail or unknown, and a one-line fix. End with the three highest-risk gaps. </format>

💡

Pro tip: Paste the user jobs, not the epic title. A checklist against a vague goal always passes and never finds the missing path.

Backend versus frontend contract gaps

27/30

✨ What it does

Diffs backend spec versus frontend mocks and ranks each gap by owner and launch risk.

You are a full-stack tech lead who diffs what the backend plans to ship against what the frontend already assumed from mock data. <context> Frontend built screens on a mock and backend started from a different OpenAPI branch. I need the gaps listed before we book a joint review. </context> <inputs> - Backend spec summary: [BACKEND SPEC] - Frontend mock or types: [FRONTEND CONTRACT] - Screens already built: [SCREEN LIST] - Launch-critical flows: [CRITICAL FLOWS] - Time until release: [DAYS TO RELEASE] </inputs> <task> Diff the two contracts. List field, type, nullability, and status-code mismatches that will break a launch-critical flow. Rank each gap by whether it is a spec change or a client change. </task> <constraints> Only report mismatches you can justify from the inputs. If something is missing on both sides, list it as a shared gap. Do not propose a rewrite of either stack. Keep the list actionable this week. </constraints> <format> Return a table of gap, broken flow, owner, and suggested fix, then a 6-bullet agenda for the joint review meeting. </format>

💡

Pro tip: Bring the actual TypeScript types or mock JSON, not a screenshot. Screenshots hide nullability and extra fields.

Mock server scenario list

28/30

✨ What it does

Builds a mock-server scenario catalog covering success, empty, validation, auth, and timeout cases.

You are a QA lead who turns an API spec into mock-server scenarios so frontend can keep building when the real service is not ready. <context> I need a scenario list for our mock server that covers happy path, empty, validation failure, auth failure, and one timeout, tied to the spec paths. </context> <inputs> - Paths to mock: [PATH LIST] - Mock tool: [MOCK TOOL] - Personas: [PERSONA LIST] - Data that must look real: [SAMPLE DATA NOTES] - Scenarios we already have: [EXISTING SCENARIOS] </inputs> <task> Write a scenario catalog the mock tool can implement: name, path, method, request that triggers it, response status and body notes, and which persona uses it. </task> <constraints> Do not duplicate scenarios I said we already have. Every path I listed needs at least one success and one failure. Keep bodies consistent with the spec field names. No lorem ipsum if I gave sample data notes. </constraints> <format> Return a table of scenarios, then a suggested default mapping so the mock starts in the happy path unless a header or query switches the case. </format>

💡

Pro tip: Switch scenarios with a request header, not a separate port. Designers and QA will actually toggle a header. They will not remember a second base URL.

Spec-to-ticket breakdown

29/30

✨ What it does

Slices a spec into sequenced backend, frontend, and docs tickets with acceptance checks.

You are an engineering manager who slices an API spec into tickets a sprint team can estimate without rereading the whole YAML file. <context> The OpenAPI draft is ready enough to plan. I need tickets for backend, frontend, and docs, sequenced so mocks land before UI work. </context> <inputs> - Spec summary: [SPEC SUMMARY] - Team size and roles: [TEAM COMPOSITION] - Sprint length: [SPRINT LENGTH] - Dependencies we already know: [DEPENDENCIES] - Definition of done we use: [DEFINITION OF DONE] </inputs> <task> Break the spec into tickets with title, owner role, estimate in days, dependencies, and acceptance checks drawn from the spec. Sequence them for two sprints if needed. </task> <constraints> One ticket should be implementable by one role. Do not hide OpenAPI updates inside a feature ticket. Include at least one ticket for error contract tests. Respect the definition of done I gave. No story points unless I asked for them. </constraints> <format> Return a ticket table sorted by sequence, then a two-sprint board view as two numbered lists. </format>

💡

Pro tip: Put the mock-server ticket first and the happy-path UI ticket second. The rest of the board unblocks once those two exist.

Change request against a live spec

30/30

✨ What it does

Writes a change request for a live endpoint covering breaking impact, rollout order, and rollback.

You are an API change manager who writes a change request so a live spec can evolve without surprising existing clients. <context> Product wants a new required field on create. The endpoint is already in production. I need a change request that states impact, versioning, and the rollout order. </context> <inputs> - Live endpoint: [LIVE ENDPOINT] - Proposed change: [PROPOSED CHANGE] - Current clients: [CLIENT LIST] - Versioning policy: [VERSIONING POLICY] - Desired ship window: [SHIP WINDOW] </inputs> <task> Write a change request: summary, whether it is breaking, the version or additive path to use, client impact, rollout steps, and a rollback note. </task> <constraints> A new required field on a live create is breaking unless you add a default or a new version. Follow the versioning policy I gave. Do not recommend a silent break even if the ship window is short. Name which clients must change first. </constraints> <format> Return a one-page change request with headings for Summary, Breaking or not, Spec edit, Client impact, Rollout, and Rollback. </format>

💡

Pro tip: If you can add the field as optional for one version and required in the next, say so. Most create-field fights disappear with that split.

Free tool

AI Cost Calculator

Estimate what a task or team will cost per month across AI models.

Try it free →

Frequently Asked Questions

Paste the resource name, the user jobs, any paths you cannot break, and the auth model you already promised. A product brief beats a slogan. The more concrete the inputs, the closer the OpenAPI and error contract will be to something engineering can review.
It can produce a first draft with paths, schemas, and examples. Treat that YAML as a proposal. Confirm field names, status codes, and auth with the backend owner before it becomes the source of truth, and keep unknown fields marked as TODO.
Run the versioning decision and the problem-details prompts once, then reuse those outputs as inputs on every new resource. A shared error envelope and a written versioning policy prevent each squad from inventing a new JSON shape or a new /v2 rule.
Renames, type changes, removed fields, new required fields on a live write, and status-code changes that clients already switch on are breaking. Additive optional fields and new endpoints are usually safe. Use the change-request prompt before you edit a live spec.
A product manager for user jobs, a backend owner for storage and auth, and a frontend or SDK owner for field names and error handling. The review and handoff prompts turn that meeting into a gap list and tickets instead of a long debate.

Prompts are the starting line. Tutorials are the finish.

A growing library of 300+ hands-on tutorials on ChatGPT, Claude, Midjourney, and 50+ AI tools. New tutorials added every week.

7-day free trial. Cancel anytime.