writing-documentation
Best practices for project documentation including README, CONTRIBUTING, CHANGELOG, and Markdown files. Use when updating documentation, writing README sections, or maintaining project docs.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Standards for creating and maintaining clear, consistent project documentation.
Core Philosophy
Documentation should be scannable, actionable, and maintainable. Every section must justify its existence. Verbose documentation is rarely read.
File Standards
README.md
Essential sections (in order): Title/Description, Installation, Usage, Configuration (if applicable), License
Avoid: Lengthy introductions, obvious explanations, feature lists duplicating code, purposeless badges
CONTRIBUTING.md
Essential sections: Development Setup, Code Standards, Testing, Pull Request Process
CHANGELOG.md
Follow Keep a Changelog format. Newest first. Group by: Added, Changed, Deprecated, Removed, Fixed, Security.
Markdown Standards
| Element | Rule |
|---|---|
| Headers | One H1 per file, hierarchical (no skipping), no punctuation |
| Code blocks | Always specify language |
| Lists | Use - for unordered, 1. for ordered, parallel grammar |
| Links | Descriptive text (not "click here"), relative for internal docs |
Writing Style
- Active voice: "Run npm install" not "Dependencies can be installed by running..."
- Imperative mood: "Install the package" not "You should install the package"
- Cut filler: Delete "In order to", "It is important to note that", "This section will explain"
- One idea per sentence
Code Examples
Make examples runnable: complete (not fragments), realistic variable names, show expected output when helpful.
Configuration Docs
Show examples with inline comments, not verbose prose descriptions.
Common Issues
Outdated instructions, missing prerequisites, broken examples, inconsistent formatting, stale information
Maintenance Checklist
- Headers follow hierarchy
- Code blocks specify language
- Links work
- Examples are tested
- Consistent terminology
- Active voice, imperative mood
- Prerequisites stated
Remember
- Scannable beats comprehensive - Walls of text don't get read
- Show don't tell - Examples over explanations
- Test everything - Code examples must work
- Concise beats verbose - Cut unnecessary words
Documentation is for the reader, not the writer.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-02-04
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!