AGENT SKILL

api-design

Use when the user wants to design, review, or document an API. Covers REST, OpenAPI, versioning, error models, contract testing, and authentication.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 0
Forks
1

01 前言 Front Matter

name
api-design
triggers
[ "user", "model" ]
description
Use when the user wants to design, review, or document an API. Covers REST, OpenAPI, versioning, error models, contract testing, and authentication.

03 SKILL.md 正文

API Design

Design and review HTTP/gRPC/GraphQL APIs with contracts and tests.

When to use

  • New endpoint or service is needed.
  • Reviewing an existing API for consistency.
  • Generating or updating OpenAPI specs.
  • Adding contract tests.

Core protocol

  1. Collect constraints. Consumers, auth, rate limits, error handling, versioning.
  2. Choose style. REST, gRPC, GraphQL, or hybrid based on use case.
  3. Design endpoints. Nouns as resources, consistent paths, status codes, error model.
  4. Specify input/output/behavior. Every endpoint or operation must declare its input schema, output schema, and observable behavior. A spec that lacks input/output is incomplete.
  5. Write the contract. Produce an OpenAPI spec (or proto file) and validate it with tools. The spec is the primary context for the agent; keep it in sync with the code.
  6. Add tests. Contract, serialization, and happy/unhappy paths.
  7. Document. Keep spec and docs in sync.

Output rule

  • Deliver a spec file, examples, and a test command.
  • Verify spec is valid with swagger-codegen or similar if available.
  • Include the OpenAPI spec (or equivalent) as context for implementation; the agent works from the spec, not from memory.

04 同仓库更多 Skills

Leostruka
Leostruka/devin-bundle

montador-de-ideias

Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening/optimization, and high-impact contact surfaces.

★ 0
Leostruka
Leostruka/devin-bundle

git-github-adaptive-engineering

Use when any task touches git history, GitHub issues/PRs/releases/CI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit/PR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug/finish skills.

★ 0
Leostruka
Leostruka/devin-bundle

adaptive-agenda-calendar-routine-engine

Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions/gcal/wrapper.py.

★ 0
Leostruka
Leostruka/devin-bundle

demo

Use when demonstrating a skill in a fixture project.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0