api-spec
Use when the user wants to design, review, or document an API (REST, OpenAPI, versioning, error models, contract testing, authentication), or when generating/maintaining OpenAPI specs as machine-readable context for AI agents.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- api-spec
- triggers
- [ "user", "model" ]
- description
- Use when the user wants to design, review, or document an API (REST, OpenAPI, versioning, error models, contract testing, authentication), or when generating/maintaining OpenAPI specs as machine-readable context for AI agents.
03 SKILL.md 正文
API Spec
Design and review HTTP/gRPC/GraphQL APIs, and keep the contract explicit, versioned, and machine-readable (OpenAPI). The spec is the primary context for agents — they work from the spec, not from implementation memory.
Design protocol
- Collect constraints — consumers, auth, rate limits, error handling, versioning.
- Choose style — REST, gRPC, GraphQL, or hybrid per use case.
- Design endpoints — nouns as resources, consistent paths, status codes, error model.
- Specify input/output/behavior — every endpoint declares input schema, output schema, observable behavior. A spec lacking I/O is incomplete.
- Write the contract — OpenAPI spec (or proto), validated with tools.
- Add tests — contract, serialization, happy/unhappy paths.
- Document + sync — spec stays in version control, in sync with code.
What a spec must include
- Endpoints — paths, methods, parameters, request/response schemas.
- Authentication — type, headers, token format.
- Error responses — status codes, error schemas, retry semantics.
- Versioning — version, deprecation policy, migration path.
- Rate limits — rps, burst, backoff strategy.
Process
Design/review API → generate/update OpenAPI → validate against impl →
use spec as agent context → keep in VCS
Anti-patterns
- No spec, or an outdated one.
- Spec in prose instead of OpenAPI.
- Spec not versioned / not in version control.
- Agents reading implementation code instead of the spec.
Output rule
Deliver a spec file, examples, and a test command. Validate with
swagger-codegen or equivalent when available.
04 同仓库更多 Skills
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.
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.
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.
demo
Use when demonstrating a skill in a fixture project.
duplicate-skill
Use when testing duplicate skill name detection.
duplicate-skill
Use when testing duplicate skill name detection.