This skill should be used when the user asks to "build an API", "create a new endpoint", "add API functionality", or is about to start API development work. Enforces a spec-first discipline for API development to ensure quality and traceability.
API development must follow the process below. No step may be skipped. This discipline ensures every API endpoint has a complete spec, tests, and documentation.
Before writing any code, draft a complete API specification in doc/api-spec.md (or the project's designated spec file):
Spec format example:
### POST /api/resources
Create a resource.
**Request**
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| name | string | Y | Resource name |
**Response** `200`
{ "id": 1 }
**Error**
| Status Code | Message |
|-------------|---------|
| 400 | Missing required field |
Present the spec to the user for review. Explicitly ask:
Do not proceed to implementation without confirmation.
Develop according to the confirmed spec:
Write integration tests for each endpoint:
All tests must pass before proceeding to the next step.
Update or create a Postman Collection JSON:
Update or create an OpenAPI YAML:
After completing each API, confirm the following:
dev-log skill)The following behaviors violate this discipline and must be avoided:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer