api-design

Solid

Design or review REST/GraphQL APIs when endpoints or contracts change.

AI & Automation 113 stars 26 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
68
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

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