Clear Writing
Write with clarity and force. This skill covers what to do (Strunk's rules), how to structure technical documentation (Divio patterns, templates), and what not to do (AI anti-patterns, doc anti-patterns).
When to Use
Use this skill whenever you write prose for humans:
- - Documentation, README files, technical explanations
- API documentation, endpoint references, integration guides
- Tutorials, how-to guides, architecture docs
- Commit messages, pull request descriptions
- Error messages, UI copy, help text, comments
- Reports, summaries, or any explanation
- Editing existing prose to improve clarity
If you're writing sentences for a human to read, use this skill.
Limited Context Strategy
When context is tight:
- 1. Write your draft using judgment
- Dispatch a subagent with your draft and the relevant reference file
- Have the subagent copyedit and return the revision
Loading a single reference (~1,000–4,500 tokens) instead of the full skill saves significant context.
Elements of Style
William Strunk Jr.'s The Elements of Style (1918) teaches you to write clearly and cut ruthlessly.
Rules
Elementary Rules of Usage (Grammar/Punctuation):
- 1. Form possessive singular by adding 's
- Use comma after each term in series except last
- Enclose parenthetic expressions between commas
- Comma before conjunction introducing co-ordinate clause
- Don't join independent clauses by comma
- Don't break sentences in two
- Participial phrase at beginning refers to grammatical subject
Elementary Principles of Composition:
- 8. One paragraph per topic
- Begin paragraph with topic sentence
- Use active voice
- Put statements in positive form
- Use definite, specific, concrete language
- Omit needless words
- Avoid succession of loose sentences
- Express co-ordinate ideas in similar form
- Keep related words together
- Keep to one tense in summaries
- Place emphatic words at end of sentence
Reference Files
For complete explanations with examples:
| Section | File | ~Tokens |
|---|
| Grammar, punctuation, comma rules | INLINECODE0 | 2,500 |
| Paragraph structure, active voice, concision |
references/elements-of-style/03-elementary-principles-of-composition.md | 4,500 |
| Headings, quotations, formatting |
references/elements-of-style/04-a-few-matters-of-form.md | 1,000 |
| Word choice, common errors |
references/elements-of-style/05-words-and-expressions-commonly-misused.md | 4,000 |
Most tasks need only 03-elementary-principles-of-composition.md — it covers active voice, positive form, concrete language, and omitting needless words.
AI Writing Patterns to Avoid
LLMs regress to statistical means, producing generic, puffy prose. Avoid:
- - Puffery: pivotal, crucial, vital, testament, enduring legacy
- Empty "-ing" phrases: ensuring reliability, showcasing features, highlighting capabilities
- Promotional adjectives: groundbreaking, seamless, robust, cutting-edge
- Overused AI vocabulary: delve, leverage, multifaceted, foster, realm, tapestry
- Formatting overuse: excessive bullets, emoji decorations, bold on every other word
Be specific, not grandiose. Say what it actually does.
For comprehensive research on why these patterns occur, see references/signs-of-ai-writing.md. Wikipedia editors developed this guide to detect AI-generated submissions — their patterns are well-documented and field-tested.
Document Types (Divio Framework)
| Type | Purpose | Structure |
|---|
| README | First impression, project overview | Title, description, quick start, install, usage |
| Tutorial |
Learning-oriented, guided experience | Numbered steps with expected outcomes |
| How-to Guide | Task-oriented, solve a specific problem | Problem statement → steps → result |
| Reference | Information-oriented, complete and accurate | Alphabetical or grouped, consistent format |
| Explanation | Understanding-oriented, context and rationale | Narrative prose, diagrams, history |
| Architecture Doc | System design, component relationships | Context → components → data flow → decisions |
| API Documentation | Endpoint contracts, integration guide | Endpoint → params → request → response → errors |
Structure Patterns
Inverted Pyramid
Lead with the most important information. Each subsequent section adds detail.
CODEBLOCK0
Problem-Solution
CODEBLOCK1
Sequential Steps
Every step is a single action with a verifiable outcome.
CODEBLOCK2
Writing Rules
| Rule | Guideline | Example |
|---|
| Short sentences | Keep under 25 words | "The server restarts automatically after config changes." |
| Active voice |
Subject does the action | "The function returns a promise" not "A promise is returned" |
| Present tense | Describe current behavior | "This endpoint accepts JSON" not "will accept JSON" |
| One idea per paragraph | Each paragraph has one point | Split compound paragraphs at the topic shift |
| Define jargon on first use | Never assume vocabulary | "The ORM (Object-Relational Mapper) translates..." |
| Second person | Address the reader directly | "You can configure..." not "One can configure..." |
| Consistent terminology | Pick one term and stick with it | Don't alternate between "repo" and "repository" |
| Concrete over abstract | Specifics beat generalities | "Returns a 404 status code" not "Returns an error" |
Code Examples in Documentation
Every code example must follow these rules:
- 1. Complete and runnable — copy-paste and execute without modification
- Annotated — comments on the non-obvious parts, not the obvious ones
- Progressive complexity — simplest case first, then advanced usage
- Language-tagged — always specify the language in fenced code blocks
- Current — examples must work with the documented version
- Minimal — show only what is relevant; strip unrelated boilerplate
CODEBLOCK3
README Template
CODEBLOCK4
README rules:
- - Keep the quick start under 60 seconds of reader time
- Include a badge row only if badges are kept current
- Link to deeper docs rather than bloating the README
- Update the README whenever the public interface changes
API Documentation Pattern
Document every endpoint with this structure:
CODEBLOCK5
Always document errors with: HTTP status, machine-readable error code, human-readable message, and resolution steps.
Audience Adaptation
| Audience | Context Level | Focus | Tone |
|---|
| Beginner | High — define terms, explain prerequisites | What and how, step by step | Encouraging, patient |
| Intermediate |
Medium — assume basic knowledge | How and best practices | Direct, practical |
| Expert | Low — skip fundamentals | Why, edge cases, tradeoffs | Concise, precise |
Rules:
- - State the assumed audience at the top of the document
- Link to prerequisite knowledge rather than re-explaining it
- Use expandable sections (
<details>) for beginner context in expert docs - Never mix audience levels in the same section
Review Checklist
Before publishing any documentation:
- - [ ] Accurate — all code examples run, all commands work, all links resolve
- [ ] Complete — covers setup, happy path, error cases, and cleanup
- [ ] Consistent — terminology, formatting, and voice match the rest of the docs
- [ ] Readable — passes a cold read by someone unfamiliar with the project
- [ ] Scannable — headings, tables, and lists allow skimming for answers
- [ ] Examples work — every code block tested against the current version
- [ ] Links valid — no broken internal or external links
- [ ] Audience-appropriate — context level matches the stated audience
- [ ] Up to date — no references to deprecated features or old versions
- [ ] Spellchecked — no typos, no inconsistent capitalization
Documentation Anti-Patterns
| Anti-Pattern | Problem | Fix |
|---|
| Wall of text | Readers bounce | Break into sections with headings and lists |
| Outdated docs |
Erodes trust | Tie doc updates to PR checklists; date-stamp pages |
| No examples | Readers can't apply abstract descriptions | Add code examples for every public function |
| Assumed knowledge | Excludes beginners | Define terms on first use, link to prerequisites |
| Copy-paste unfriendly | Code with
$ prompts or line numbers breaks when pasted | Provide clean, runnable code blocks |
| Screenshot-only instructions | Can't be searched, go stale, inaccessible | Pair screenshots with text and commands |
NEVER Do
- 1. NEVER publish docs without testing every code example — broken examples destroy credibility faster than anything else
- NEVER write docs after the fact as an afterthought — write docs alongside the code; if you cannot explain it, the design needs work
- NEVER use "simply", "just", or "obviously" — these words shame readers who are struggling and add no information
- NEVER mix multiple audiences in one document — write separate beginner and advanced guides, or use clear section boundaries
- NEVER leave placeholder text in published docs — "TODO", "TBD", and "lorem ipsum" signal abandonment
- NEVER duplicate content across documents — link to a single source of truth; duplicates inevitably drift apart
- NEVER omit the date or version — readers must know if they are looking at current information
- NEVER use AI puffery words — pivotal, crucial, seamless, robust, groundbreaking, tapestry, and their ilk add nothing and signal lazy writing
清晰写作
清晰有力地写作。本技能涵盖该做什么(斯特伦克规则)、如何构建技术文档(Divio模式、模板),以及不该做什么(AI反模式、文档反模式)。
何时使用
当你为人类撰写散文时,请使用本技能:
- - 文档、README文件、技术说明
- API文档、端点参考、集成指南
- 教程、操作指南、架构文档
- 提交信息、拉取请求描述
- 错误消息、UI文案、帮助文本、注释
- 报告、摘要或任何说明
- 编辑现有散文以提高清晰度
如果你在写句子给人类阅读,请使用本技能。
有限上下文策略
当上下文紧张时:
- 1. 凭判断力撰写草稿
- 将草稿和相关参考文件分派给子代理
- 让子代理进行文字编辑并返回修订版
加载单个参考文件(约1,000–4,500个token)而非完整技能,可显著节省上下文。
风格要素
小威廉·斯特伦克的《风格的要素》(1918年)教你如何清晰写作并果断删减。
规则
基本用法规则(语法/标点):
- 1. 所有格单数加s
- 系列中除最后一项外,每项后用逗号
- 插入语前后用逗号括起
- 在连接并列从句的连词前加逗号
- 不要用逗号连接独立从句
- 不要将句子一分为二
- 句首的分词短语应指向语法主语
基本写作原则:
- 8. 每个主题一个段落
- 段落以主题句开头
- 使用主动语态
- 以肯定形式陈述
- 使用明确、具体、实在的语言
- 省略不必要的词语
- 避免一连串松散的句子
- 以相似形式表达并列思想
- 将相关词语放在一起
- 在摘要中保持同一时态
- 将强调性词语放在句末
参考文件
如需带示例的完整解释:
| 章节 | 文件 | ~Token数 |
|---|
| 语法、标点、逗号规则 | references/elements-of-style/02-elementary-rules-of-usage.md | 2,500 |
| 段落结构、主动语态、简洁 |
references/elements-of-style/03-elementary-principles-of-composition.md | 4,500 |
| 标题、引文、格式 | references/elements-of-style/04-a-few-matters-of-form.md | 1,000 |
| 用词、常见错误 | references/elements-of-style/05-words-and-expressions-commonly-misused.md | 4,000 |
大多数任务只需要03-elementary-principles-of-composition.md——它涵盖了主动语态、肯定形式、具体语言和省略不必要的词语。
应避免的AI写作模式
大语言模型会回归统计平均值,产生泛泛而谈、浮夸的散文。避免:
- - 浮夸之词: 关键、至关重要、不可或缺、见证、持久遗产
- 空洞的-ing短语: 确保可靠性、展示功能、突出能力
- 宣传性形容词: 突破性、无缝、稳健、尖端
- 过度使用的AI词汇: 深入探讨、利用、多方面的、培养、领域、锦绣画卷
- 格式过度使用: 过多的项目符号、表情符号装饰、每隔一个词就加粗
要具体,不要浮夸。说出它实际做了什么。
关于这些模式为何出现的全面研究,请参见references/signs-of-ai-writing.md。维基百科编辑开发了这份指南来检测AI生成的提交内容——他们的模式有充分记录并经过实地测试。
文档类型(Divio框架)
| 类型 | 目的 | 结构 |
|---|
| README | 第一印象,项目概览 | 标题、描述、快速开始、安装、使用 |
| 教程 |
学习导向,引导式体验 | 带预期结果的有编号步骤 |
| 操作指南 | 任务导向,解决特定问题 | 问题陈述 → 步骤 → 结果 |
| 参考 | 信息导向,完整准确 | 按字母顺序或分组,格式一致 |
| 解释 | 理解导向,背景和原理 | 叙事散文、图表、历史 |
| 架构文档 | 系统设计,组件关系 | 上下文 → 组件 → 数据流 → 决策 |
| API文档 | 端点契约,集成指南 | 端点 → 参数 → 请求 → 响应 → 错误 |
结构模式
倒金字塔
以最重要的信息开头。后续每个部分增加细节。
- 1. 它的作用(一句话)
- 如何使用(快速开始)
- 配置选项
- 高级用法
- 内部机制/实现细节
问题-解决方案
- 1. 问题——出了什么问题、症状、错误消息
- 原因——为什么会发生(简要)
- 解决方案——逐步修复
- 预防——将来如何避免
顺序步骤
每一步都是一个单一操作,带有可验证的结果。
- 1. 步骤——一个操作,一个动词
预期结果:读者应该看到什么
- 2. 步骤——下一个操作
预期结果:成功的确认
写作规则
| 规则 | 指南 | 示例 |
|---|
| 短句 | 保持在25词以内 | 配置更改后服务器会自动重启。 |
| 主动语态 |
主语执行动作 | 该函数返回一个promise而非一个promise被返回 |
| 现在时态 | 描述当前行为 | 此端点接受JSON而非将接受JSON |
| 每段一个想法 | 每个段落有一个要点 | 在主题转换处分隔复合段落 |
| 首次使用定义术语 | 绝不假设词汇量 | ORM(对象关系映射器)将... |
| 第二人称 | 直接称呼读者 | 你可以配置...而非人们可以配置... |
| 一致的术语 | 选择一个术语并坚持使用 | 不要在repo和repository之间交替使用 |
| 具体而非抽象 | 具体优于泛泛而谈 | 返回404状态码而非返回一个错误 |
文档中的代码示例
每个代码示例必须遵循以下规则:
- 1. 完整且可运行——复制粘贴即可执行,无需修改
- 有注释——注释非显而易见的部分,而非显而易见的部分
- 渐进复杂度——先展示最简单的情况,然后是高级用法
- 带语言标签——始终在围栏代码块中指定语言
- 最新——示例必须适用于文档记录的版本
- 最小化——只展示相关内容;去掉无关的样板代码
python
好:完整、有注释、最小化
import httpx
创建带基础URL的客户端,避免重复输入
client = httpx.Client(base_url=https://api.example.com)
按ID获取用户——返回User字典,或在4xx/5xx时抛出异常
response = client.get(/users/42)
response.raise
forstatus()
user = response.json()
print(user[name]) # Ada Lovelace
README模板
markdown
项目名称
一行描述该项目的作用及其目标用户。
快速开始
从零到可用的最快路径。三个命令或更少。
安装
前置条件、系统要求和逐步安装。
使用
带代码示例的常见用例。覆盖80%的情况。
API
公共API接口——函数、类、CLI标志、端点。
配置
环境变量、配置文件及其默认值。
贡献
如何设置开发环境、运行测试和提交更改。
许可证
许可证名称和完整LICENSE文件的链接。
README规则:
- - 快速开始部分控制在读者60秒内完成
- 仅当徽章保持最新时才包含徽章行
- 链接到更深入的文档,而不是让README臃肿
- 每当公共接口发生变化时更新README
API文档模式
按此结构记录每个端点:
markdown
GET /users/:id
通过唯一标识符检索单个用户。
认证: 需要Bearer令牌
路径参数:
响应:200 OK
{json响应示例}
错误响应:
| 状态 | 代码 | 描述 |
|---|
| 401 | UNAUTHORIZED | 缺少或无效的令牌 |
| 404 |
NOT_FOUND | 用户不存在 |
始终记录错误信息,包括:HTTP状态、机器可读的错误代码、人类可读的消息以及解决步骤。
受众适配
| 受众 | 上下文级别 | 重点 |