Community程式設計與開發github.com

撰寫使用者文件

將使用者導向文件(如說明中心文章、入門指南、教學課程、功能說明、README 使用章節、應用程式內說明、發行說明或常見問題集)應遵循的風格、範圍、結構與排除事項。

撰寫使用者文件 是什麼?

此技能定義了一套撰寫使用者導向文件(如說明中心文章、入門指南、教學課程、功能說明、README 使用章節、應用程式內說明、發行說明或常見問題集)的風格與結構規則。其核心原則是從使用者目標出發,而非從實作細節出發:文件應採用第二人稱、主動語態、現在式,僅提供完成任務所需的資訊,並避免行銷詞語、時間相關語言及內部實作細節。內容應以結果為導向,將前提條件與限制置於前端,並涵蓋錯誤處理與未盡事宜。此技能適用於所有主流 AI 代理寫作平台,只要任務涉及為終端使用者或開發者撰寫文件,即便未明確要求風格指引也應觸發;不適用於內部工程文件、架構說明、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 的新對話。

說明文件

使用者導向文件

為使用工具的人而寫,而不是為建立工具的人。

「使用者」指的是任何使用該工具的人。如果是應用程式,就是一般使用者;如果是程式庫,就是安裝它的開發者。不論是哪一種,他們都不是在實作這個工具,文件應反映這一點。

語氣

使用日常英語——就像你對坐在隔壁的同事解釋一樣。正式不會增加權威感,只會增加距離感和字數。

  • 第二人稱、主動語態、現在式。 用「你點擊儲存」,不要用「應點擊儲存按鈕」或「使用者之後將能儲存」。
  • 刪除「只要」、「簡單地」、「容易地」、「很顯然地」。 它們在事情順利時毫無用處,在事情不順時則像在嘲弄。
  • 不要使用行銷形容詞。 「強大的」、「無縫的」、「穩健的」、「直覺的」——這是作者在讚賞產品。讀者正處於任務中途,根本不在乎。
  • 每個概念使用一個術語,且與 UI 完全一致。 如果按鈕標示為工作區,文件就永遠不要使用「專案」或「團隊空間」。改變用詞是良好的文學寫作,卻是不良的文件寫作——每個同義詞都會被視為一個新概念。

範圍:包含哪些內容

只包含讀者使用工具所需的資訊。預設是刪除一切。

實作細節要排除在外。 不包含資料庫、佇列、框架、演算法名稱、內部服務、或為推出功能所進行的重構。檢驗標準不是「這是否技術性?」——而是**「如果沒有這個資訊,讀者是否會感到驚訝,或做出錯誤決定?」**

可觀察的行為即使聽起來很技術性,也符合這個檢驗標準,應該放在文件中:速率限制、離線行為、同步什麼以及何時同步、檔案儲存在哪裡、衝突時會發生什麼、重新安裝後哪些資料會保留。產生這些行為的內部機制則不應包含。

簡潔不等於簡短,而是沒有冗言。 每一句話都要有存在的價值。一個詳盡的疑難排解章節如果沒有任何填料,仍然是簡潔的——而一個只有兩行的頁面,如果其中一行是歡迎訊息,就是冗餘的。刪除前言、對標題的重述,以及「在本文章中你將學到」。

結構

  • 依使用者目標來組織,而不是依功能或畫面。 標題應該是使用者想做的事——例如「與團隊外的人員共享報告」——而不是像「共享模組」這樣的名詞。
  • 先說明結果,再說明步驟。 使用者需要先確認自己來對地方,才能投入時間進行步驟1。
  • 前提條件和限制放在前面。 需要的方案、權限、平台、檔案大小上限。在步驟6才發現阻礙,是最糟糕的時刻。
  • 一個頁面回答一個問題,且獨立存在。 大多數讀者從搜尋結果或深層連結抵達,而不是從第1頁開始。假設沒有人讀過前一頁;使用超連結而不是假設。
  • 只選擇一種方法。 如果存在三種方法,就記錄推薦的那一種。替代方案在結尾用簡短說明帶過,或者完全不提。

涵蓋不順利的情形

這是最常被忽略,卻也是人們真正會搜尋的章節。

  • 記錄失敗情況:錯誤訊息說什麼、原因是什麼、下一步該怎麼做。
  • 說明功能不做什麼,當使用者可能先入為主地認為它會做時。這比一張客服工單更便宜。
  • 在破壞性操作之前提出警告,絕不要事後才說。 警告應放在其所描述的步驟之前。

避免過時

  • 使用真實的範例與看起來像真實的資料。 不要使用 foo、test123 或亂數假文。範例應該可以複製貼上,並產生與所示相同的結果。
  • 不要使用與時間相關的語言。 「新的」、「最近」、「目前」、「即將推出」——這些都會默默地過時。路線圖承諾也是。
  • 逐字操作每個程序。 如果某人照著文字指示卻無法完成,是文件有問題——而不是讀者。

發佈前檢查

閱讀一遍草稿,只專注於以下幾點:

  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.

相關技能