Token导航 LogoToken导航TokenDH.com
开发敏感数据unknown未标认证来源可访问许可证需确认审计未展示

api-designAPI 设计

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

692

周安装

28

下载量

217
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:api-design(API 设计)
来源仓库:https://smithery.ai
仓库路径:api-design
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

api-design 辅助 OpenAPI 规范编写与接口文档管理。

  • 适用于前后端协作中的接口定义与联调支持。
  • 可自动生成请求响应示例与错误码说明。api-design 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 必须基于真实业务语义填写字段,禁止虚构数据结构。
  • 涉及鉴权与分页时应参照现有实现细节。

SKILL.md

API Design Skill

Best practices for designing clear, consistent, and maintainable REST APIs.

Core Principles

  1. Consistency - Follow same patterns across all endpoints
  2. Predictability - Behavior matches expectations
  3. Simplicity - Easy to understand and use
  4. Versioning - Plan for changes over time
  5. Documentation - Clear, up-to-date docs

Resource Naming

Use Nouns, Not Verbs

Bad:  /getUsers, /createUser, /deleteUser
Good: GET /users, POST /users, DELETE /users/:id

Plural Resource Names

Bad:  /user/:id
Good: /users/:id

Nested Resources (max 2 levels)

/users/:userId/posts
/posts/:postId/comments

HTTP Methods

GET    /users          # List all users
GET    /users/:id      # Get specific user
POST   /users          # Create new user
PUT    /users/:id      # Replace entire user
PATCH  /users/:id      # Update partial user
DELETE /users/:id      # Delete user

Status Codes

Success (2xx)

  • 200 OK - Successful GET, PUT, PATCH
  • 201 Created - Successful POST
  • 204 No Content - Successful DELETE

Client Errors (4xx)

  • 400 Bad Request - Invalid input
  • 401 Unauthorized - Not authenticated
  • 403 Forbidden - Not allowed
  • 404 Not Found - Resource doesn't exist
  • 422 Unprocessable - Validation failed
  • 429 Too Many Requests - Rate limited

Server Errors (5xx)

  • 500 Internal Error - Server error
  • 503 Service Unavailable - Overloaded

Request/Response Format

Success Response

{
  "data": {
    "id": 1,
    "name": "John Doe",
    "email": "john@example.com"
  }
}

List Response with Pagination

{
  "data": [...],
  "pagination": {
    "page": 1,
    "perPage": 20,
    "total": 100,
    "totalPages": 5
  }
}

Error Response

{
  "error": {
    "code": "INVALID_INPUT",
    "message": "Email is required",
    "details": {
      "field": "email",
      "reason": "missing_field"
    }
  }
}

Query Parameters

Filtering

GET /users?role=admin&active=true

Sorting

GET /users?sort=name
GET /users?sort=-created_at  # descending

Pagination

GET /users?page=2&per_page=20

Field Selection

GET /users?fields=id,name,email

Versioning

URL Versioning (Recommended)

/api/v1/users
/api/v2/users

Authentication

Bearer Token

Authorization: Bearer <token>

Rate Limiting Headers

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000

Best Practices Checklist

  • Use nouns for resources
  • Plural resource names
  • Proper HTTP methods
  • Appropriate status codes
  • Consistent JSON structure
  • Input validation
  • Error handling
  • Authentication
  • Rate limiting
  • Pagination for lists
  • API versioning
  • Documentation
  • HTTPS only

Remember

  • Consistency is key
  • Think from client perspective
  • Design for evolution
  • Document everything
  • Security first

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

70.63%
按下载量换算153

安全审计

暂无安全审计结果可展示。

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills