Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Designs, reviews, and evolves REST, GraphQL, RPC, event, and webhook API contracts for consistency, security, and compatibility.
77% 95%+18 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 17 of 22 without it.
This test ran on v1. v3 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
Design predictable, secure, and backward-compatible API contracts.
Before adding or changing an endpoint, identify consumers (SSR, browser client, mobile, webhook), auth boundaries, idempotency requirements, payload limits, and compatibility obligations.
/api/items, /api/items/{id}), HTTP methods for actions (GET, POST, PUT, PATCH, DELETE), and avoid verb endpoints (/api/createItem).200 OK (read/update), 201 Created (create), 204 No Content (delete)400 Bad Request (malformed JSON/query), 401 Unauthorized (unauthenticated), 403 Forbidden (unauthorized), 404 Not Found, 409 Conflict, 422 Unprocessable Entity (validation), 429 Too Many Requests500 Internal Server Error (never leak stack traces or DB internals)export interface ApiErrorResponse {
error: string; // e.g. "VALIDATION_ERROR"
message: string; // User-safe localized message
details?: Record<string, unknown>;
}
limit cap), support cursor or explicit offset pagination (items, hasNext, nextCursor), and return deterministic sort order.export async function POST(request: Request) {
const session = await requireAuth(request); // 1. Authenticate & authorize
const body = schema.parse(await request.json()); // 2. Validate & narrow input
const result = await domainService.create(session.uid, body); // 3. Delegate to service
return NextResponse.json(result, { status: 201 }); // 4. Return minimal safe DTO
}
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.