patterns-api-contracts

Design RESTful API contracts and generate OpenAPI 3.x specifications with error schemas.

35|2|Updated Dec 31, 2025
One-click install
npx skills add https://github.com/deepeshBodh/human-in-loop --skill patterns-api-contracts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: patterns-api-contracts
Source: https://github.com/deepeshBodh/human-in-loop/tree/main/plugins/humaninloop/skills/patterns-api-contracts
Command: npx skills add https://github.com/deepeshBodh/human-in-loop --skill patterns-api-contracts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Translating complex product requirements into stable, well-defined API contracts is error-prone and time-consuming. This skill ensures every action maps to a clear set of endpoints, schemas, and error handling, reducing miscommunication between product, engineering, and QA.

Core Features & Use Cases

  • Endpoint mapping: automatically map user actions to RESTful endpoints with consistent path patterns.
  • Schema definitions: generate request/response schemas, sample payloads, and validation rules for each endpoint.
  • Error handling patterns: define standard HTTP status codes and machine-readable error payloads aligned with organizational conventions.
  • Use Case: design a new feature's API surface from user stories and acceptance criteria, then generate an OpenAPI snippet ready for review.

Quick Start

Generate an OpenAPI contract mapping user actions to endpoints with schemas and error handling.

Frequently Asked Questions about patterns-api-contracts

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

FAQPage Schema
How do I design an OpenAPI contract from user stories and acceptance criteria?

To design an OpenAPI contract from user stories, map user actions to RESTful endpoints, generate request and response schemas, and define standardized error handling patterns. This ensures consistent API paths and validation rules aligned with product requirements.

How do I map user actions to RESTful API endpoints with consistent path patterns?

Mapping user actions to RESTful API endpoints requires translating product requirements into clear resource paths and HTTP methods. This ensures every action maps to a consistent endpoint structure, reducing miscommunication between product, engineering, and QA teams.

What is the best way to define standard HTTP status codes and machine-readable error payloads for an API?

The best way to define standard HTTP status codes and error payloads is to establish error handling patterns aligned with organizational conventions. This approach creates machine-readable error schemas that ensure consistent API behavior across all endpoints.

Can I generate OpenAPI specifications for existing brownfield projects or only new greenfield APIs?

You can generate OpenAPI specifications for both brownfield and greenfield projects. The process enforces OpenAPI 3.x structure, security definitions, and schema conventions regardless of whether you are updating existing APIs or creating new ones from scratch.

Does this approach enforce OpenAPI 3.x structure and security definitions for API schemas?

Yes, this approach enforces OpenAPI 3.x structure and security definitions. It standardizes parameter and schema conventions, ensuring that generated API contracts include robust security definitions and consistent parameter validation across all endpoints.

When do I need to generate request and response schemas with validation rules for my API?

You need to generate request and response schemas with validation rules when translating complex product requirements into stable API contracts. This step defines sample payloads and validation constraints, reducing errors and miscommunication between engineering and QA.