moai-ref-api-patterns

Designs REST/GraphQL API patterns, error handling, and input validation for backend services.

4|4|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/modu-ai/moai-studio --skill moai-ref-api-patterns-modu-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-ref-api-patterns
Source: https://github.com/modu-ai/moai-studio/tree/main/.claude/skills/moai-ref-api-patterns
Command: npx skills add https://github.com/modu-ai/moai-studio --skill moai-ref-api-patterns-modu-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines the design and review of REST and GraphQL API patterns, error handling conventions, and input validation for backend services. This reference helps teams align on consistent API practices and accelerate implementation.

Core Features & Use Cases

  • REST/GraphQL pattern catalog for resource naming, versioning, pagination, and error formats.
  • Error handling conventions including structured JSON errors, codes, and response schemas to improve client reliability.
  • Input validation and security guidelines ensuring safe data handling and robust validation strategies across APIs.
  • Use Cases include API scaffolding, endpoint design reviews, and enforcing production-grade patterns during implementation.

Quick Start

Examine an API design proposal and apply standardized REST/GraphQL conventions to the first endpoint you implement.

Frequently Asked Questions about moai-ref-api-patterns

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

FAQPage Schema
What are the best REST API patterns for resource naming and pagination?

Standard REST API patterns apply consistent conventions for resource naming, versioning, pagination, and HTTP status codes across endpoints. This reference provides structured guidelines to align teams and accelerate backend service implementation.

How do I design structured error handling conventions for backend APIs?

Design error handling conventions using structured JSON errors, specific codes, and standardized response schemas. This approach improves client reliability by ensuring clear, consistent error responses across all REST and GraphQL API endpoints.

Can I use this reference for both REST and GraphQL endpoint design reviews?

Yes, this reference supports both REST and GraphQL API design. You can use it to audit endpoint design proposals, enforce production-grade patterns, and apply standardized conventions during implementation reviews for either protocol.

How do I enforce input validation and secure defaults in API services?

Enforce input validation and secure defaults by applying specific guidelines for safe data handling. This ensures robust validation strategies are implemented across APIs, protecting backend services from invalid or malicious inputs.

What is the best way to scaffold a new backend API with consistent conventions?

The best way to scaffold a new backend API is to examine your design proposal and apply standardized REST or GraphQL conventions to the first endpoint. This ensures consistent resource naming, versioning, and error formats from the start.