home / skills / enoch-robinson / agent-skill-collection / doc-generator

doc-generator skill

/skills/documents/doc-generator

This skill generates professional, structured technical documents such as READMEs and API docs, prioritizing clarity and reader needs.

npx playbooks add skill enoch-robinson/agent-skill-collection --skill doc-generator

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.2 KB
---
name: doc-generator
description: 技术文档生成技能。当用户需要编写 README、API 文档、项目文档、技术规范、使用指南或任何技术文档时使用此技能。
---

# Doc Generator

生成专业、清晰、结构化的技术文档。

## 文档类型

### README.md 结构
```markdown
# 项目名称
简短描述(一句话)

## 功能特性
- 特性1
- 特性 2

## 快速开始
### 安装
### 使用

## 配置说明

## API 文档(如适用)

## 贡献指南

## License
```

### API 文档结构
```markdown
## 接口名称
简要描述

### 请求
- Method: GET/POST/...
- URL: /api/v1/resource
- Headers: ...
- Body: ...

### 响应
- 成功响应示例
- 错误响应示例

### 示例代码
```

## 文档原则

1. **用户优先**:从读者角度出发
2. **示例驱动**:代码示例胜过长篇描述
3. **保持更新**:文档与代码同步
4. **结构清晰**:使用标题层级组织内容

## 写作规范

- 使用主动语态
- 句子简短明确
- 专业术语首次出现时解释
- 代码块标注语言类型
- 重要信息使用提示框

## 提示框格式

```markdown
>⚠️ **警告**:重要警告信息

> 💡 **提示**:有用的建议

> 📝 **注意**:需要注意的事项

Overview

This skill generates professional, clear, and structured technical documentation on demand. It produces READMEs, API docs, project guides, technical specifications, and user manuals tailored to your project's needs. The output follows reader-first principles and includes examples, configuration notes, and contribution guidelines.

How this skill works

Provide the project context, target audience, and desired document type, and the skill constructs a well-organized document using standard templates and best-practice writing rules. It formats code blocks with language tags, includes request/response examples for APIs, and inserts warning, tip, and note callouts where appropriate. The result is ready-to-publish markdown you can paste into your repository or docs site.

When to use it

  • Creating a new project's README to explain purpose and quick start
  • Documenting REST or RPC endpoints with request/response examples
  • Drafting a user guide or installation and configuration instructions
  • Writing a technical specification or design document for stakeholders
  • Preparing contribution guidelines and license sections for open source

Best practices

  • Start with the reader: state goals and prerequisites up front
  • Use short sentences and active voice for clarity
  • Prefer concrete examples and runnable code snippets over long prose
  • Keep docs synchronized with code; update examples when APIs change
  • Mark important items with clear callouts: warnings, tips, and notes

Example use cases

  • Generate a README.md that includes features, quick start, and license
  • Produce API documentation with method, URL, headers, body, and responses
  • Create a configuration guide listing environment variables and defaults
  • Draft a contribution guide outlining workflows, tests, and PR rules
  • Assemble a technical spec that explains architecture, interfaces, and trade-offs

FAQ

Can the skill output different markdown structures for various projects?

Yes. Provide the document type and project details and the skill will apply the appropriate template and sections.

Will code examples be runnable?

Examples are formatted and language-tagged for readability; include real code snippets and minimal setup info to make them runnable.