documentation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDocumentation
文档制作
This skill provides comprehensive documentation capabilities including API documentation, technical writing, changelog generation, and developer guides. It covers everything from OpenAPI specifications to user-facing changelogs.
本技能提供全方位的文档制作能力,包括API文档、技术写作、变更日志生成及开发者指南。覆盖从OpenAPI规范到面向用户的变更日志等各类文档场景。
When to Use This Skill
适用场景
- When documenting REST APIs or GraphQL schemas
- When creating OpenAPI/Swagger specifications
- When generating client SDKs
- When writing API integration guides
- When creating interactive API documentation
- When maintaining API versioning and migration guides
- When writing user guides and tutorials
- When creating or improving README files
- When documenting architecture and design decisions
- When writing code comments and inline documentation
- When improving content clarity and accessibility
- When creating getting started documentation
- When writing feature specifications and design documents
- When creating Architecture Decision Records (ADRs)
- When documenting technical decisions and their rationale
- When creating migration guides for version upgrades
- When documenting breaking changes and upgrade paths
- When planning and documenting database migrations
- When preparing release notes for a new version
- When creating weekly or monthly product update summaries
- When documenting changes for customers
- When writing changelog entries for app store submissions
- When generating update notifications
- When creating internal release documentation
- When maintaining a public changelog/product updates page
- 记录REST API或GraphQL架构时
- 创建OpenAPI/Swagger规范时
- 生成客户端SDK时
- 编写API集成指南时
- 创建交互式API文档时
- 维护API版本管理及迁移指南时
- 编写用户指南和教程时
- 创建或优化README文件时
- 记录架构设计决策时
- 编写代码注释及内联文档时
- 提升内容清晰度与易访问性时
- 创建快速入门文档时
- 撰写功能规格书和设计文档时
- 生成架构决策记录(ADRs)时
- 记录技术决策及其依据时
- 编写版本升级迁移指南时
- 记录破坏性变更及升级路径时
- 规划并记录数据库迁移时
- 准备新版本发布说明时
- 创建每周或每月产品更新摘要时
- 为客户记录变更内容时
- 撰写应用商店提交用的变更日志条目时
- 生成更新通知时
- 创建内部发布文档时
- 维护公开的变更日志/产品更新页面时
What This Skill Does
技能功能
- OpenAPI Specs: Creates complete OpenAPI 3.0/Swagger specifications
- SDK Generation: Generates client libraries and SDKs
- Interactive Docs: Creates Postman collections and interactive docs
- Versioning: Manages API versioning and migration guides
- Code Examples: Provides examples in multiple languages
- Developer Guides: Writes authentication and integration guides
- User Guides: Creates step-by-step user guides with clear instructions
- Tutorials: Writes progressive tutorials that build knowledge
- README Files: Creates comprehensive README files with badges and sections
- Architecture Docs: Documents system architecture and design decisions
- Code Documentation: Writes clear code comments and inline docs
- Content Organization: Structures content with clear headings and flow
- Changelog Generation: Transforms git commits into user-friendly changelogs
- Design Specs: Creates feature specifications and technical design documents
- ADRs: Documents Architecture Decision Records with context and consequences
- Migration Guides: Creates step-by-step migration documentation with rollback procedures
- OpenAPI规范制作:生成完整的OpenAPI 3.0/Swagger规范
- SDK生成:生成客户端库及SDK
- 交互式文档:创建Postman集合及交互式文档
- 版本管理:管理API版本及迁移指南
- 代码示例:提供多语言代码示例
- 开发者指南:编写认证及集成指南
- 用户指南:创建步骤清晰的用户指南
- 教程编写:撰写循序渐进的知识教程
- README文件:创建包含徽章及多模块的完整README文件
- 架构文档:记录系统架构及设计决策
- 代码文档:编写清晰的代码注释及内联文档
- 内容组织:通过清晰的标题和流程结构化内容
- 变更日志生成:将Git提交记录转换为用户友好的变更日志
- 设计规格书:创建功能规格书及技术设计文档
- ADRs制作:记录包含背景及影响的架构决策记录
- 迁移指南:创建包含回滚流程的分步迁移文档
How to Use
使用方法
Document API
文档化API
Create OpenAPI specification for this APIGenerate API documentation for the /api/users endpointsCreate OpenAPI specification for this APIGenerate API documentation for the /api/users endpointsWrite Documentation
编写文档
Create a user guide for this featureWrite a README for this projectCreate a user guide for this featureWrite a README for this projectGenerate Changelog
生成变更日志
Create a changelog from commits since last releaseGenerate changelog for all commits from the past weekCreate a changelog from commits since last releaseGenerate changelog for all commits from the past weekAPI Documentation
API文档制作
Document as You Build
边开发边文档化
- Document APIs during development, not after
- Keep documentation in sync with code
- Use real examples over abstract descriptions
- Show both success and error cases
- Version everything including docs
- 在开发过程中同步编写API文档,而非事后补充
- 保持文档与代码同步更新
- 使用真实示例而非抽象描述
- 同时展示成功与错误场景
- 对所有内容(包括文档)进行版本管理
OpenAPI Specification
OpenAPI规范
Structure:
- API metadata (title, version, description)
- Server definitions
- Security schemes
- Paths and operations
- Request/response schemas
- Examples for all operations
Example:
yaml
openapi: 3.0.0
info:
title: User API
version: 1.0.0
description: API for user management
paths:
/users:
get:
summary: List users
responses:
'200':
description: List of users
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'结构:
- API元数据(标题、版本、描述)
- 服务器定义
- 安全方案
- 路径与操作
- 请求/响应 schema
- 所有操作的示例
示例:
yaml
openapi: 3.0.0
info:
title: User API
version: 1.0.0
description: API for user management
paths:
/users:
get:
summary: List users
responses:
'200':
description: List of users
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'SDK Generation
SDK生成
Supported Languages:
- JavaScript/TypeScript
- Python
- Java
- Go
- Ruby
- PHP
Tools:
- OpenAPI Generator
- Swagger Codegen
- SDK generators
支持语言:
- JavaScript/TypeScript
- Python
- Java
- Go
- Ruby
- PHP
工具:
- OpenAPI Generator
- Swagger Codegen
- SDK生成器
Code Examples
代码示例
Provide examples in multiple languages:
- JavaScript/Node.js
- Python
- cURL
- Ruby
- Java
提供多语言示例:
- JavaScript/Node.js
- Python
- cURL
- Ruby
- Java
Technical Writing
技术写作
Write for Your Audience
面向目标受众写作
- Know their skill level
- Use appropriate terminology
- Provide context when needed
- Assume minimal prior knowledge
- Include troubleshooting sections
- 了解受众技能水平
- 使用恰当的术语
- 必要时提供背景信息
- 假设用户仅有基础前置知识
- 包含故障排除章节
Lead with the Outcome
以结果为导向
- Start with what users will accomplish
- Show the value before the steps
- Use clear, action-oriented language
- Focus on user success, not features
- 开篇说明用户将达成的目标
- 先展示价值再介绍步骤
- 使用清晰、面向行动的语言
- 聚焦用户成功而非功能本身
Use Active Voice
使用主动语态
- Prefer active over passive voice
- Use clear, concise language
- Avoid jargon when possible
- Include real examples and scenarios
- Test instructions by following them exactly
- 优先使用主动语态而非被动语态
- 使用简洁明了的语言
- 尽可能避免行话
- 包含真实示例与场景
- 严格按照说明步骤测试验证
Documentation Types
文档类型
User Guides:
- Overview and goals
- Prerequisites
- Step-by-step instructions
- Screenshots or examples
- Troubleshooting
- Next steps
README Files:
- Project title and description
- Badges (build status, version, license)
- Features
- Installation
- Quick start
- Usage examples
- Contributing
- License
Architecture Docs:
- System overview
- Component diagrams
- Design decisions
- Technology choices
- Integration points
- Data flow
用户指南:
- 概述与目标
- 前置条件
- 分步说明
- 截图或示例
- 故障排除
- 后续步骤
README文件:
- 项目标题与描述
- 徽章(构建状态、版本、许可证)
- 功能特性
- 安装方法
- 快速入门
- 使用示例
- 贡献指南
- 许可证
架构文档:
- 系统概述
- 组件图
- 设计决策
- 技术选型
- 集成点
- 数据流
Changelog Generation
变更日志生成
Transforming Git Commits
转换Git提交记录
Automatically creates user-facing changelogs from git commits by:
- Analyzing commit history
- Categorizing changes (features, improvements, bug fixes, breaking changes, security)
- Transforming technical commits into clear, customer-friendly release notes
- Filtering out internal commits (refactoring, tests, etc.)
通过以下步骤自动将Git提交记录转换为面向用户的变更日志:
- 分析提交历史
- 分类变更类型(功能新增、改进、Bug修复、破坏性变更、安全更新)
- 将技术化提交信息转换为清晰易懂的发布说明
- 过滤内部提交记录(重构、测试等)
Basic Usage
基础用法
Create a changelog from commits since last releaseGenerate changelog for all commits from the past weekCreate release notes for version 2.5.0Create a changelog from commits since last releaseGenerate changelog for all commits from the past weekCreate release notes for version 2.5.0With Specific Date Range
指定日期范围
Create a changelog for all commits between March 1 and March 15Create a changelog for all commits between March 1 and March 15With Custom Guidelines
自定义规范
Create a changelog for commits since v2.4.0, using my changelog
guidelines from CHANGELOG_STYLE.mdCreate a changelog for commits since v2.4.0, using my changelog
guidelines from CHANGELOG_STYLE.mdExample Output
示例输出
markdown
undefinedmarkdown
undefinedUpdates - Week of March 10, 2024
更新日志 - 2024年3月10日当周
✨ New Features
✨ 新功能
-
Team Workspaces: Create separate workspaces for different projects. Invite team members and keep everything organized.
-
Keyboard Shortcuts: Press ? to see all available shortcuts. Navigate faster without touching your mouse.
-
团队工作区:为不同项目创建独立工作区。邀请团队成员,实现内容有序管理。
-
键盘快捷键:按?查看所有可用快捷键。无需鼠标即可快速导航。
🔧 Improvements
🔧 功能改进
- Faster Sync: Files now sync 2x faster across devices
- Better Search: Search now includes file contents, not just titles
- 同步提速:文件跨设备同步速度提升2倍
- 搜索优化:搜索范围覆盖文件内容,而非仅标题
🐛 Fixes
🐛 Bug修复
- Fixed issue where large images wouldn't upload
- Resolved timezone confusion in scheduled posts
- Corrected notification badge count
undefined- 修复大图片无法上传的问题
- 解决定时发布中的时区混乱问题
- 修正通知徽章计数错误
undefinedReference Files
参考文件
For detailed documentation patterns and guidance, load reference files as needed:
- - API documentation patterns, OpenAPI specifications, SDK generation, versioning strategies, and code examples
references/api_docs.md - - Technical writing best practices, user guide structure, README templates, architecture documentation, and content organization
references/technical_writing.md - - Changelog generation patterns, commit categorization, user-friendly transformation, and release note best practices
references/changelogs.md - - REST API documentation template with endpoints, authentication, webhooks, and SDK examples
references/API_DOCUMENTATION.template.md - - Changelog template following Keep a Changelog format with SemVer
references/CHANGELOG.template.md - - Design specification template for feature planning, technical design, and implementation approach
references/DESIGN_SPEC.template.md - - ADR template for documenting significant architectural decisions with context and consequences
references/ARCHITECTURE_DECISION_RECORD.template.md - - Migration guide template for version upgrades, breaking changes, and upgrade paths
references/MIGRATION_GUIDE.template.md
When working on specific documentation types, load the appropriate reference file.
如需详细的文档模式与指导,可按需加载以下参考文件:
- - API文档模式、OpenAPI规范、SDK生成、版本策略及代码示例
references/api_docs.md - - 技术写作最佳实践、用户指南结构、README模板、架构文档及内容组织方法
references/technical_writing.md - - 变更日志生成模式、提交分类、用户友好化转换及发布说明最佳实践
references/changelogs.md - - REST API文档模板,包含端点、认证、Webhook及SDK示例
references/API_DOCUMENTATION.template.md - - 遵循Keep a Changelog格式与SemVer语义化版本的变更日志模板
references/CHANGELOG.template.md - - 用于功能规划、技术设计及实现方案的设计规格书模板
references/DESIGN_SPEC.template.md - - 用于记录重要架构决策(含背景及影响)的ADR模板
references/ARCHITECTURE_DECISION_RECORD.template.md - - 用于版本升级、破坏性变更及升级路径的迁移指南模板
references/MIGRATION_GUIDE.template.md
处理特定类型文档时,请加载对应的参考文件。
Best Practices
最佳实践
Documentation Quality
文档质量
- Real Examples: Use actual working examples, not placeholders
- Error Cases: Document error responses with examples
- Authentication: Clear authentication setup instructions
- Versioning: Document versioning strategy and migration paths
- Testing: Test all examples to ensure they work
- 真实示例:使用可运行的真实示例,而非占位符
- 错误场景:记录错误响应及示例
- 认证说明:清晰的认证设置步骤
- 版本管理:记录版本策略及迁移路径
- 测试验证:测试所有示例确保可正常运行
Developer Experience
开发者体验
- Quick Start: Provide 5-minute quick start guide
- Interactive: Use tools like Postman or Swagger UI
- Searchable: Make documentation searchable
- Up-to-Date: Keep documentation current with API changes
- Feedback: Include ways for developers to provide feedback
- 快速入门:提供5分钟快速入门指南
- 交互式体验:使用Postman或Swagger UI等工具
- 可搜索性:确保文档支持搜索
- 实时更新:保持文档与API变更同步
- 反馈渠道:提供开发者反馈途径
Writing Guidelines
写作规范
- Clarity: Use simple, clear language
- Structure: Organize with clear headings
- Examples: Include real, working examples
- Testing: Test all instructions yourself
- Feedback: Include ways for users to provide feedback
- 清晰性:使用简洁明了的语言
- 结构化:通过清晰的标题组织内容
- 示例化:包含真实可运行的示例
- 自我测试:亲自测试所有说明步骤
- 反馈机制:提供用户反馈渠道
Content Organization
内容组织
- Hierarchy: Use clear heading structure
- Navigation: Include table of contents for long docs
- Search: Make content searchable
- Cross-references: Link related sections
- Updates: Keep documentation current
- 层级结构:使用清晰的标题层级
- 导航支持:长文档包含目录
- 搜索功能:确保内容可搜索
- 交叉引用:关联相关章节
- 及时更新:保持文档内容最新
Accessibility
易访问性
- Plain Language: Avoid unnecessary jargon
- Structure: Use semantic HTML/Markdown
- Images: Include alt text for images
- Formatting: Use consistent formatting
- Examples: Provide multiple examples for different skill levels
- 平实语言:避免不必要的行话
- 语义结构:使用语义化HTML/Markdown
- 图片优化:为图片添加替代文本
- 格式统一:使用一致的格式
- 多示例支持:为不同技能水平用户提供多版本示例
Changelog Best Practices
变更日志最佳实践
- Run from git repository root
- Specify date ranges for focused changelogs
- Use CHANGELOG_STYLE.md for consistent formatting
- Review and adjust the generated changelog before publishing
- Save output directly to CHANGELOG.md
- 在Git仓库根目录运行
- 指定日期范围生成聚焦型变更日志
- 使用CHANGELOG_STYLE.md保持格式一致
- 发布前审核并调整生成的变更日志
- 直接将输出保存至CHANGELOG.md
Related Use Cases
相关适用场景
- API specification creation
- SDK generation
- Developer onboarding
- API integration guides
- Version migration documentation
- Interactive API exploration
- User documentation
- Developer guides
- Architecture documentation
- Tutorial creation
- Content improvement
- Creating GitHub release notes
- Writing app store update descriptions
- Generating email updates for users
- Creating social media announcement posts
- API规范创建
- SDK生成
- 开发者入门
- API集成指南
- 版本迁移文档
- 交互式API探索
- 用户文档制作
- 开发者指南
- 架构文档
- 教程创建
- 内容优化
- GitHub发布说明编写
- 应用商店更新描述撰写
- 用户邮件更新生成
- 社交媒体公告帖创建