ワンクリックで
api-design
Design APIs that developers love to use.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Design APIs that developers love to use.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create and maintain ASCII visual dashboards for project tracking with parallel lane progress bars
Store and manage voice samples for TTS cloning — portable, version-controlled audio references
Clear documentation through visual excellence
AI music generation via Replicate — 5 models for background tracks, lyrics, and sound design
Practitioner methodology for longitudinal case study research, evidence-based documentation, and publication-ready academic writing in AI-assisted development.
First impressions matter. Set projects up for success.
| name | api-design |
| description | Design APIs that developers love to use. |
| tier | standard |
| applyTo | **/*api*,**/*rest*,**/*endpoint*,**/*route*,**/*schema* |
Design APIs that developers love to use.
A good API is intuitive, consistent, and hard to misuse. Design for the consumer, not the implementation.
| Good | Bad | Why |
|---|---|---|
/users | /getUsers | Nouns, not verbs |
/users/123 | /user?id=123 | Path params for identity |
/users/123/orders | /getUserOrders | Hierarchical resources |
/search?q=term | /search/term | Query params for filters |
| Method | Purpose | Idempotent | Safe |
|---|---|---|---|
| GET | Read resource | Yes | Yes |
| POST | Create resource | No | No |
| PUT | Replace resource | Yes | No |
| PATCH | Partial update | No* | No |
| DELETE | Remove resource | Yes | No |
| Code | Meaning | When to Use |
|---|---|---|
| 200 | OK | Successful GET, PUT, PATCH |
| 201 | Created | Successful POST |
| 204 | No Content | Successful DELETE |
| 400 | Bad Request | Validation error |
| 401 | Unauthorized | Missing authentication |
| 403 | Forbidden | Authenticated but not allowed |
| 404 | Not Found | Resource doesn't exist |
| 409 | Conflict | State conflict (duplicate) |
| 429 | Too Many Requests | Rate limited |
| 500 | Internal Error | Server bug |
openapi: 3.0.3
info:
title: My API
version: 1.0.0
paths:
/users:
get:
summary: List users
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/UserList'
| Strategy | Example | Recommendation |
|---|---|---|
| URL Path | /v1/users | Preferred - explicit |
| Header | Accept: vnd.api.v1+json | Clean but hidden |
| Query | /users?version=1 | Avoid |
GET /users?offset=40&limit=20
{ "data": [...], "pagination": { "total": 150 } }
GET /users?cursor=abc123&limit=20
{ "data": [...], "next_cursor": "def456" }
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": [{ "field": "email", "message": "Invalid format" }],
"request_id": "req_abc123"
}
}
Principles:
| Header | Purpose |
|---|---|
Cache-Control | Caching directives |
ETag | Content fingerprint |
Vary | Cache key factors |
Cache-Control: public, max-age=3600
Cache-Control: private, max-age=300
Cache-Control: no-store
GET /users/123
-> 200 OK, ETag: "v1-abc123"
GET /users/123, If-None-Match: "v1-abc123"
-> 304 Not Modified (or 200 with new ETag)
| Algorithm | Description |
|---|---|
| Fixed Window | X requests per minute |
| Token Bucket | Burst-friendly with refill |
| Sliding Window | Rolling time window |
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1706792400
# When exceeded
429 Too Many Requests
Retry-After: 30
| Tier | Limit | Use Case |
|---|---|---|
| Anonymous | 60/hour | Public exploration |
| Authenticated | 1000/hour | Normal usage |
| Premium | 10000/hour | Power users |
2026-02-01T14:30:00Z{ "data": ..., "meta": ... }GET /users/123?fields=id,name,email
/getUser)