Skip to content
Back to skills

Doc Generator

ASecurity

从源代码生成全面且准确的 API 文档。适用于创建或更新 API 文档、生成 OpenAPI 规范,或在用户提到 API 文档、端点或说明时使用。

  • 41,719 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 2, 2026
documentationjavascriptpythonjavabashapi

Works with

  • api

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add luongnv89/claude-howto --skill doc-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Doc Generator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Doc Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/luongnv89-doc-generator-49913f35/badge)](https://www.skillsdirectory.com/skills/luongnv89-doc-generator-49913f35)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: doc-generator
description: 从源代码生成全面且准确的 API 文档。适用于创建或更新 API 文档、生成 OpenAPI 规范,或在用户提到 API 文档、端点或说明时使用。
---

# API 文档生成 Skill

## 可生成内容

- OpenAPI / Swagger 规范
- API 端点文档
- SDK 使用示例
- 集成指南
- 错误码参考
- 认证指南

## 文档结构

### 每个端点的写法

````markdown
## GET /api/v1/users/:id

### 描述
简要说明这个端点做什么

### 参数

| 名称 | 类型 | 必填 | 说明 |
|------|------|------|------|
| id | string | 是 | 用户 ID |

### 响应

**200 成功**
```json
{
  "id": "usr_123",
  "name": "John Doe",
  "email": "john@example.com",
  "created_at": "2025-01-15T10:30:00Z"
}
```

**404 未找到**
```json
{
  "error": "USER_NOT_FOUND",
  "message": "User does not exist"
}
```

### 示例

**cURL**
```bash
curl -X GET "https://api.example.com/api/v1/users/usr_123" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

**JavaScript**
```javascript
const user = await fetch('/api/v1/users/usr_123', {
  headers: { 'Authorization': 'Bearer token' }
}).then(r => r.json());
```

**Python**
```python
response = requests.get(
    'https://api.example.com/api/v1/users/usr_123',
    headers={'Authorization': 'Bearer token'}
)
user = response.json()
```
````

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.