api-design-first
Skill2 starsChanged 10 days agoMITView on GitHub
Design and document RESTful APIs using design-first principles with OpenAPI specifications. Use this skill when the user asks to design an API, create an API spec, plan endpoints, model request/response schemas, or discuss API versioning — even if they just say "design the API" or "create the OpenAPI spec". Not for cloudflare-worker-api.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- JPeetz/agent-skillstheir own version, first seen Oct 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- JPeetz/agent-skills★ 14same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository63 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/avoid-ai-writing/AGENTS.mdAGENTS.md
- .agents/skills/do-web-doc-resolver/AGENTS.mdAGENTS.md
- .agents/skills/skill-evaluator/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- accessibility-auditorSkill
- agent-browserSkill
- agentic-abstentionSkill
- agents-mdSkill
- architecture-diagramSkill
- avoid-ai-writingSkill
- cicd-pipelineSkill
- cloudflare-worker-apiSkill
- codacySkill
- codeberg-apiSkill
- code-review-assistantSkill
- css-render-performanceSkill
- database-devopsSkill
- debuggerSkill
- delegateSkill
- dependency-upgradesSkill
- dist-channel-selectionSkill
- docs-hookSkill
- document-rendering-and-locatorsSkill
- dogfoodSkill
- dora-reportSkill
- do-web-doc-resolverSkill
- durable-objectsSkill
- eu-ai-act-complianceSkill
- git-github-workflowSkill
- goap-agentSkill
- implementerSkill
- intent-classifierSkill
- iterative-refinementSkill
- jules-delegatorSkill
- learnSkill
- lifecycle-managementSkill
- local-context-sanitizationSkill
- memory-contextSkill
- migration-refactoringSkill
- nested-build-isolationSkill
- privacy-firstSkill
- progressive-deliverySkill
- pwa-offline-syncSkill
- reader-ui-uxSkill
- readme-best-practicesSkill
- secrets-managementSkill
- secure-invite-and-accessSkill
- security-code-auditorSkill
- shell-script-qualitySkill
- skill-creatorSkill
- skill-evaluatorSkill
- static-analysisSkill
- testing-strategySkill
- test-runnerSkill
- triz-solverSkill
- turso-dbSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Use OpenAPI 3.0 as the source of truth
- Distinctive: line 31
Use nouns for resources (not verbs)
- Distinctive: line 38
Follow naming conventions throughout
- Distinctive: line 39
Use consistent request/response formats
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Design First
Design RESTful APIs using design-first principles with comprehensive OpenAPI 3.0 specifications.
When to Use
- User asks to design an API or create an API spec
- Planning endpoints, modeling request/response schemas
- Discussing API versioning or OpenAPI/Swagger documentation
- Even if they just say "design the API" or "create the OpenAPI spec"
Design Principles
1. API-First Mindset
- Design the API contract before implementation
- Use OpenAPI 3.0 as the source of truth
- Generate code from specifications, not vice versa
2. RESTful Design
- Use nouns for resources (not verbs)
- Leverage HTTP methods semantically
- Implement proper status codes
- Support filtering, pagination, and sorting
3. Consistency
- Follow naming conventions throughout
- Use consistent request/response formats
- Maintain backward compatibility with versioning
Resource Naming
GET /users # List users
GET /users/{id} # Get specific user
POST /users # Create user
PUT /users/{id} # Update user (full)
PATCH /users/{id} # Partial update
DELETE /users/{id} # Delete user
GET /users/{id}/orders # Sub-resource collectionHTTP Status Codes
| Code | Usage |
| 200 | Successful GET, PUT, PATCH |
| 201 | Successful POST (resource created) |
| 204 | Successful DELETE |
| 400 | Bad request (validation error) |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Resource not found |
| 409 | Conflict (duplicate, etc.) |
| 422 | Unprocessable entity |
| 429 | Rate limited |
| 500 | Server error |
Request/Response Patterns
Pagination
{
"data": [...],
"meta": {
"page": 1,
"per_page": 20,
"total": 150,
"total_pages": 8
},
"links": {
"self": "/users?page=1",
"next": "/users?page=2",
"last": "/users?page=8"
}
}Error Response
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{ "field": "email", "message": "Invalid email format" }
]
}
}OpenAPI Structure
openapi: 3.0.3
info:
title: Example API
version: 1.0.0
paths:
/users:
get:
summary: List users
parameters:
- name: page
in: query
schema:
type: integer
responses:
'200':
description: SuccessVersioning Strategies
- URL Path:
/v1/users,/v2/users - Header:
Accept: application/vnd.api+json;version=2 - Query Param:
/users?api-version=2
See Also
cloudflare-worker-api— Cloudflare Worker API routessecure-invite-and-access— Auth endpoints and permissions
Rationalizations
| Rationalization | Reality |
| "We'll design the API after implementing the feature." | Post-hoc API design leads to inconsistent contracts, breaking changes, and poor developer experience. |
"Verbs in URLs are fine — /getUser is clear." | REST uses HTTP methods for actions; verb-based URLs break caching, proxying, and violate RESTful conventions. |
Red Flags
- Designing endpoints without an OpenAPI specification first
- Using verbs in resource URLs instead of nouns with HTTP methods
- Ignoring versioning strategy until breaking changes force a rewrite
References
references/rest-guidelines.md- Comprehensive REST design guidelinesreferences/openapi-examples.md- Complete OpenAPI 3.0 specification examplesreferences/naming-conventions.md- Resource and field naming standards
Voice & Context
- Default:
professional+blog - Reference:
voice-profilesskill for definitions and auto-detection.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

