专业操作指南写作模板
简介
基于 Diataxis 框架的 How-To 文档写作技能,帮助技术写作者创建目标导向、步骤清晰的操作指南,提升文档实用性和用户完成率。
原始描述
How-To guide patterns for documentation - task-oriented guides for users with specific goals. Use when writing a how-to/howto guide, task guide, procedural g...
通过你的 Agent 添加
安装目录:howto-docs/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
本技能提供一套完整的 How-To 指南写作框架,专为目标明确的任务型文档设计。使用者需遵循固定的模板结构:以 "How to [目标]" 命名标题,依次编写前置条件、分步骤操作、验证方法、故障排查和后续指引。技能强调与 docs-style 核心写作规范的配合使用,并通过 Diataxis 指南针工具确保文档类型选择正确(区分于教程、参考文档和概念解释)。
核心写作流程包括:锁定具体目标 → 罗列完整前置条件 → 拆分原子步骤 → 设定可观察的成功标准 → 补充常见故障方案。每个步骤须以动词开头,仅包含单一动作,并在关键节点展示预期结果。
显著优点
- 框架成熟度高:直接采用业界验证的 Diataxis 文档分类法,避免文档类型混淆导致的用户迷失。
- 实用导向明确:严格区分 "告知如何做" 与 "解释为何如此",确保用户能快速达成目标而非陷入概念学习。
- 模板即拿即用:提供完整的 Markdown 模板和组件代码(Steps、Accordion、CodeGroup 等),显著降低写作启动成本。
- 质量门禁清晰:设定 "Hard gates" 五道硬性检查(目标锁定、前置条件闭合、步骤原子化、成功可观测、清单完成),从源头保障文档质量。
- 用户视角转换:强制要求从产品中心语言转向用户中心表达,提升文档可读性和亲和力。
潜在缺点与局限性
- 适用范围受限:仅适用于任务型 How-To 场景,无法覆盖教程、参考文档或概念解释等其他文档类型,需配合其他技能使用。
- 依赖外部技能:核心写作原则依赖
docs-style 技能,类型判断依赖 Diataxis 指南针,单独使用功能不完整。
- 组件系统绑定:模板中大量使用了特定组件语法(如
<Steps>、<AccordionGroup>),可能与目标平台的文档系统不兼容,存在迁移成本。
- 灵活性不足:严格的 "How to" 标题格式和步骤原子化要求,对于复杂流程或探索性任务可能显得过于僵化。
适合的目标群体
- 技术文档工程师:需要系统性地为产品构建操作指南体系的专职写作者
- 开发者体验(DX)团队:负责优化开发者上手路径、降低支持工单量的工程师
- 开源项目维护者:希望为社区贡献标准化、高质量文档的项目 owner
- SaaS 产品经理:需要编写清晰配置指南、降低客户成功团队负担的产品人员
常规使用风险
- 版本依赖风险:组件语法和模板结构可能随
docs-style 或平台更新而变化,长期维护需关注上游变更。
- 过度简化风险:严格遵循 "单步单动作" 原则可能导致复杂流程被过度拆分,反而增加用户阅读负担。
- 前置条件遗漏:"Hard gates" 虽要求闭合前置条件,但实际执行中仍可能因环境差异遗漏特定依赖,导致用户中断。
- 类型误判风险:若未正确使用 Diataxis 指南针,可能将本应作为教程或参考文档的内容误写为 How-To,造成用户期望错位。
- 适用范围受限:仅适用于任务型 How-To 场景,无法覆盖教程、参考文档或概念解释等其他文档类型,需配合其他技能使用。
- 依赖外部技能:核心写作原则依赖
docs-style技能,类型判断依赖 Diataxis 指南针,单独使用功能不完整。 - 组件系统绑定:模板中大量使用了特定组件语法(如
<Steps>、<AccordionGroup>),可能与目标平台的文档系统不兼容,存在迁移成本。 - 灵活性不足:严格的 "How to" 标题格式和步骤原子化要求,对于复杂流程或探索性任务可能显得过于僵化。
适合的目标群体
- 技术文档工程师:需要系统性地为产品构建操作指南体系的专职写作者
- 开发者体验(DX)团队:负责优化开发者上手路径、降低支持工单量的工程师
- 开源项目维护者:希望为社区贡献标准化、高质量文档的项目 owner
- SaaS 产品经理:需要编写清晰配置指南、降低客户成功团队负担的产品人员
常规使用风险
- 版本依赖风险:组件语法和模板结构可能随
docs-style 或平台更新而变化,长期维护需关注上游变更。
- 过度简化风险:严格遵循 "单步单动作" 原则可能导致复杂流程被过度拆分,反而增加用户阅读负担。
- 前置条件遗漏:"Hard gates" 虽要求闭合前置条件,但实际执行中仍可能因环境差异遗漏特定依赖,导致用户中断。
- 类型误判风险:若未正确使用 Diataxis 指南针,可能将本应作为教程或参考文档的内容误写为 How-To,造成用户期望错位。
- 版本依赖风险:组件语法和模板结构可能随
docs-style或平台更新而变化,长期维护需关注上游变更。 - 过度简化风险:严格遵循 "单步单动作" 原则可能导致复杂流程被过度拆分,反而增加用户阅读负担。
- 前置条件遗漏:"Hard gates" 虽要求闭合前置条件,但实际执行中仍可能因环境差异遗漏特定依赖,导致用户中断。
- 类型误判风险:若未正确使用 Diataxis 指南针,可能将本应作为教程或参考文档的内容误写为 How-To,造成用户期望错位。
技能正文
name: howto-docs
description: "How-To guide patterns for documentation - task-oriented guides for users with specific goals. Use when writing a how-to/howto guide, task guide, procedural guide, step-by-step guide, or how-to documentation. Builds on the docs-style core writing principles."
user-invocable: false
How-To Documentation Skill
This skill provides patterns for writing effective How-To guides in documentation. How-To guides are task-oriented content for users who have a specific goal in mind.
Dependency: Use this skill with docs-style for core writing principles. To confirm a how-to is the right type — rather than a tutorial, reference, or explanation — see docs-style/references/diataxis-compass.md.
Purpose & Audience
Target readers:
- Users with a specific goal they want to accomplish
- Assumes some familiarity with the product (not complete beginners)
- Looking for practical, actionable steps
- Want to get things done, not learn concepts
How-To guides are NOT:
- Tutorials (which teach through exploration)
- Explanations (which provide understanding)
- Reference docs (which describe the system)
How-To Guide Template
Use this structure for all how-to guides:
---
title: "How to [achieve specific goal]"
description: "Learn how to [goal] using [product/feature]"
---
# How to [Goal]
Brief intro (1-2 sentences): what you'll accomplish and why it's useful.
## Prerequisites
- [What user needs before starting]
- [Required access, tools, or setup]
- [Any prior knowledge assumed]
## Steps
### 1. [Action verb] the [thing]
[Clear instruction with expected outcome]
<Note>
[Optional tip or important context]
</Note>
### 2. [Next action]
[Continue with clear, single-action steps]
```bash
# Example command or code if needed
3. [Continue numbering]
[Each step should be one discrete action]
Verify it worked
[How to confirm success - what should user see/experience?]
Troubleshooting
Next steps
- [Related how-to guide 1]
- [Related how-to guide 2]
- [Deeper dive reference doc]
## Writing Principles
### Title Conventions
- **Always start with "How to"** - makes the goal immediately clear
- Use active verbs: "How to configure...", "How to deploy...", "How to migrate..."
- Be specific: "How to add SSO authentication" not "How to set up auth"
### Step Structure
1. **One action per step** - if you write "and", consider splitting
2. **Start with action verbs**: Click, Navigate, Enter, Select, Run, Create
3. **Show expected outcomes** after key steps:
```markdown
### 3. Save the configuration
Click **Save**. You should see a success message: "Configuration updated."
Minimize Context
- Don't explain why things work - just show how to do them
- Link to explanations for users who want deeper understanding
- Keep each step focused on the immediate action
Use Conditional Imperatives and Address the Real World
- [Related how-to guide 1]
- [Related how-to guide 2]
- [Deeper dive reference doc]
## Writing Principles
### Title Conventions
- **Always start with "How to"** - makes the goal immediately clear
- Use active verbs: "How to configure...", "How to deploy...", "How to migrate..."
- Be specific: "How to add SSO authentication" not "How to set up auth"
### Step Structure
1. **One action per step** - if you write "and", consider splitting
2. **Start with action verbs**: Click, Navigate, Enter, Select, Run, Create
3. **Show expected outcomes** after key steps:
```markdown
### 3. Save the configuration
Click **Save**. You should see a success message: "Configuration updated."
Minimize Context
Unlike a tutorial — which controls a single, guaranteed path — a how-to meets the user in the messy real world. Diataxis frames steps as conditional imperatives: "If you want X, do Y." This respects that the reader arrives with their own context and goal.
- Branch where reality branches. When the right action depends on the user's situation, say so ("If you deploy to staging, set
ENV=staging; for production, use…") rather than pretending one path fits all. - Prepare for the unexpected. Note the failure modes and detours a competent user will actually hit (the Troubleshooting section is where these live).
- Omit the unnecessary. A how-to aims at practical usability, not completeness. Leave out anything that doesn't move the reader toward the goal; link to Reference for exhaustive detail.
Name the Guide by What It Achieves
Titles state exactly what the guide accomplishes, using the user's goal: "How to integrate Stripe payments," not "Payments" or "The Stripe module." If you cannot name the concrete outcome, the scope is not yet clear enough to write.
User Perspective
Write from the user's perspective, not the product's:
| Avoid (product-centric) | Prefer (user-centric) |
|---|---|
| "The API accepts..." | "Send a request to..." |
| "The system will..." | "You'll see..." |
| "This feature allows..." | "You can now..." |
Prerequisites Section
Be explicit about what's needed:
## Prerequisites
- An active account with admin permissions
- API key generated from Settings > API
- Node.js v18 or later installed
- Completed the [initial setup guide](/getting-started)
Components for How-To Guides
Steps Component
For numbered procedures, use a Steps component:
<Steps>
<Step title="Create a new project">
Navigate to the dashboard and click **New Project**.
</Step>
<Step title="Configure settings">
Enter your project name and select a region.
</Step>
<Step title="Deploy">
Click **Deploy** to launch your project.
</Step>
</Steps>
Code Groups for Multiple Options
When showing different approaches:
<CodeGroup>
```bash npm
npm install @company/sdk
yarn add @company/sdk
pnpm add @company/sdk
Callouts for Important Information
<Warning>
This action cannot be undone. Make sure to backup your data first.
</Warning>
<Note>
This step may take 2-3 minutes to complete.
</Note>
<Tip>
You can also use keyboard shortcut Cmd+K for faster navigation.
</Tip>
Expandable Sections
<Warning>
This action cannot be undone. Make sure to backup your data first.
</Warning>
<Note>
This step may take 2-3 minutes to complete.
</Note>
<Tip>
You can also use keyboard shortcut Cmd+K for faster navigation.
</Tip>
For optional details that shouldn't interrupt flow:
<Expandable title="Advanced options">
If you need custom configuration, you can also set:
- `timeout`: Request timeout in milliseconds
- `retries`: Number of retry attempts
</Expandable>
Example How-To Guide
---
title: "How to set up webhook notifications"
description: "Learn how to configure webhooks to receive real-time event notifications"
---
# How to Set Up Webhook Notifications
Configure webhooks to receive instant notifications when events occur in your account. This enables real-time integrations with your existing tools.
## Prerequisites
- Admin access to your account
- A publicly accessible HTTPS endpoint to receive webhooks
- Completed the [authentication setup](/getting-started/auth)
## Steps
<Steps>
<Step title="Navigate to webhook settings">
Go to **Settings** > **Integrations** > **Webhooks**.
</Step>
<Step title="Add a new webhook endpoint">
Click **Add Endpoint** and enter your webhook URL:
```
https://your-domain.com/webhooks/receiver
```
<Note>
Your endpoint must use HTTPS and be publicly accessible.
</Note>
</Step>
<Step title="Select events to subscribe">
Choose which events should trigger notifications:
- `user.created` - New user sign up
- `payment.completed` - Successful payment
- `subscription.cancelled` - Subscription ended
Select at least one event to continue.
</Step>
<Step title="Save and get your signing secret">
Click **Create Webhook**. Copy the signing secret shown - you'll need this to verify webhook authenticity.
<Warning>
Store the signing secret securely. It won't be shown again.
</Warning>
</Step>
</Steps>
## Verify it worked
Send a test event by clicking **Send Test** next to your webhook. You should receive a POST request at your endpoint with this structure:
```json
{
"event": "test.webhook",
"timestamp": "2024-01-15T10:30:00Z",
"data": {}
}
---
title: "How to set up webhook notifications"
description: "Learn how to configure webhooks to receive real-time event notifications"
---
# How to Set Up Webhook Notifications
Configure webhooks to receive instant notifications when events occur in your account. This enables real-time integrations with your existing tools.
## Prerequisites
- Admin access to your account
- A publicly accessible HTTPS endpoint to receive webhooks
- Completed the [authentication setup](/getting-started/auth)
## Steps
<Steps>
<Step title="Navigate to webhook settings">
Go to **Settings** > **Integrations** > **Webhooks**.
</Step>
<Step title="Add a new webhook endpoint">
Click **Add Endpoint** and enter your webhook URL:
```
https://your-domain.com/webhooks/receiver
```
<Note>
Your endpoint must use HTTPS and be publicly accessible.
</Note>
</Step>
<Step title="Select events to subscribe">
Choose which events should trigger notifications:
- `user.created` - New user sign up
- `payment.completed` - Successful payment
- `subscription.cancelled` - Subscription ended
Select at least one event to continue.
</Step>
<Step title="Save and get your signing secret">
Click **Create Webhook**. Copy the signing secret shown - you'll need this to verify webhook authenticity.
<Warning>
Store the signing secret securely. It won't be shown again.
</Warning>
</Step>
</Steps>
## Verify it worked
Send a test event by clicking **Send Test** next to your webhook. You should receive a POST request at your endpoint with this structure:
```json
{
"event": "test.webhook",
"timestamp": "2024-01-15T10:30:00Z",
"data": {}
}
Check your endpoint logs to confirm receipt.
Troubleshooting
Next steps
## Hard gates (before publishing)
Complete in order. Do not treat the doc as ready until each gate passes.
1. **Goal lock** — Title starts with `How to` and names a specific outcome (verb + object). **Pass:** a reader can state what they will have done after following the guide, in one sentence, without reading the steps.
2. **Prerequisites closed** — Everything required before step 1 is listed (access, tools, versions, prior guides). **Pass:** you cannot name a blocker that belongs in Prerequisites but is missing from the list.
3. **Steps are atomic** — Each numbered step is one primary action; split if you would join with “and then” for unrelated actions. **Pass:** each step has a clear next action; risky steps (save, deploy, delete) state what the user should see after.
4. **Success is observable** — The “Verify it worked” section names concrete signals (UI text, exit code, HTTP status, file path, log line). **Pass:** the reader can confirm success without interpreting vague “it works.”
5. **Checklist complete** — Run the checklist below; every item is honestly yes or the guide is not ready to ship. **Pass:** all boxes checked.
## Checklist for How-To Guides
Before publishing, verify:
- [ ] Title starts with "How to" and describes a specific goal
- [ ] Prerequisites section lists all requirements
- [ ] Each step is a single, clear action
- [ ] Action verbs start each step (Click, Enter, Select, Run)
- [ ] Expected outcomes shown after key steps
- [ ] Verification section explains how to confirm success
- [ ] Troubleshooting covers common issues
- [ ] Next steps link to related content
- [ ] No unnecessary explanations - links to concepts instead
- [ ] Written from user perspective, not product perspective
## When to Use How-To vs Other Doc Types
| User's mindset | Doc type | Example |
|---------------|----------|---------|
| "I want to learn" | Tutorial | "Getting started with our API" |
| "I want to do X" | How-To | "How to configure SSO" |
| "I want to understand" | Explanation | "How our caching works" |
| "I need to look up Y" | Reference | "API endpoint reference" |
For the full compass procedure and the other type distinctions, see [docs-style/references/diataxis-compass.md](../docs-style/references/diataxis-compass.md).
## Related Skills
- **[docs-style](../docs-style/SKILL.md)**: Core writing conventions and components
- **[Diataxis compass](../docs-style/references/diataxis-compass.md)**: Type selection, the 2×2 map, and the quality model
- **[tutorial-docs](../tutorial-docs/SKILL.md)**: Tutorial patterns for learning-oriented content
- **[reference-docs](../reference-docs/SKILL.md)**: Reference documentation patterns
- **[explanation-docs](../explanation-docs/SKILL.md)**: Conceptual documentation patterns
## Hard gates (before publishing)
Complete in order. Do not treat the doc as ready until each gate passes.
1. **Goal lock** — Title starts with `How to` and names a specific outcome (verb + object). **Pass:** a reader can state what they will have done after following the guide, in one sentence, without reading the steps.
2. **Prerequisites closed** — Everything required before step 1 is listed (access, tools, versions, prior guides). **Pass:** you cannot name a blocker that belongs in Prerequisites but is missing from the list.
3. **Steps are atomic** — Each numbered step is one primary action; split if you would join with “and then” for unrelated actions. **Pass:** each step has a clear next action; risky steps (save, deploy, delete) state what the user should see after.
4. **Success is observable** — The “Verify it worked” section names concrete signals (UI text, exit code, HTTP status, file path, log line). **Pass:** the reader can confirm success without interpreting vague “it works.”
5. **Checklist complete** — Run the checklist below; every item is honestly yes or the guide is not ready to ship. **Pass:** all boxes checked.
## Checklist for How-To Guides
Before publishing, verify:
- [ ] Title starts with "How to" and describes a specific goal
- [ ] Prerequisites section lists all requirements
- [ ] Each step is a single, clear action
- [ ] Action verbs start each step (Click, Enter, Select, Run)
- [ ] Expected outcomes shown after key steps
- [ ] Verification section explains how to confirm success
- [ ] Troubleshooting covers common issues
- [ ] Next steps link to related content
- [ ] No unnecessary explanations - links to concepts instead
- [ ] Written from user perspective, not product perspective
## When to Use How-To vs Other Doc Types
| User's mindset | Doc type | Example |
|---------------|----------|---------|
| "I want to learn" | Tutorial | "Getting started with our API" |
| "I want to do X" | How-To | "How to configure SSO" |
| "I want to understand" | Explanation | "How our caching works" |
| "I need to look up Y" | Reference | "API endpoint reference" |
For the full compass procedure and the other type distinctions, see [docs-style/references/diataxis-compass.md](../docs-style/references/diataxis-compass.md).
## Related Skills
- **[docs-style](../docs-style/SKILL.md)**: Core writing conventions and components
- **[Diataxis compass](../docs-style/references/diataxis-compass.md)**: Type selection, the 2×2 map, and the quality model
- **[tutorial-docs](../tutorial-docs/SKILL.md)**: Tutorial patterns for learning-oriented content
- **[reference-docs](../reference-docs/SKILL.md)**: Reference documentation patterns
- **[explanation-docs](../explanation-docs/SKILL.md)**: Conceptual documentation patterns
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。