Skip to content
Back to skills

Api Design

ASecurity

Define a consumer-facing API contract with consistent behavior. Triggers on "design API", "接口设计".

  • 3 stars
  • 0 votes
  • 0 copies
  • 10 views
  • Added September 4, 2026
developmentrusttestingapi

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned December 6, 2026

npx -y skills add int2t05/engineering-skills --skill api-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Design?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Design
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/int2t05-api-design/badge)](https://www.skillsdirectory.com/skills/int2t05-api-design)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-design
description: Define a consumer-facing API contract with consistent behavior. Triggers on "design API", "接口设计".
---

# API and Interface Design

## When to use

- Define a consumer-facing API contract with consistent behavior.

**Not for:** api-testing for contract verification.

## Steps

1. Identify consumers, protocol, operations and trust boundaries; follow project contract tooling.

2. Specify requests, responses, authentication, authorization, validation and errors. For HTTP, verify method and status semantics against [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html). Use the project’s supported [OpenAPI](https://spec.openapis.org/oas/latest.html) version and error format, including [Problem Details](https://www.rfc-editor.org/rfc/rfc9457.html) where adopted.

3. Define pagination, concurrency, idempotency and evolution only where needed; include normal and failure examples.

4. Update the authoritative schema or approved contract document; validate schemas and consumer examples before human review.

**Output:** Suggested paths, subject to [human audit](../../../references/human-audit.md): `docs/API/*.md` or the authoritative machine-readable contract.

## Verify

- Examples match the schema; authorization, errors and repeat-request behavior are testable.

## References

- [engineering-principles.md](../../../references/engineering-principles.md) — shared decision boundaries, scope and verification.
- [human-audit.md](../../../references/human-audit.md) — document consent, readability and human review.
- [references/versioning-strategy.md](references/versioning-strategy.md) — when breaking change is unavoidable: URI/header versioning, Deprecation and Sunset response headers, dual-version coexistence, sunset timeline
- [references/openapi-lifecycle.md](references/openapi-lifecycle.md) — design-first vs code-first, Spectral/Redocly linting, openapi-generator SDK generation, spec versioning, CI pipeline

Files in this skill

  • SKILL.md6.7 KB
  • agents/openai.yaml147 B
  • references/openapi-lifecycle.md6.6 KB
  • references/versioning-strategy.md6.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.