api-design

Design and validate REST APIs with consistent WrongStack conventions.

224|27|Updated May 12, 2026
One-click install
npx skills add https://github.com/WrongStack/WrongStack --skill api-design-wrongstack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/WrongStack/WrongStack/tree/main/packages/core/skills/api-design
Command: npx skills add https://github.com/WrongStack/WrongStack --skill api-design-wrongstack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

REST API design and reviews for WrongStack, ensuring consistency, correctness, and scalable conventions across services.

Core Features & Use Cases

  • Conventional HTTP status codes: 200, 201, 400, 401, 403, 404, 500.
  • Uniform error shapes and resource naming: use plural nouns and predictable error bodies.
  • Pagination and validation: cursor-based pagination; server-side validation with clear field errors.
  • Versioning and security best practices: prefix breaking changes with version paths and avoid credentials in URLs.

Quick Start

Draft or review a REST API plan for a new resource applying the standard status codes, error shapes, and pagination rules.

Frequently Asked Questions about api-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a REST API with consistent error handling and standard HTTP status codes?

Design a REST API with consistent error handling by enforcing conventional HTTP status codes (200, 201, 400, 401, 403, 404, 500) alongside uniform error shapes. This ensures predictable error bodies and correct response semantics across all service endpoints.

What is cursor-based pagination and how do I apply it to REST API resources?

Cursor-based pagination is a REST API navigation method using a pointer to fetch subsequent result sets rather than offsets. Apply it to resource collections to ensure consistent performance and stable data retrieval during real-time inserts.

What's the best way to version REST APIs and handle breaking changes?

The best way to version REST APIs and handle breaking changes is prefixing routes with version paths. This practice isolates breaking changes from existing clients, preserving backward compatibility while rolling out new resource contracts.

How do I implement server-side validation with clear field errors in a REST API?

Implement server-side validation in a REST API by enforcing data constraints on the server and returning uniform error shapes containing clear field errors. This provides clients with specific validation feedback for invalid request payloads.

Can I use this to audit existing REST API contracts and refactor endpoints?

Yes, you can audit existing REST API contracts and refactor endpoints by checking them against established conventions. This process reviews resource naming, pagination rules, and security practices to ensure service-wide consistency.

Why should REST API resource naming use plural nouns?

REST API resource naming should use plural nouns to maintain uniform shapes and standardize endpoint paths. This convention aligns with collection-level routing, ensuring predictable interactions across all services.