api-design-assistant — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited api-design-assistant (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.
Assist with designing well-structured, RESTful APIs by suggesting endpoints, parameters, return types, and best practices. Generate OpenAPI specifications and provide implementation guidance.
When designing a new API or reviewing an existing one, first understand:
For new API design:
For API review:
Follow these steps based on the use case:
#### Designing New APIs
Step 1: Identify Resources
Map domain concepts to API resources:
/users/products/orders/users/{userId}/ordersStep 2: Define Endpoints
For each resource, determine needed operations:
# Users resource
GET /users # List users
POST /users # Create user
GET /users/{id} # Get specific user
PUT /users/{id} # Replace user
PATCH /users/{id} # Update user
DELETE /users/{id} # Delete user
# Nested resources
GET /users/{id}/orders # Get user's orders
POST /users/{id}/orders # Create order for user
# Actions
POST /users/{id}/activate # Activate user
POST /orders/{id}/cancel # Cancel orderStep 3: Design Request/Response Schemas
Define what data each endpoint expects and returns. See best-practices.md for detailed examples.
Step 4: Add Supporting Features
Step 5: Generate OpenAPI Specification
Create formal API documentation. See openapi-template.md for complete templates.
#### Reviewing Existing APIs
Step 1: Analyze Consistency
Check for:
Step 2: Identify Issues
Common problems:
/getUsers instead of GET /users)/user vs /users)Step 3: Suggest Improvements
Provide specific recommendations:
/getUsers to GET /users"GET /users endpoint"Step 4: Propose Migration Path
If breaking changes are needed:
/v2/users)Consult best-practices.md for detailed guidance on:
Depending on user needs, provide:
#### Markdown Documentation
## POST /users
Create a new user account.
### Request
**Headers:**
- `Content-Type: application/json`
- `Authorization: Bearer <token>`
**Body:**{ "name": "John Doe", "email": "[email protected]", "role": "user" }
### Response
**Success (201 Created):**{ "id": 123, "name": "John Doe", "email": "[email protected]", "role": "user", "created_at": "2024-01-15T10:30:00Z" }
**Error (400 Bad Request):**{ "error": { "code": "VALIDATION_ERROR", "message": "Invalid input data", "details": [ { "field": "email", "message": "Email format is invalid" } ] } }
#### OpenAPI 3.0 Specification
Generate formal OpenAPI specs using templates from openapi-template.md.
#### Implementation Hints
Provide language/framework-specific guidance when requested:
Example for Express.js:
// POST /users
app.post('/users', async (req, res) => {
try {
const { name, email, role } = req.body;
// Validation
if (!name || !email) {
return res.status(400).json({
error: {
code: 'VALIDATION_ERROR',
message: 'Name and email are required'
}
});
}
// Create user
const user = await User.create({ name, email, role });
res.status(201)
.location(`/users/${user.id}`)
.json(user);
} catch (error) {
res.status(500).json({
error: {
code: 'INTERNAL_ERROR',
message: 'Failed to create user'
}
});
}
});#### Pagination
Recommend appropriate pagination strategy:
#### Authentication
Suggest authentication approach:
#### Versioning
Recommend when to version:
Don't version for:
#### Filtering Complex Data
Design filtering for different data types:
Exact match:
GET /users?status=active&role=adminRange queries:
GET /products?price_min=10&price_max=100
GET /events?start_date=2024-01-01&end_date=2024-12-31Pattern matching:
GET /users?name_contains=john
GET /products?search=laptopMultiple values:
GET /users?status=active,pending
GET /products?category=electronics,computersUser request:
"Design an API for a blog platform. Users should be able to create posts, comment on posts, and like posts."
Response approach:
# Posts
GET /posts
POST /posts
GET /posts/{postId}
PUT /posts/{postId}
DELETE /posts/{postId}
# Comments on posts
GET /posts/{postId}/comments
POST /posts/{postId}/comments
DELETE /posts/{postId}/comments/{commentId}
# Likes on posts
POST /posts/{postId}/likes
DELETE /posts/{postId}/likes
GET /posts/{postId}/likes // Post
{
"id": 123,
"title": "My Post",
"content": "Post content...",
"author_id": 456,
"created_at": "2024-01-15T10:30:00Z",
"likes_count": 10,
"comments_count": 5
}User request:
"Review this API design:GET /getUserById?id=123,POST /createUser,POST /updateUser"
Response approach:
# Before
GET /getUserById?id=123
POST /createUser
POST /updateUser
# After
GET /users/{id}
POST /users
PUT /users/{id} # Full replacement
PATCH /users/{id} # Partial updateUser request:
"Generate OpenAPI documentation for a user management API"
Response approach:
Start with resources, not actions:
Be consistent:
Think about the consumer:
Plan for evolution:
Document early:
Validate thoroughly:
For detailed information, consult these references:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.