api-design — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited api-design (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
REST API conventions: URL structure, HTTP methods, status codes, pagination, filtering, error responses, and versioning.
/users, /orders, /products/order-items, not /orderItems# Good
GET /api/v1/users
GET /api/v1/users/123
GET /api/v1/users/123/orders
POST /api/v1/users
PATCH /api/v1/users/123
DELETE /api/v1/users/123
# Bad
GET /api/v1/getUsers
GET /api/v1/user/123
POST /api/v1/users/123/orders/456/items/789/notes # too deeply nested| Method | Purpose | Idempotent | Request Body | Success Code |
|---|---|---|---|---|
| GET | Read resource(s) | Yes | No | 200 |
| POST | Create resource | No | Yes | 201 |
| PUT | Replace resource entirely | Yes | Yes | 200 |
| PATCH | Partial update | No* | Yes | 200 |
| DELETE | Remove resource | Yes | No | 204 |
*PATCH is not guaranteed idempotent, but should be designed to be when possible.
Location headerUse the correct status code. When in doubt, refer to this table:
| Code | Meaning | When to Use |
|---|---|---|
| 200 | OK | Successful GET, PUT, PATCH |
| 201 | Created | Successful POST that creates a resource |
| 204 | No Content | Successful DELETE, or PUT/PATCH with no response body |
| Code | Meaning | When to Use |
|---|---|---|
| 400 | Bad Request | Malformed JSON, invalid field values, validation errors |
| 401 | Unauthorized | Missing or invalid authentication |
| 403 | Forbidden | Authenticated but lacks permission |
| 404 | Not Found | Resource does not exist |
| 409 | Conflict | Duplicate resource, state conflict |
| 422 | Unprocessable Entity | Valid JSON but fails business rules |
| 429 | Too Many Requests | Rate limit exceeded |
| Code | Meaning | When to Use |
|---|---|---|
| 500 | Internal Server Error | Unexpected server failure |
| 502 | Bad Gateway | Upstream service failure |
| 503 | Service Unavailable | Server overloaded or in maintenance |
Use a consistent error format across all endpoints:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": [
{
"field": "email",
"message": "Must be a valid email address.",
"code": "INVALID_FORMAT"
},
{
"field": "age",
"message": "Must be at least 18.",
"code": "MIN_VALUE"
}
]
}
}VALIDATION_ERROR, NOT_FOUND, RATE_LIMITEDUse cursor-based pagination for large datasets, offset-based for simple cases.
GET /api/v1/users?page=2&per_page=25
Response:
{
"data": [ ... ],
"pagination": {
"page": 2,
"per_page": 25,
"total": 150,
"total_pages": 6
}
}GET /api/v1/users?limit=25&cursor=eyJpZCI6MTAwfQ
Response:
{
"data": [ ... ],
"pagination": {
"limit": 25,
"has_more": true,
"next_cursor": "eyJpZCI6MTI1fQ"
}
}# Filter by field values
GET /api/v1/users?status=active&role=admin
# Date ranges
GET /api/v1/orders?created_after=2025-01-01&created_before=2025-12-31
# Search
GET /api/v1/products?q=keyboard
# Sort (prefix with - for descending)
GET /api/v1/users?sort=created_at
GET /api/v1/users?sort=-updated_at
# Combine everything
GET /api/v1/orders?status=shipped&sort=-created_at&page=1&per_page=25?sort=-created_at,namecreated_at, first_name, order_id2025-06-15T14:30:00Z{ "data": [...] }, not a bare array{
"data": {
"id": "usr_a1b2c3d4",
"email": "[email protected]",
"first_name": "Jane",
"last_name": "Doe",
"role": "admin",
"avatar_url": null,
"created_at": "2025-06-15T14:30:00Z",
"updated_at": "2025-06-15T14:30:00Z"
}
}/api/v1/, /api/v2/Authorization: Bearer <token>X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Resetsnake_case or camelCase and stick with itusr_, ord_, prod_~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.