api-design

Generates detailed API design documents with interface contracts, key code, and error codes.

2|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/HACK-WU/skills --skill api-design-hack-wu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/HACK-WU/skills/tree/main/skills/api-design
Command: npx skills add https://github.com/HACK-WU/skills --skill api-design-hack-wu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Design documents often contain only demo-level API sketches that lack complete contracts, error handling, and realistic examples, leaving developers without an implementable specification. This Skill upgrades those sketches into full API design documents with interface contracts, key code designs, and unified error code definitions. ## Core Features & Use Cases - Interface Contract Design: Defines complete contracts for each endpoint including method, path, authentication, permissions, request parameters, and success/error responses. - Key Code Design: Designs only behavior-critical code such as parameter validation, state transitions, core algorithms, and permission checks, skipping boilerplate. - Unified Error Code System: Produces a consistent error response format and categorized error code list across all endpoints. - Use Case: After finishing a technical design document with design-craft, run this Skill to produce an INDEX.md plus per-module API documents (e.g., users.md, orders.md) ready to hand to the development team. ## Quick Start Ask the AI to design the API for the current feature based on the existing requirement and design documents, then confirm each stage as it progresses.

Frequently Asked Questions about api-design

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

FAQPage Schema
How do I turn a design document into a full API specification?

Provide the requirement and design documents as input, and the Skill extracts demo interfaces, confirms an interface list, then designs complete contracts, key code, and error codes stage by stage. Output is written as an INDEX.md plus per-module Markdown files.

What does an API design document need to include before development?

Each endpoint needs method, path, authentication, permissions, path/query/body parameters, success and error responses, and realistic request/response examples. The Skill also adds key code designs for validation, state transitions, and permission checks.

Does this Skill write the full API implementation code?

No. It only designs behavior-critical code such as parameter validation, state transitions, core algorithms, and permission checks. Standard CRUD, framework configuration, and logging are explicitly left to developers.

Can I use the demo interfaces from my design doc directly?

No, demo interfaces are minimal sketches for illustrating design intent and may be incomplete or mismatched. The Skill requires independently redesigning each interface based on actual data structures, business scenarios, and constraints.

Where are the generated API design documents stored?

If a .requirements/config file defines a storage_path, documents go to {storage_path}/{feature}/api/ with an INDEX.md and one file per module. Otherwise the Skill asks and suggests .requirements/{feature}/api/ as the default.