Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Api Design?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/karthikrshet-api-design)
---
name: api-design
description: "Design REST APIs: resources, naming, status codes, pagination, filtering, error format, idempotency keys and versioning."
tags: [api, backend, architecture]
---
# Api Design
## When to use
- New endpoints or public APIs
## Procedure
1. Model resources as nouns
2. Use standard status codes
3. Define a single error shape (RFC 9457 problem+json)
4. Cursor pagination for large lists
5. Idempotency-Key header for unsafe retries
6. Document with OpenAPI
## Example
```json
{ "type": "https://api.example.com/errors/insufficient-funds", "title": "Insufficient funds",
"status": 422, "detail": "Balance 1200 is less than 5000", "instance": "/payouts/po_123" }
```
## Checklist
- [ ] Consistent naming
- [ ] Breaking changes versioned
- [ ] Auth scopes documented
## Anti-patterns
- Verbs in URLs
- 200 with error bodies
- Offset pagination on huge tables