api-design

Design REST/JSON API endpoints with versioning, validation, and consistent error shapes.

Updated May 17, 2026
One-click install
npx skills add https://github.com/cheetah-alo/NegritaOS --skill api-design-cheetah-alo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/cheetah-alo/NegritaOS/tree/main/.codex/skills/api-design
Command: npx skills add https://github.com/cheetah-alo/NegritaOS --skill api-design-cheetah-alo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you create API contracts that stay consistent over time while reducing integration errors from mismatched schemas, pagination behavior, and error handling.

Core Features & Use Cases

  • Versioning & Backward Compatibility: Enforces versioning on paths or headers and prevents breaking changes without a version bump.
  • Input Validation & Sanitization: Requires validating and sanitizing inputs to reduce faulty or unsafe requests.
  • Consistent Error Shapes: Standardizes error responses so clients can reliably parse failures.
  • Pagination & Filtering Standards: Uses explicit paging parameters and stable sorting keys for predictable results.
  • Contract-First Documentation: Promotes OpenAPI/JSON schema contracts with examples for critical endpoints.

Quick Start

Trigger API contract creation by asking the AI to design a versioned REST/JSON endpoint with validated inputs, consistent error responses, and OpenAPI/JSON schema documentation.

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 pagination?

To design a REST API with consistent error handling and pagination, enforce standardized error response shapes and use explicit paging parameters with stable sorting keys. This ensures clients can reliably parse failures and receive predictable result sets.

What is the best way to prevent breaking changes in REST API versioning?

The best way to prevent breaking changes in REST API versioning is to enforce versioning on paths or headers. This practice ensures backward compatibility by requiring a version bump before any structural modifications are introduced to the endpoint contracts.

How does contract-first API documentation work with OpenAPI and JSON Schema?

Contract-first API documentation with OpenAPI and JSON Schema works by defining endpoint schemas, inputs, and expected behaviors before implementation. This reduces client integration failures by ensuring the documented contract matches the actual API behavior exactly.

Do I need input validation and sanitization for REST API endpoints?

Yes, you need input validation and sanitization for REST API endpoints to reduce faulty or unsafe requests. Requiring these steps ensures that invalid data is rejected before processing, maintaining endpoint security and structural integrity.

What are the limitations of using header-based REST API versioning?

While the metadata enforces versioning to prevent breaking changes, header-based REST API versioning can limit discoverability compared to path-based versioning. Both approaches require strict documentation to ensure clients correctly route requests to the intended endpoint versions.

When do I need explicit pagination parameters in JSON API responses?

You need explicit pagination parameters in JSON API responses whenever returning large datasets. Using deterministic paging parameters and stable sorting keys guarantees predictable results across different pages, preventing data duplication or omission during client integration.