api-design

Designs Phoenix-centric REST APIs with resource-based patterns and OpenAPI documentation.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/hwatkins/my-skills --skill api-design-hwatkins
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/hwatkins/my-skills/tree/main/skills/api-design
Command: npx skills add https://github.com/hwatkins/my-skills --skill api-design-hwatkins

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing REST/JSON APIs for Phoenix can be error-prone and hard to scale without consistent patterns. This skill provides a structured approach to resource design, routing, error handling, pagination, authentication, and OpenAPI documentation to keep APIs robust and maintainable.

Core Features & Use Cases

  • Resource-oriented URL design with consistent HTTP methods and naming.
  • Standardized error formats, pagination strategies, authentication patterns, and versioning guidance.
  • Use Case: Create a multi-version Phoenix API with OpenAPI documentation and predictable behavior across endpoints.

Quick Start

Outline your API resources and scaffolding, then implement routing and controllers following REST conventions demonstrated for Phoenix.

Frequently Asked Questions about api-design

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

FAQPage Schema
How do I design REST API routes in Phoenix for consistent resource handling?

REST API routes in Phoenix should use resource-oriented URL design with consistent HTTP methods and naming conventions. This approach enforces best-practice patterns for endpoints, ensuring predictable behavior and maintainable routing across your project.

What is the best way to structure error handling and pagination in a Phoenix REST API?

Error handling and pagination in a Phoenix REST API require standardized error formats and consistent pagination strategies. Implementing these patterns ensures predictable API responses and scalable data retrieval across all versioned endpoints.

How do I add OpenAPI documentation to a versioned Phoenix API?

OpenAPI documentation for a Phoenix API is generated by defining standardized response schemas and versioned routes. This provides clear, machine-readable API contracts that enforce consistent endpoint behavior and secure design patterns.

Does this API design approach work for securing endpoints with authentication in Elixir?

Authentication in Elixir REST APIs is handled by applying secure API design patterns and standardized response schemas. This ensures robust access control across versioned Phoenix routes and predictable error handling for unauthorized requests.

Why do my Phoenix API endpoints return inconsistent response schemas and errors?

Inconsistent API responses often result from lacking standardized error formats and resource-based URL design. Enforcing consistent HTTP methods, naming conventions, and pagination patterns resolves these scaling issues across Phoenix projects.