code-design-api

Plan API contracts and schemas for REST, GraphQL, or RPC endpoints.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/sirn/dotfiles --skill code-design-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-design-api
Source: https://github.com/sirn/dotfiles/tree/main/var/agents/skills/code-design-api
Command: npx skills add https://github.com/sirn/dotfiles --skill code-design-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Aligning product goals with implementable API contracts to prevent scope drift and rework by documenting endpoints, data schemas, and versioning rules before coding starts.

Core Features & Use Cases

  • API resource design: Define endpoints, resources, and data shapes for REST, GraphQL, gRPC, or TRPC.
  • Schema generation: Produce OpenAPI/Swagger documents, Protocol Buffers, or TypeBox schemas to codify interfaces.
  • Use Case: When starting a service, generate a complete API contract including endpoints, request/response models, and error formats to guide implementation.

Quick Start

Provide a complete API design specification for the selected protocol (REST, GraphQL, or gRPC) including endpoints, schemas, and sample payloads.

Frequently Asked Questions about code-design-api

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

FAQPage Schema
How do I design an API contract before coding to prevent scope drift?

To design an API contract before coding, you define endpoints, data schemas, and versioning rules to align product goals with implementable interfaces. This prevents scope drift by documenting resources and error formats prior to implementation.

Can I generate OpenAPI and Protocol Buffers schemas for REST and gRPC endpoints?

Yes, you can generate OpenAPI documents for REST endpoints and Protocol Buffers for gRPC. This schema generation codifies interfaces by producing complete specifications including request and response models for the selected protocol.

What is the best way to document API versioning and error handling rules?

The best way to document API versioning and error handling is to codify them within interface schemas like OpenAPI or Protocol Buffers. Generating complete API contracts ensures design rationale for versioning and error formats is recorded before implementation.

Does this approach to API design work for GraphQL and TRPC as well as REST?

Yes, API design applies to GraphQL, TRPC, REST, and gRPC endpoints. You can define resources and data shapes across these protocols, generating type schemas and specifications to codify the interfaces consistently.

What should be included in a complete API design specification for a new service?

A complete API design specification should include endpoints, request and response schemas, sample payloads, and design rationale for versioning and error handling. This guides implementation by codifying the entire interface contract.