API Doc Writer

API接口文档助手。用于编写REST API文档、定义接口规范、生成接口说明。当需要编写API文档、接口规范时触发。

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 280 · 1 current installs · 1 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name and description (API doc writer) align with the SKILL.md content: templates, examples, and guidelines for REST API documentation. No unrelated capabilities or external services are requested.
Instruction Scope
SKILL.md contains only templates, examples, and design guidance for API docs. It does not instruct the agent to run commands, read files, access environment variables, or contact external endpoints.
Install Mechanism
No install spec or code files are present. Being instruction-only means nothing is written to disk or installed; this is the lowest-risk install model.
Credentials
The skill declares no required environment variables, credentials, or config paths. There is no disproportionate or unexplained secret access requested.
Persistence & Privilege
always:false and default invocation settings. The skill does not request persistent/system-level privileges or modifications to other skills or configs.
Assessment
This skill appears to be a harmless documentation/template helper and is internally consistent. Before installing, consider: (1) the source is unknown—prefer skills from trusted authors or with a homepage; (2) never paste real secrets or production tokens into sample requests/examples; (3) review generated docs for organization-specific policies (auth, error codes, naming conventions); (4) if the skill later asks for environment variables or to run code, re-evaluate permissions. Overall, it's low-risk as provided.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.1
Download zip
latestvk9784kz7kphncmtkfter9j81vn83hamg

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

API接口文档助手

API文档模板

# API接口文档

版本:V1.0
更新日期:YYYY-MM-DD
维护人:XXX

---

## 接口概览

| 模块 | 接口数 | 负责人 |
|------|--------|--------|
| 用户模块 | 5 | @xxx |
| 订单模块 | 8 | @xxx |
| 支付模块 | 4 | @xxx |

---

## 通用说明

### 认证方式

Authorization: Bearer <token>


### 请求格式

Content-Type: application/json


### 响应格式
```json
{
  "code": 0,
  "message": "success",
  "data": {}
}

状态码

状态码说明
0成功
1001参数错误
2001未授权
3001资源不存在
5001服务器错误

接口详情

1. 用户接口

1.1 获取用户信息

接口地址

GET /api/v1/users/{id}

请求参数

参数名类型位置必填说明
idlongpath用户ID

请求示例

GET /api/v1/users/123

响应示例

{
  "code": 0,
  "message": "success",
  "data": {
    "id": 123,
    "name": "张三",
    "email": "zhangsan@example.com",
    "phone": "13800138000",
    "created_at": "2024-01-01 10:00:00"
  }
}

错误示例

{
  "code": 3001,
  "message": "用户不存在",
  "data": null
}

1.2 创建用户

接口地址

POST /api/v1/users

请求参数

参数名类型必填说明
namestring用户名
emailstring邮箱
phonestring手机号
passwordstring密码

请求示例

{
  "name": "张三",
  "email": "zhangsan@example.com",
  "phone": "13800138000",
  "password": "123456"
}

响应示例

{
  "code": 0,
  "message": "success",
  "data": {
    "id": 123,
    "name": "张三"
  }
}

2. 订单接口

2.1 订单列表

接口地址

GET /api/v1/orders

请求参数

参数名类型位置必填说明
pageintquery页码,默认1
page_sizeintquery每页数量,默认20
statusstringquery订单状态

请求示例

GET /api/v1/orders?page=1&page_size=10&status=paid

响应示例

{
  "code": 0,
  "message": "success",
  "data": {
    "total": 100,
    "page": 1,
    "page_size": 10,
    "list": [
      {
        "id": "ORD202401010001",
        "user_id": 123,
        "amount": 100.00,
        "status": "paid",
        "created_at": "2024-01-01 10:00:00"
      }
    ]
  }
}

接口变更记录

版本日期变更内容变更人
V1.0YYYY-MM-DD初始版本@xxx
V1.1YYYY-MM-DD新增xxx接口@xxx

## 接口设计原则

### RESTful规范
| 方法 | 用途 | 示例 |
|------|------|------|
| GET | 查询 | GET /users |
| POST | 创建 | POST /users |
| PUT | 完整更新 | PUT /users/1 |
| PATCH | 部分更新 | PATCH /users/1 |
| DELETE | 删除 | DELETE /users/1 |

### URL命名规范
```markdown
- 使用名词复数:/users
- 使用小写:/user-info
- 使用连字符分隔:/order-details
- 避免动词:不用 /getUser

状态码规范

类别状态码说明
1xx信息接收的请求正在处理
2xx成功请求正常处理完毕
3xx重定向需要附加操作完成请求
4xx客户端错误请求有语法错误
5xx服务器错误服务器处理出错

安全建议

  • 敏感信息加密传输
  • 身份验证Token过期机制
  • 接口调用频率限制
  • 参数校验过滤

Files

1 total
Select a file
Select a file to preview.

Comments

Loading comments…