Community程式設計與開發github.com

文件協同撰寫

引導使用者透過結構化工作流程協同撰寫文件。適用於當使用者想要撰寫文件、提案、技術規格、決策文件或類似結構化內容時。此工作流程幫助使用者有效轉移脈絡、透過迭代優化內容,並驗證文件對讀者是否有效。

文件協同撰寫 是什麼?

「文件協同撰寫」AI 技能提供一個三階段的結構化協作工作流程,旨在協助開發者與 AI 共同創建高品質的文件。它支援所有主流 AI 代理平台,如 Claude Code、Claude.ai 和 Cursor。此技能首先引導 AI 從使用者處收集全面的背景脈絡(階段一:脈絡收集),包括文件類型、目標受眾和專案背景。接著,AI 會與使用者迭代地建構文件段落,從腦力激盪、篩選內容到草擬和精煉,確保每個部分都經過深思熟慮(階段二:優化與結構)。最後,為避免內容產生盲點,技能會使用一個全新的 AI 實例(無任何先前對話脈絡)來測試文件,模擬真實讀者初次閱讀的感受,並修正任何歧義或不一致之處(階段三:讀者測試)。此技能在需要撰寫 PRD、設計文件、決策文件、技術規格或 RFC 時特別有用,能顯著提升協作效率和最終文件的清晰度。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/anthropics/skills/tree/main/skills/doc-coauthoring

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

文件協同撰寫工作流程

此技能提供一個結構化的工作流程,引導使用者進行協作文件創作。扮演主動引導的角色,帶領使用者經歷三個階段:脈絡收集、優化與結構,以及讀者測試。

何時提供此工作流程

觸發條件:

  • 使用者提及撰寫文件:「寫一份文件」、「起草提案」、「建立規格」、「寫下來」
  • 使用者提及特定文件類型:「PRD」、「設計文件」、「決策文件」、「RFC」
  • 使用者似乎要開始一項重要的寫作任務

初始提議: 向使用者提供一個協同撰寫文件的結構化工作流程。解釋三個階段:

  1. 脈絡收集:使用者提供所有相關脈絡,同時 Claude 提出釐清問題
  2. 優化與結構:透過腦力激盪和編輯反覆建構每個段落
  3. 讀者測試:使用一個全新的 Claude(無任何脈絡)來測試文件,在其他人閱讀前找出盲點

解釋這種方法有助於確保文件在其他人閱讀時(包括當他們將內容貼到 Claude 中)能正常運作。詢問使用者是否想嘗試此工作流程,或者偏好自由發揮。

如果使用者拒絕,則自由發揮。如果使用者接受,則進行階段一。

階段一:脈絡收集

目標: 縮小使用者所知與 Claude 所知之間的差距,以便在後續階段提供更明智的引導。

初始問題

首先,詢問使用者關於文件的後設脈絡:

  1. 這是什麼類型的文件?(例如:技術規格、決策文件、提案)
  2. 主要目標受眾是誰?
  3. 希望讀者在閱讀後產生什麼影響?
  4. 是否有需要遵循的範本或特定格式?
  5. 還有其他限制或脈絡需要知道嗎?

告知他們可以用簡寫回答,或以他們覺得最有效的方式傾倒資訊。

如果使用者提供了範本或提及了文件類型:

  • 詢問他們是否有要分享的範本文件
  • 如果他們提供了共享文件的連結,則使用適當的整合功能來擷取它
  • 如果他們提供了檔案,則讀取它

如果使用者提及要編輯現有的共享文件:

  • 使用適當的整合功能來讀取目前的狀態
  • 檢查是否有缺少替代文字的圖片
  • 如果存在沒有替代文字的圖片,則解釋當其他人使用 Claude 來理解文件時,Claude 將無法看到它們。詢問他們是否要生成替代文字。如果是,則要求他們將每張圖片貼到對話中以便生成描述性替代文字。

資訊傾倒

一旦初始問題得到回答,鼓勵使用者傾倒他們擁有的所有脈絡。請求的資訊類型包括:

  • 專案/問題的背景
  • 相關的團隊討論或共享文件
  • 為何不採用其他解決方案
  • 組織脈絡(團隊動態、過去事件、政治因素)
  • 時間壓力或限制
  • 技術架構或依賴關係
  • 關係人關注點

建議他們不必擔心組織方式——全部傾倒出來即可。提供多種提供脈絡的方式:

  • 意識流式資訊傾倒
  • 指向團隊頻道或討論串以便閱讀
  • 連結到共享文件

如果可用的整合功能存在(例如:Slack、Teams、Google Drive、SharePoint 或其他 MCP 伺服器),則提及這些功能可以用來直接拉取脈絡。

如果未偵測到整合功能,且是在 Claude.ai 或 Claude 應用程式中: 建議他們可以在 Claude 設定中啟用連接器,以允許從即時通訊應用程式和文件儲存直接拉取脈絡。

告知他們一旦完成初始傾倒,將會提出釐清問題。

在脈絡收集期間:

  • 如果使用者提及團隊頻道或共享文件:

    • 如果可用的整合功能存在:告知他們將立即讀取內容,然後使用適當的整合功能
    • 如果可用的整合功能不存在:解釋無法存取的原因。建議他們在 Claude 設定中啟用連接器,或直接貼上相關內容。
  • 如果使用者提及不熟悉的實體/專案:

    • 詢問是否應搜尋已連接的工具以了解更多資訊
    • 等待使用者確認後再進行搜尋
  • 隨著使用者提供脈絡,記錄正在學習的內容以及仍然不清楚的事項

提出釐清問題:

當使用者表示已完成初始傾倒(或在提供大量脈絡後),提出釐清問題以確保理解:

根據脈絡中的缺口生成 5-10 個編號問題。

告知他們可以用簡寫回答(例如:「1:是,2:請見 #頻道,3:否,因為要向後相容」),連結到更多文件,指向要閱讀的頻道,或繼續傾倒資訊。選擇對他們最有效率的方式。

退出條件:

當提出的問題顯示出理解——也就是能夠詢問邊界情況和取捨,而無需解釋基本概念時——表示已收集到足夠的脈絡。

過渡:

詢問他們在此階段是否還有更多脈絡要提供,或者是否該進入文件草擬階段。

如果使用者想要補充更多,讓他們補充。準備好後,進入階段二。

階段二:優化與結構

目標: 透過腦力激盪、篩選和反覆優化,逐段建構文件。

給使用者的指示:

解釋文件將逐段建構。對於每個段落:

  1. 將會提出關於應包含內容的釐清問題
  2. 將會腦力激盪出 5-20 個選項
  3. 使用者將指出要保留/移除/合併的項目
  4. 段落將被草擬
  5. 草稿將透過精確的編輯來優化

從未知數最多的段落開始(通常是核心決策/提案),然後處理其餘段落。

段落順序:

如果文件結構明確: 詢問他們想從哪個段落開始。

建議從未知數最多的段落開始。對於決策文件,通常是核心提案部分。對於規格文件,通常是技術方法部分。摘要段落最好留到最後處理。

如果使用者不知道需要哪些段落: 根據文件類型和範本,建議 3-5 個適合該文件類型的段落。

詢問這個結構是否合適,或者他們想要調整。

一旦結構達成共識:

為所有段落建立包含佔位文字的初始文件結構。

如果可以存取 artifacts:

使用 create_file 來建立一個 artifact。這為 Claude 和使用者雙方提供了一個可協作的草稿框架。

告知他們將為所有段落建立包含佔位文字的初始結構。

建立包含所有段落標題和簡短佔位文字(如「[待撰寫]」或「[此處填寫內容]」)的 artifact。

提供草稿框架的連結,並表示是時候填入每個段落的內容了。

如果無法存取 artifacts:

在工作目錄中建立一個 markdown 檔案。命名為適當的名稱(例如:decision-doc.md、technical-spec.md)。

告知他們將為所有段落建立包含佔位文字的初始結構。

建立包含所有段落標題和佔位文字的檔案。

確認檔案已建立,並表示是時候填入每個段落的內容了。

對於每個段落:

步驟 1:釐清問題

宣告將開始處理「[段落名稱]」段落。提出 5-10 個關於應包含內容的釐清問題:

根據脈絡和段落目的生成 5-10 個具體問題。

告知他們可以用簡寫回答,或只是指出哪些內容是重要的。

步驟 2:腦力激盪

針對「[段落名稱]」段落,根據其複雜度腦力激盪出 [5-20] 個可能包含的項目。尋找:

  • 可能被遺忘的已分享脈絡
  • 尚未提及的面向或考量

根據段落複雜度生成 5-20 個編號選項。最後,提供選項詢問是否需要更多腦力激盪。

步驟 3:篩選

詢問哪些要點應該保留、移除或合併。請求簡短的說明理由,以幫助學習下一段落的優先順序。

提供範例:

  • 「保留 1,4,7,9」
  • 「移除 3(與 1 重複)」
  • 「移除 6(目標受眾已經知道)」
  • 「合併 11 和 12」

如果使用者提供自由形式的回饋(例如:「看起來不錯」或「我大致喜歡,但是……」)而不是編號選擇,則提取他們的偏好並繼續進行。解析他們想要保留/移除/改變的內容並加以應用。

步驟 4:缺口檢查

根據他們選擇的內容,詢問「[段落名稱]」段落是否缺少任何重要的東西。

步驟 5:草擬

使用 str_replace 將此段落的佔位文字替換為實際草擬的內容。

宣告現在將根據使用者的選擇來草擬「[段落名稱]」段落。

如果使用 artifacts:

草擬後,提供 artifact 的連結。

請他們閱讀一遍,並指出需要修改的地方。注意,具體的回饋有助於學習他們的風格以應用於後續段落。

如果使用檔案(無 artifacts):

草擬後,確認完成。

告知他們「[段落名稱]」段落已在 [檔案名稱] 中草擬完成。請他們閱讀一遍,並指出需要修改的地方。注意,具體的回饋有助於學習他們的風格以應用於後續段落。

給使用者的關鍵指示(在草擬第一個段落時包含):

提供一段說明:無需直接編輯文件,請他們指出需要修改的地方。這有助於學習他們的風格以應用於未來段落。例如:「移除 X 項目符號——Y 已經涵蓋了」或「讓第三段更簡潔」。

步驟 6:反覆優化

當使用者提供回饋時:

  • 使用 str_replace 進行編輯(絕不重新列印整個文件)
  • 如果使用 artifacts: 每次編輯後提供 artifact 的連結
  • 如果使用檔案: 只需確認編輯完成
  • 如果使用者直接編輯文件並要求閱讀:在心裡記錄他們所做的修改,並在未來段落中記住它們(這顯示了他們的偏好)

繼續迭代,直到使用者對該段落感到滿意。

品質檢查

在連續 3 次無實質變更的迭代之後,詢問是否可以刪除任何內容而不遺失重要資訊。

當段落完成時,確認「[段落名稱]」已完成。詢問是否準備好進入下一個段落。

為所有段落重複此過程。

接近完成

當接近完成(80% 以上的段落已完成)時,宣布將重新閱讀整個文件,並檢查:

  • 段落之間的流暢性和一致性
  • 冗餘或矛盾之處
  • 任何感覺像是「灌水」或通用填充物的內容
  • 是否每個句子都言之有物

閱讀整個文件並提供回饋。

當所有段落都已草擬並優化:

宣布所有段落都已草擬完成。表示將再次審閱完整文件。

審查整體連貫性、流暢性和完整性。

提供任何最終建議。

詢問是否準備好進入讀者測試,或者他們是否想要優化其他內容。

階段三:讀者測試

目標: 使用一個全新的 Claude(無脈絡殘留)來測試文件,以驗證它對讀者是否有效。

給使用者的指示:

解釋現在將進行測試,以確認文件是否真的對讀者有效。這可以發現盲點——那些對作者來說理所當然但可能會困惑其他人的事情。

測試方法

如果可以存取子代理(例如:在 Claude Code 中):

直接執行測試,無需使用者參與。

步驟 1:預測讀者問題

宣布將預測讀者在嘗試查找此文件時可能會提出的問題。

生成 5-10 個讀者會實際提出的問題。

步驟 2:使用子代理進行測試

宣布將使用一個全新的 Claude 實例(無此對話的任何脈絡)來測試這些問題。

對於每個問題,調用一個僅包含文件內容和該問題的子代理。

總結讀者 Claude 對每個問題回答正確/錯誤的地方。

步驟 3:執行額外檢查

宣布將執行額外檢查。

調用子代理檢查歧義、錯誤假設、矛盾。

總結發現的任何問題。

步驟 4:報告並修正

如果發現問題: 報告讀者 Claude 在特定問題上的困難。

列出具體問題。

表示將修正這些缺口。

回到優化階段處理有問題的段落。


如果無法存取子代理(例如:claude.ai 網頁介面):

使用者需要手動進行測試。

步驟 1:預測讀者問題

詢問讀者在嘗試查找此文件時可能會提出什麼問題。他們會在 Claude.ai 中輸入什麼?

生成 5-10 個讀者會實際提出的問題。

步驟 2:設定測試

提供測試說明:

  1. 開啟一個全新的 Claude 對話:https://claude.ai
  2. 貼上或分享文件內容(如果使用已啟用連接器的共享文件平台,則提供連結)
  3. 向讀者 Claude 提問生成的問題

對於每個問題,指示讀者 Claude 提供:

  • 答案
  • 是否有任何模糊或不清楚的地方
  • 文件假設讀者已經知道哪些知識/脈絡

檢查讀者 Claude 是給出正確答案還是誤解了任何內容。

步驟 3:額外檢查

同時詢問讀者 Claude:

  • 「這份文件中哪些部分可能對讀者造成模糊或不清楚?」
  • 「這份文件假設讀者已經具備哪些知識或脈絡?」
  • 「是否存在任何內部矛盾或不一致之處?」

步驟 4:根據結果迭代

詢問讀者 Claude 回答錯誤或難以處理的內容。表示將修正這些缺口。

回到優化階段處理任何有問題的段落。


退出條件(兩種方法皆適用)

當讀者 Claude 能夠一致地回答問題,且沒有發現新的缺口或歧義時,文件即準備就緒。

最終審查

當讀者測試通過時: 宣布文件已通過讀者 Claude 測試。在完成之前:

  1. 建議他們自己進行最終通讀——他們擁有這份文件並對其品質負責
  2. 建議再次檢查任何事實、連結或技術細節
  3. 詢問他們是否確認文件達到了他們想要的影響

詢問輸出格式偏好(如:Markdown、PDF、Google Doc)。根據他們的要求輸出最終版本。

恭喜他們!文件現在可供他人閱讀(或貼到 Claude 中)。

Individual skills in this repo

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

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists

anthropics/template-skill

Replace with description of the skill and when Claude should use it.

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists

claude-api

|-

discernment-nudge

After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

frontend-design

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

pptx

Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill

slack-gif-creator

Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like

theme-factory

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

xlsx

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.

相關技能