Doncheli api contract

From doncheli/don-cheli-sdd · View interactive version

Doncheli api contract is an AI agent skill from the GitHub repository doncheli/don-cheli-sdd. Design complete API contracts covering endpoints, auth, rate limiting, error handling, retries, circuit breaker and idempotency. Activate when user mentions "api contract", "api design", "endpoint", "webhook", "REST", "GraphQL", "OpenAPI", "design the API".

How to use this skill

Skill file

Don Cheli: API Contract Designer

Instructions

  1. Identify the API style: REST, GraphQL, gRPC, Webhook, or mixed
  2. For each resource/operation, define:
  1. Design cross-cutting concerns:
  1. Define versioning strategy (URL path, header, or content negotiation)
  2. Flag breaking vs. non-breaking changes policy

Output Format

## API Contract: <service/feature name>

### Style & Version
- Protocol: REST / GraphQL / gRPC / Webhook
- Base URL: …
- Version: v1 (strategy: <path/header/content-negotiation>)

### Endpoints / Operations

#### <METHOD> <path>
**Purpose:** …
**Auth required:** yes/no — scope: …
**Request:**

{

"field": "type — description"

}

**Response 200:**

{ … }

**Error responses:**
| Status | Code          | Meaning              |
|--------|---------------|----------------------|
| 400    | INVALID_INPUT | …                    |
| 409    | CONFLICT      | …                    |

**Idempotency:** required / not required — key: <header name>

---

### Cross-Cutting Concerns

**Auth:** …
**Rate Limiting:** X req/min per API key; headers: X-RateLimit-Remaining, X-RateLimit-Reset
**Retry Policy:** safe methods (GET, PUT, DELETE) — exponential backoff, max 3 attempts
**Circuit Breaker:** open at 50% error rate over 10s window; half-open probe after 30s
**Error Envelope:**

{ "error": { "code": "…", "message": "…", "trace_id": "…" } }


### Breaking Change Policy
- Breaking: removing fields, changing types, removing endpoints → requires major version bump
- Non-breaking: adding optional fields, new endpoints → compatible within same version

Quality Gate

Do not use this skill when

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.