api-contract-design

Generate API contracts, DTOs, and OpenAPI YAML from domain models.

1|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/YuluoY/nimis --skill api-contract-design-yuluoy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-contract-design
Source: https://github.com/YuluoY/nimis/tree/main/skills-en/api-contract-design
Command: npx skills add https://github.com/YuluoY/nimis --skill api-contract-design-yuluoy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Transforms domain models and requirement documents into concrete, standardized API interface contracts so engineering teams can implement consistent endpoints, DTOs, and error handling without design ambiguity.

Core Features & Use Cases

  • Endpoint & Resource Design: Extract resources from domain models and map CRUD and non-CRUD actions to RESTful or GraphQL endpoints with naming and idempotency rules.
  • DTO & Contract Scaffolding: Produce request/response DTO structures, pagination and list patterns, and TypeScript/Java interface examples organized by module.
  • Spec & Validation Artifacts: Generate OpenAPI YAML, error code catalogs, versioning strategy, mermaid design diagrams, and contract test case checklists for consumer-provider verification.
  • Use Case: Ideal for backend teams designing new services, refactoring public APIs, or producing importable OpenAPI specs for API gateways and documentation.

Quick Start

Use the api-contract-design skill to generate an OpenAPI YAML, DTO definitions, and an endpoint table from the provided domain model and requirements.

Frequently Asked Questions about api-contract-design

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

FAQPage Schema
How do I generate OpenAPI YAML from domain models and requirement documents?

Generate OpenAPI YAML by transforming domain models and requirements into standardized API contracts. This process produces endpoint lists, request/response DTOs, and module-organized OpenAPI specifications with mermaid diagrams and design checklists.

How do I design RESTful and GraphQL endpoints from domain models?

Design RESTful and GraphQL endpoints by extracting resources from domain models and mapping CRUD actions to endpoints. This applies naming and idempotency rules to produce a structured endpoint table for backend engineering tasks.

What is the best way to standardize API error codes and DTO specifications?

Standardize API error codes and DTO specifications by generating a unified error code catalog and TypeScript or Java interface examples. This ensures consistent error handling and request/response structures across engineering teams.

Can I use this API contract design process for API refactoring and versioning?

API contract design supports API refactoring and versioning by generating versioning strategies and contract test case checklists. It transforms existing models into updated interface contracts to eliminate design ambiguity during public API overhauls.

Does API contract generation produce artifacts for API gateways and documentation?

API contract generation produces importable OpenAPI YAML specs specifically for API gateways and documentation. It scaffolds DTO structures, pagination patterns, and validation artifacts for consumer-provider verification.

Why do I need an API contract for backend service design?

An API contract resolves design ambiguity by transforming domain models into concrete, standardized interface specifications. Engineering teams use these contracts to implement consistent endpoints, DTOs, and error handling without misalignment.