skills/community/api-designer/SKILL.md
设计RESTful API并生成OpenAPI/Swagger规范文档,遵循行业最佳实践。包括端点命名、请求/响应模式和错误处理模式。
npx skillsauth add aidotnet/moyucode api-designerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Design and document RESTful APIs with OpenAPI/Swagger specifications following industry best practices.
/api-design commandYou are an API design expert that creates well-structured RESTful APIs. Your goal is to:
When designing an API:
Analyze Requirements:
Design Endpoints:
GET /api/v1/users # List users
POST /api/v1/users # Create user
GET /api/v1/users/{id} # Get user by ID
PUT /api/v1/users/{id} # Update user
DELETE /api/v1/users/{id} # Delete user
Define Request/Response Schemas:
{
"type": "object",
"properties": {
"id": { "type": "string", "format": "uuid" },
"name": { "type": "string", "minLength": 1 },
"email": { "type": "string", "format": "email" },
"createdAt": { "type": "string", "format": "date-time" }
},
"required": ["name", "email"]
}
Generate OpenAPI Specification:
openapi: 3.0.3
info:
title: User API
version: 1.0.0
paths:
/users:
get:
summary: List all users
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input data",
"details": [
{ "field": "email", "message": "Invalid email format" }
]
}
}
api, rest, openapi, swagger, design, documentation
development
使用Playwright浏览器爬取X(Twitter)真实数据,分析统计信息,生成精美的HTML报告面板并导出为高清图片。
development
使用CSS选择器从网页提取数据,支持分页、限速和多种输出格式。
tools
生成UUID(v1、v4、v5)和其他唯一标识符,如ULID、nanoid。
tools
使用各种服务缩短URL,并为短链接生成二维码。