api-design
SolidDesign or review REST/GraphQL APIs when endpoints or contracts change.
AI & Automation 113 stars
26 forks Updated 1 months ago MIT
Install
Quality Score: 83/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
<!-- This is a SCAFFOLD skill -->
# API Design
## When to Apply
- **Classification**: feature, architecture-change, hotfix (if touching API endpoints)
- **Phase**: /implement (design & build), /review (compliance check), /test (contract verification)
- **Trigger**: Task involves creating, modifying, or deprecating API endpoints
## Conventions
> **Customize after /app-init**: Replace these generic conventions with your project's ADR decisions.
### Endpoint Naming
- Use nouns for resources, not verbs: `GET /users` not `GET /getUsers`
- Plural resource names: `/users`, `/orders`, `/products`
- Nested resources for relationships: `/users/:id/orders`
- Use kebab-case for multi-word paths: `/order-items`
### HTTP Methods
| Action | Method | Success Status | Idempotent |
|---|---|---|---|
| List | GET | 200 | Yes |
| Get one | GET | 200 | Yes |
| Create | POST | 201 | No |
| Full update | PUT | 200 | Yes |
| Partial update | PATCH | 200 | No |
| Delete | DELETE | 204 | Yes |
### Error Response Format
```json
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Email is required",
"details": {
"field": "email",
"constraint": "required"
}
}
}
```
### Standard Error Codes
| HTTP Status | When | Error Code Pattern |
|---|---|---|
| 400 | Invalid input | VALIDATION_ERROR, INVALID_FORMAT |
| 401 | Not authenticated | UNAUTHORIZED |
| 403 | Not permitted | FORBIDDEN |
| 404 | Resource not found | NOT_FOUND |
| 409 | Conflict (duplicate) | CONFLICT, ...
Details
- Author
- KbWen
- Repository
- KbWen/agentic-os
- Created
- 5 months ago
- Last Updated
- 1 months ago
- Language
- Python
- License
- MIT
Integrates with
Related Skills
AI & Automation Featured
code-simplifier
Review RTK Rust code for idiomatic simplification. Detects over-engineering, unnecessary allocations, verbose patterns. Applies Rust idioms without changing behavior.
79,919 Updated today
rtk-ai AI & Automation Featured
design-patterns
Rust design patterns for RTK. Newtype, Builder, RAII, Trait Objects, State Machine. Applied to CLI filter modules. Use when designing new modules or refactoring existing ones.
79,919 Updated today
rtk-ai AI & Automation Featured
issue-triage
Issue triage: audit open issues, categorize, detect duplicates, cross-ref PRs, risk assessment, post comments. Args: "all" for deep analysis of all, issue numbers to focus (e.g. "42 57"), "en"/"fr" for language, no arg = audit only in French.
79,919 Updated today
rtk-ai