用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vinilana/workshop-yungas --skill api-design命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| type | skill |
| name | Api Design |
| description | Design RESTful APIs following best practices |
| skillSlug | api-design |
| phases | ["P","R"] |
| generated | "2026-03-02T00:00:00.000Z" |
| status | filled |
| scaffoldVersion | 2.0.0 |
Activate this skill when designing new API endpoints or reviewing existing ones. It ensures RESTful conventions, consistent response shapes, and proper HTTP semantics.
/api/ prefix for all endpoints./api/franchises, not /api/franchise).packages/shared/src/constants.ts under API_ROUTES.GET — Read (list or single resource). Never mutate state.POST — Create a new resource. Return 201 with created entity.PUT — Full update of a resource.PATCH — Partial update of a resource.DELETE — Remove a resource.ApiResponse<T> — { data: T, message?: string }ApiErrorResponse — { error: string, message?: string }200 — Successful read or update201 — Successful creation400 — Validation error (missing required fields, invalid data)401 — Missing or invalid authentication token404 — Resource not found500 — Internal server error?search=term — Full-text search across relevant fields?page=1&limit=20 — Pagination (future)?status=active — Filtering (future)class-validator decorators on DTO classes.name (required), owner_name (required), email (required, format).Endpoint specification:
POST /api/franchises
Authorization: Bearer <token>
Content-Type: application/json
Request:
{
"name": "Franchise São Paulo",
"ownerName": "Maria Silva",
"email": "maria@example.com",
"phone": "(11) 99999-0000",
"city": "São Paulo",
"state": "SP",
"status": "pending"
}
Response (201):
{
"data": {
"id": 11,
"name": "Franchise São Paulo",
"ownerName": "Maria Silva",
"email": "maria@example.com",
"phone": "(11) 99999-0000",
"address": null,
"city": "São Paulo",
"state": "SP",
"status": "pending",
"createdAt": "2026-03-02T12:00:00.000Z",
"updatedAt": "2026-03-02T12:00:00.000Z"
}
}
Response (400):
{
"error": "Validation failed",
"message": "name, ownerName, and email are required"
}