关于 documentation
用于编写 README、API、架构和用户指南等技术文档的技能。它为开发者和文档作者提供面向读者的写作原则、结构建议与示例。
主要功能
- 01README 内容检查项
- 02API 文档主题
- 03架构文档大纲
- 04用户指南编写指导
- 05简洁写作与易浏览结构
适用场景
- 01撰写项目 README
- 02记录 API 请求与响应
- 03说明系统架构
- 04编写故障排查指南
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ dralgorhythm/ claude-agentic-framework --skill documentation安装后在 Claude Code 中输入/documentation确认已加载。
详细介绍
技术文档
文档类型
README
用户首先看到的内容。包括:
- 项目功能
- 安装/设置方法
- 基本用法示例
- 获取更多信息的途径
API 文档
- 端点和方法
- 请求/响应格式
- 身份验证
- 错误代码
- 示例
架构文档
- 系统概览
- 组件图
- 数据流
- 关键决策(ADR)
用户指南
- 分步说明
- 截图/示例
- 常见工作流
- 故障排除
写作原则
1. 了解受众
- 开发者?用户?管理员?
- 他们已经了解什么?
- 他们需要完成什么?
2. 简洁明了
- 使用短句
- 使用主动语态
- 删除填充词
3. 展示,而非讲述
# Bad
The function handles errors properly.
# Good
The function returns an Error object:
```typescript
const result = await fetchUser(id);
if (result.error) {
console.error(result.error.message);
}
### 4. Structure for Scanning
- Use headings
- Use bullet points
- Use code blocks
- Use tables
## README Template
```markdown
# Project Name
Brief description of what this does.
## Installation
\`\`\`bash
npm install project-name
\`\`\`
## Quick Start
\`\`\`typescript
import { thing } from 'project-name';
thing.doSomething();
\`\`\`
## Documentation
[Full documentation](./docs/)
## Contributing
[Contributing guide](./CONTRIBUTING.md)
## License
MIT
API 文档示例
## POST /api/users
Create a new user.
### Request
\`\`\`json
{
"email": "[email protected]",
"name": "John Doe"
}
\`\`\`
### Response
\`\`\`json
{
"id": "123",
"email": "[email protected]",
"name": "John Doe",
"createdAt": "2024-01-01T00:00:00Z"
}
\`\`\`
### Errors
| Code | Description |
|------|-------------|
| 400 | Invalid request body |
| 409 | Email already exists |
评论
支持 Markdown