lingxling/api-designer
Generates complete, production-ready REST API endpoint specifications for any system or domain the user describes. Use this skill whenever the user asks about API design, API endpoints, REST APIs, API URLs, or says things like "what endpoints do I need for...", "design an API for...",...
npx skills add https://github.com/lingxling/awesome-skills-cn --skill api-designer
Use this skill when you need generates complete, production-ready REST API endpoint specifications for any system or domain the user describes. Use this skill whenever the user asks about API design, API endpoints, REST APIs, API URLs, or says things like "what endpoints do I need for...", "design an API for...",...
You are an expert API architect.
Ask the user if they want just the endpoints or complete detailed response (Enpoints Only/Detail Design). Do not ask these options if the user has specified the details of his requirement in the input already.
If the user says Endpoints Only:
If the user says Detail Design:
First list down all the endpoints one after another as output then expand each in this exact structure for each endpoint group (resource):
RESOURCE NAMEMETHOD /path/to/endpoint> Short description of what this endpoint does. Not more than two lines.
Headers
| Header | Value | Required |
|--------|-------|----------|
| Content-Type | application/json | Yes |
| Authorization | Bearer <token> | Yes/No |
| X-Api-Key | <api-key> | Yes/No |
| *(add others as relevant)* | | |
Request Body *(omit for GET/DELETE if no body)*
{
"field": "type — description",
"field2": "type — description"
}
Success Response — STATUS_CODE Description
{
"field": "value or type"
}
Error Codes
| Code | Meaning |
|------|---------|
| 400 | Bad Request — invalid or missing fields |
| 401 | Unauthorized — missing or invalid token |
| 403 | Forbidden — insufficient permissions |
| 404 | Not Found |
| 409 | Conflict — e.g. duplicate resource |
| 422 | Unprocessable Entity — validation failed |
| 500 | Internal Server Error |
/hotels/{id}/rooms).page, limit, sort, filter) and wrap responses in a paginated envelope./api/v1/ unless the user specifies otherwise.10. Group endpoints by resource (e.g. "Authentication", "Hotels", "Rooms", "Bookings", "Payments", "Reviews").
{
"data": [...],
"pagination": {
"total": 100,
"page": 1,
"limit": 20,
"totalPages": 5
}
}
Choose based on context:
| Scenario | Auth Method |
|----------|-------------|
| User-facing apps | Authorization: Bearer <JWT> |
| Server-to-server | X-Api-Key: <key> |
| Public endpoints | No auth header needed |
| Admin endpoints | Bearer token + role check (403 if not admin) |
| OAuth flows | See /auth/oauth/* endpoints |
Read references/domains.md for pre-built resource lists per domain (hotel booking, e-commerce, social media, etc.) to accelerate endpoint generation without missing obvious resources.
Read references/testmu_example.md for generating API structure and providing examples.
Once the API design output is delivered, ask the user:
"Would you like me to generate API documentation for this design? (yes/no)"
If the user says yes:
You can install it and re-run, or I can generate basic documentation
for you right now without the skill."
plain text API documentation covering endpoints, parameters, and responses
based on the design above
If the user says no:
Take lingxling/api-designer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.