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.
Applies REST and GraphQL design principles to produce or review an API contract. It covers resource modelling, URL conventions, HTTP semantics, request/response schemas, error formats, versioning strategy, and authentication patterns — producing OpenAPI-compatible snippets or GraphQL schema fragments.
| Principle | Guidance |
|---|---|
| Resource naming | Nouns, plural, lowercase, hyphenated: /orders, /line-items. Never verbs in URLs. |
| HTTP methods | GET read, POST create, PUT full replace, PATCH partial update, DELETE remove |
| Idempotency | GET, PUT, DELETE must be idempotent. POST is not. PATCH should be designed to be. |
| Status codes | 200 OK, 201 Created, 204 No Content, 400 Bad Request, 401 Unauthorised, 403 Forbidden, 404 Not Found, 409 Conflict, 422 Unprocessable Entity, 500 Internal Server Error |
| Filtering/sorting | Query parameters: ?status=active&sort=created_at&order=desc&page=2&per_page=25 |
| Versioning | URI prefix (/v1/) for breaking changes; header versioning (Accept: application/vnd.api+json;version=2) for content negotiation |
Consistent error bodies across all endpoints:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Human-readable description",
"details": [
{ "field": "email", "issue": "must be a valid email address" }
]
}
}query for reads, mutation for writes, subscription for real-time.OrderLine). Field names: camelCase (lineItems).edges, node, pageInfo).input CreateOrderInput { ... }.type CreateOrderResult = Order | ValidationError.openapi: 3.1.0
info:
title: [API name]
version: 1.0.0
paths:
/[resource]:
get:
summary: List [resources]
parameters:
- name: status
in: query
schema:
type: string
responses:
'200':
description: Success
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/[Resource]'
'401':
$ref: '#/components/responses/Unauthorised'
/[resource]/{id}:
get:
summary: Get [resource] by ID
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Success
'404':
$ref: '#/components/responses/NotFound'
components:
schemas:
[Resource]:
type: object
required: [id, created_at]
properties:
id:
type: string
format: uuid
created_at:
type: string
format: date-time
responses:
Unauthorised:
description: Missing or invalid credentials
NotFound:
description: Resource not foundtype Query {
[resource](id: ID!): [Resource]
[resources](filter: [Resource]FilterInput, first: Int, after: String): [Resource]Connection!
}
type Mutation {
create[Resource](input: Create[Resource]Input!): Create[Resource]Result!
}
type [Resource] {
id: ID!
# fields
createdAt: DateTime!
}
input Create[Resource]Input {
# fields
}
union Create[Resource]Result = [Resource] | ValidationError
type ValidationError {
message: String!
fields: [FieldError!]!
}### Design decisions
- [Decision and rationale]
### Concerns / open questions
- [Anti-pattern, risk, or unresolved design question]Input: "Design a REST API for creating and managing orders. An order has line items, a customer, and a status."
Expected output: OpenAPI snippet with /orders (GET, POST) and /orders/{id} (GET, PATCH, DELETE) and /orders/{id}/line-items (GET, POST). Order schema with status enum. Error contract. Design note on whether to embed line items in the order response or use a separate endpoint.
Input: User shares a GraphQL schema where a User type has a posts field returning a plain list with no pagination.
Expected output: Concern flagged for missing pagination (N+1 and performance risk at scale). Suggested fix using Relay connection pattern. Note on missing input types for mutations.
/createOrder, /getUser), it is an anti-pattern — model it as a resource operation instead.info, servers, and security sections.?api_key=...) — they appear in server logs and browser history.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.