Community编程与开发github.com

用户文档写作

用户面向文档的文体规范——语气、范围、结构以及需要省略的内容。在编写、编辑或审查任何用户用来学习使用工具的文档(帮助中心文章、入门指南、教程、功能文档、README使用部分、应用内帮助、发布说明或常见问题条目)时使用此技能。

用户文档写作 是什么?

该技能定义了一套严谨的用户文档写作规范,核心原则是“为使用工具的人写作,而非为构建工具的人写作”。它强调使用日常英语、第二人称现在时主动语态,避免营销词汇和同义词替换造成概念混淆。在内容范围上,技能要求严格排除实现细节(如数据库、队列、框架等),只保留用户需要知道的、影响其行为决策的可观测信息。结构方面,技能提倡按用户目标组织文档,每页独立回答一个问题,前置前置条件和限制,并专注推荐一条操作路径。此外,技能特别强调覆盖“不快乐路径”(错误处理、功能限制、破坏性操作的警告),并通过真实示例、避免时效性语言、逐字验证步骤等策略防止文档腐烂。该技能适用于帮助中心、教程、README、发布说明等用户文档,但不适用于内部工程文档、架构设计、RFC或代码注释。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/callstackincubator/agent-skills/tree/main/skills/writing-user-docs

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

面向用户的文档

为使用工具的人写作,而不是为构建工具的人。

“用户”指的是使用该工具的人。对于应用来说,那是最终用户。对于库来说,那是安装它的开发者。无论哪种情况,他们都不是实现它的人,文档应当反映这一点。

语气

日常英语——就像向坐在旁边的同事解释那样。正式不会增加权威,只会增加距离和篇幅。

  • 第二人称、主动、现在时。 “点击保存”,而不是“应点击保存按钮”或“用户随后将能够保存”。
  • 删掉“只需”、“简单”、“容易”、“显然”。 在事情顺利时它们毫无帮助,在事情不顺时读起来像嘲讽。
  • 不要使用营销形容词。 “强大”、“无缝”、“稳健”、“直观”——这是作者在赞美产品。读者正忙于任务,对此毫不在意。
  • 每个概念只用一个术语,并与界面完全一致。 如果按钮叫“工作区”,文档中绝不要说“项目”或“团队空间”。用词多样是好散文,却是糟糕的文档——每个同义词都会被视为一个新概念。

范围:涵盖什么

只包含读者使用工具所需的内容。默认原则是省略多余内容。

实现细节一律不写。 不包括数据库、队列、框架、算法名称、内部服务、为上线所做的重构。判断标准不是“这技术性太强了吗?”——而是**“没有它,读者会感到困惑,或者做出错误决定吗?”**

可观测的行为即使听起来技术性很强,也应归入文档中:速率限制、离线行为、同步的内容和时机、文件存储位置、冲突时发生什么、重新安装后保持不变的内容。产生这些行为的内部机制则不需要。

简洁不意味着简短,而是没有废话。 每一句话都说明自己存在的理由。一个详尽的故障排除部分如果没有多余的赘述,仍然是简洁的——而一个两行的页面如果其中一行是欢迎语,则显得冗长。删除前言、对标题的重复说明以及“在本文章中你将学到”。

结构

  • 按用户目标组织,而不是按功能或屏幕。 标题应当是用户想做的事——“与团队外的人分享报告”——而不是名词如“分享模块”。
  • 先给出结果,再列出步骤。 在读者投入精力执行步骤1之前,需要确认他们是否在正确的页面上。
  • 前置条件和限制放在最前面。 需要的套餐、权限、平台、文件大小上限。在第6步才发现阻碍是最糟糕的时刻。
  • 每个页面回答一个问题,并独立成篇。 大多数读者是通过搜索或深层链接到达的,从来不是从第1页开始。假设没有人读过上一页;使用链接而不是假设读者已经知道。
  • 只选择一条路径。 当存在三种方式时,只记录推荐的一种。替代方案在最后加简短注释,或者不写。

覆盖不快乐路径

这是最容易被跳过、但人们实际会搜索的部分。

  • 记录失败情况:错误信息的内容、原因以及下一步操作。
  • 说明功能不做的事情,当用户容易错误地认为它做得到时。这比处理一个支持工单更便宜。
  • 在破坏性操作前发出警告,而不是之后。 警告放在该步骤之前。

保持文档不过时

  • 使用包含真实数据的真实示例。 不要用foo、test123或Lorem Ipsum。示例应可直接复制粘贴,并产生所示结果。
  • 避免时效性语言。 “新”、“最近”、“当前”、“即将推出”——这些都会悄悄失效。路线图承诺也一样。
  • 严格按照步骤验证每个过程。 如果有人逐字逐句执行却无法完成,那是文档出了问题——而不是读者的问题。

发布前

通读草稿一遍,仅关注以下几点:

  1. 读者完成任务的任何不需要的内容 → 删除。
  2. 任何关于内部工作原理的内容 → 删除,除非行为依赖于它。
  3. 任何你不会大声说出来的句子 → 重写。
  4. 当出现问题时会发生什么 → 这个问题有答案了吗?

Individual skills in this repo

This repo contains 15 individual skills — each has its own dedicated page.

agent-device

Automates interactions for Apple-platform apps (iOS, tvOS, macOS) and Android devices. Use when navigating apps, taking snapshots/screenshots, tapping, typing, scrolling, or extracting UI info across mobile, TV, and desktop targets.

assess-react-native-migration

Assesses whether and how an existing mobile product should migrate to React Native. Use when auditing one or more product repositories for migration readiness, including products whose iOS, Android, and other clients live in separate directories or repositories; choosing brownfield, greenfield, or a checkpoint-based path; defining a representative trial; or preparing a baseline and ROI decision before implementation. When product scope or material evidence is unavailable, grills the stakeholder with exactly one question per turn instead of sending a questionnaire.

callstackincubator/github

GitHub patterns using gh CLI for pull requests, stacked PRs, code review, branching strategies, and repository automation. Use when working with GitHub PRs, merging strategies, or repository management tasks.

callstackincubator/validate-skills

Validates skills in this repo against agentskills.io spec and Claude Code best practices. Use via /validate-skills command.

create-react-native-library

Scaffolds React Native libraries with create-react-native-library for standalone libraries or local native modules and views. Use when creating or working on React Native libraries or adding native functionality in an existing app.

dogfood

Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", or "test this app" on mobile. Produces a structured report with reproducible evidence: screenshots, optional repro videos, and detailed steps for every issue.

github-actions

GitHub Actions workflow patterns for React Native iOS simulator and Android emulator cloud builds with downloadable artifacts. Use when setting up CI build pipelines or downloading GitHub Actions artifacts via gh CLI and GitHub API.

react-native-best-practices

Provides React Native performance optimization guidelines for FPS, TTI, bundle size, memory leaks, re-renders, and animations. Applies to tasks involving Hermes optimization, JS thread blocking, bridge overhead, FlashList, native modules, or debugging jank and frame drops.

react-native-brownfield-migration

Implements an accepted incremental brownfield migration from native iOS or Android to React Native or Expo using @callstack/react-native-brownfield. Use after the brownfield path has been selected, when setting up the integration, packaging XCFramework or AAR artifacts, or adding React Native surfaces to native hosts.

react-native-testing

Write tests using React Native Testing Library (RNTL) v13 and v14 (`@testing-library/react-native`). Use when writing, reviewing, or fixing React Native component tests. Covers: render, screen, queries (getBy/getAllBy/queryBy/findBy), Jest matchers, userEvent, fireEvent, waitFor, and async patterns. Supports v13 (React 18, sync render) and v14 (React 19+, async render). Triggers on: test files for React Native components, RNTL imports, mentions of "testing library", "write tests", "component tests", or "RNTL".

react-native-tv-best-practices

Reviews React Native TV apps for focus/D-pad navigation, 10-foot UI layout, TV playback/DRM integration, low-memory TV performance, and TV accessibility. Use when building, debugging, or reviewing react-native-tvos, Expo TV, Amazon Vega/Kepler, or React Native web TV targets where the issue depends on remote input, TV focus, TV packaging, TV hardware, or TV playback constraints.

react-navigation

Provides React Navigation UI patterns for stacks, tabs, drawers etc. Use when building navigation UIs with React Navigation, configuring headers, bottom sheets or handling safe areas and insets.

upgrading-react-native

Upgrades React Native apps to newer versions by applying rn-diff-purge template diffs, updating package.json dependencies, migrating native iOS and Android configuration, resolving CocoaPods and Gradle changes, and handling breaking API updates. Use when upgrading React Native, bumping RN version, updating from RN 0.x to 0.y, or migrating Expo SDK alongside a React Native upgrade.

validate-skills

Validates skills in this repo against agentskills.io spec and Claude Code best practices. Use via /validate-skills command.

vercel-react-native-skills

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

相关技能