2428424081cn/skill-mcp/restful-api-standard

Claude Code and agent skill by 2428424081cn/skill-mcp

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

企业级 RESTful API 设计准则

Install

npx vskill@latest install 2428424081cn/skill-mcp/restful-api-standard

SKILL.md

The same SKILL.md was published earlier as 2428424081cn/skill-mcp/restful-api-standard.

企业级 RESTful API 设计准则

在生成任何 API 接口、路由定义与控制器时,AI 必须严格执行以下设计标准。

一、 URL 命名与路由层级

  1. 全名词复数:使用资源复数名词,严禁在 URL 中出现动词(动词由 HTTP Method 表达)。
  • ❌ /api/getUserInfo / /api/deleteOrder
  • ✅ GET /api/v1/users/{id} / DELETE /api/v1/orders/{id}
  1. 层级从属表达:子资源嵌套在父资源之后。
  • ✅ GET /api/v1/users/{userId}/orders
  1. Kebab-Case:URL 路径全小写并用连字符连接(如 /api/v1/payment-methods)。

二、 HTTP 谓词与状态码契约

  • `GET`:安全且幂等,查询资源。200 OK
  • `POST`:创建资源。成功返回 201 Created + Location 头。
  • `PUT`:全量替换(幂等)。200 OK 或 204 No Content
  • `PATCH`:局部更新。200 OK
  • `DELETE`:删除资源(幂等)。成功返回 204 No Content 或 200 OK
  • 错误状态码:
  • 400 Bad Request(参数格式错误)
  • 401 Unauthorized(未认证/Token 失效)
  • 403 Forbidden(已认证但无权限)
  • 404 Not Found(资源不存在)
  • 409 Conflict(唯一约束/状态机冲突)
  • 422 Unprocessable Entity(业务逻辑校验失败)

三、 统一响应体信封 (Envelope)

json
{
"code": 0,
"message": "success",
"data": { ... },
"meta": {
"page": 1,
"pageSize": 20,
"total": 100
},
"traceId": "c98a1f87-6e42-4b2a"
}

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Refreshed 18 Nov 2026, 4 days ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/2428424081cn/skill-mcp/restful-api-standard/badge)](https://verified-skill.com/skills/2428424081cn/skill-mcp/restful-api-standard)

Something wrong with this skill or its page? Tell us.