api-design

Design REST API contracts for PHP backends with resource-oriented URLs and HTTP semantics.

1|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/vix-4800/Workstation --skill api-design-vix-4800
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/vix-4800/Workstation/tree/main/roles/ai-tools/files/agents/skills/api-design
Command: npx skills add https://github.com/vix-4800/Workstation --skill api-design-vix-4800

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing and maintaining REST APIs for PHP backends is error-prone without a clear contract, consistent naming, and predictable error handling.

Core Features & Use Cases

  • Resource-oriented URL design with semantic HTTP status codes.
  • Validation boundaries, pagination, filtering, versioning, and error envelope consistency.
  • Use cases include designing new endpoints, reviewing existing contracts, and planning idempotent operations.

Quick Start

Draft an API contract for a new resource using RESTful endpoints and stable error formats.

Frequently Asked Questions about api-design

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

FAQPage Schema
How do I design stable REST API contracts for a PHP backend?

Design stable REST API contracts by codifying resource-oriented URLs, proper HTTP semantics, and consistent error envelopes for PHP backends. This ensures predictable response shapes and secure input validation boundaries when drafting new endpoints.

What is the best way to handle pagination and filtering in REST APIs?

Handle REST API pagination and filtering by planning these operations during contract design. Codify rules for input validation boundaries and response shapes to ensure filtering logic remains stable and predictable across resource-oriented endpoints.

How do I structure error responses for consistent HTTP API handling?

Structure consistent HTTP API error responses by enforcing a stable error envelope format. Apply proper HTTP semantics to map errors to correct status codes, ensuring clients receive predictable error shapes across all endpoints.

Can I use this approach to plan idempotent operations and API versioning?

Yes, you can plan idempotent operations and API versioning by codifying these rules within the API contract. Establish stable versioning strategies and idempotency boundaries to ensure backward compatibility and safe retries for PHP backends.

Does REST API contract design enforce security at the HTTP boundary?

Yes, REST API contract design enforces security at the HTTP boundary by defining strict input validation boundaries and proper HTTP semantics. This prevents invalid data from entering the PHP backend and secures resource-oriented endpoints.