docs-writer
它能做什么
这个技能让 AI 成为撰写文档、README 和指南的谨慎技术作者。它会在写作前检查代码,以确保文档准确无误。适合维护文档文件的开发者和团队。
适用场景
- ✓当你需要撰写新的指南、README 或文档页面时。
- ✓当你希望审阅并改进一个已有的 markdown 文件时。
- ✓当某个命令或功能发生变化,文档需要更新时。
技能链接
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(development)/docs-writer/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请审阅文档文件夹中的安装指南,对照代码检查它,并改进措辞。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会先明确请求,阅读相关代码和现有文档,制定计划,然后按照项目的指导原则撰写或编辑文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
docs-writer skill instructions
As an expert technical writer and editor, your goal is to produce and refine documentation that is accurate, clear, consistent, and easy for users to understand. You must adhere to the documentation contribution process outlined in CONTRIBUTING.md.
Step 1: Understand the goal and create a plan
- Clarify the request: Fully understand the user's documentation request. Identify the core feature, command, or concept that needs work.
- Differentiate the task: Determine if the request is primarily for writing new content or editing existing content. If the request is ambiguous (e.g., "fix the docs"), ask the user for clarification.
- Formulate a plan: Create a clear, step-by-step plan for the required changes.
Step 2: Investigate and gather information
- Read the code: Thoroughly examine the relevant codebase, primarily within the
packages/directory, to ensure your work is backed by the implementation and to identify any gaps. - Identify files: Locate the specific documentation files in the
docs/directory that need to be modified. Always read the latest version of a file before you begin work. - Check for connections: Consider related documentation. If you change a command's behavior, check for other pages that reference it. If you add a new page, check if
docs/sidebar.jsonneeds to be updated. Make sure all links are up to date.
Step 3: Write or edit the documentation
- Follow the style guide: Adhere to the rules in
references/style-guide.md. Read this file to understand the project's documentation standards. - Ensure the new documentation accurately reflects the features in the code.
- Use
replaceandwrite_file: Use file system tools to apply your planned changes. For small edits,replaceis preferred. For new files or large rewrites,write_fileis more appropriate.
Sub-step: Editing existing documentation (as clarified in Step 1)
- Gaps: Identify areas where the documentation is incomplete or no longer reflects existing code.
- Tone: Ensure the tone is active and engaging, not passive.
- Clarity: Correct awkward wording, spelling, and grammar. Rephrase sentences to make them easier for users to understand.
- Consistency: Check for consistent terminology and style across all edited documents.
Step 4: Verify and finalize
- Review your work: After making changes, re-read the files to ensure the documentation is well-formatted, and the content is correct based on existing code.
- Link verification: Verify the validity of all links in the new content. Verify the validity of existing links leading to the page with the new content or deleted content.
- Offer to run npm format: Once all changes are complete, offer to run the project's formatting script to ensure consistency by proposing the command:
npm run format
常见问题
它会撰写代码注释吗?
不会。该技能不涵盖行内代码注释和 API 参考的自动生成。
它会先检查代码吗?
会。它会阅读实现,使文档与软件的实际行为相符。
它会遵守我项目的规则吗?
会。如果项目中存在贡献指南,它会遵循该指南。
详情
作者的原始描述
Write, review, and edit documentation files with consistent structure, tone, and technical accuracy. Use when creating docs, reviewing markdown files, writing READMEs, updating `/docs` directories, or when user says "write documentation", "review this doc", "improve this README", "create a guide", or "edit markdown". Do NOT use for code comments, inline JSDoc, or API reference generation.
热度
- GitHub 星标
- 7.1k
- 排名
- #13525
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
component-common-domain-detection
7.1k帮你的智能体找出代码库中多个部分重复的业务逻辑,并建议如何合并。
component-flattening-analysis
7.1k帮你的智能体找出位置不当的代码,并整理杂乱的组件文件夹结构,让每个部分都放在应在的位置。
component-identification-sizing
7.1k帮你的智能体梳理代码库的各个组成部分并测量其规模,以找出应首先拆分的模块。
coupling-analysis
7.1k帮你的智能体检查代码库各部分之间的依赖有多紧密,并找出应优先放松的连接。