一键导入
write-doc
Incremental write pattern for long documents (design, requirements, specs, postmortems, RFCs, ADRs, any structured markdown)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Incremental write pattern for long documents (design, requirements, specs, postmortems, RFCs, ADRs, any structured markdown)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Apply approved review findings to a document — reads the review file and makes targeted edits
Systematically review design documents for bugs, inconsistencies, and missing cases
Systematically review requirements documents for completeness, testability, and consistency
Systematically review task breakdowns for completeness, dependency correctness, and implementability
Track, manage, and fix issues across all projects (full lifecycle, strict format)
Remove signs of AI-generated writing from text. Activate before publishing social posts (Reddit, HN, X, blogs) or any external-facing content. Detects 29+ AI writing patterns from Wikipedia's "Signs of AI writing" guide and rewrites them while preserving meaning. Supports voice calibration via writing samples.
| name | write-doc |
| description | Incremental write pattern for long documents (design, requirements, specs, postmortems, RFCs, ADRs, any structured markdown) |
| version | 1.0.0 |
| author | potato |
| triggers | {"patterns":["write design","写设计","write doc","写文档","write spec","写spec","write requirements","写需求","RFC","ADR","postmortem","forensic","design.md","DESIGN.md","requirements.md","spec.md","review.md"],"keywords":["design doc","design document","spec doc","requirements doc","long doc","long document","incremental"]} |
| tags | ["documentation","writing","process"] |
| priority | 90 |
| always_load | false |
Whenever you are asked to write a structured document — design, requirements, spec, postmortem, RFC, ADR, review, long markdown — write it incrementally. Skeleton first, then fill sections one or two at a time. This applies to both main agent and any sub-agent doing the writing.
Activate this pattern for any of:
design.md, DESIGN.md, <feature>-design.md)requirements*.md)spec.md, *-spec.md)RFC-*.md, ADR-*.md)## sections expected to exceed 200 linesDefault assumption: if you're unsure how long it will be, treat it as long. The cost of using the incremental pattern on a short doc is one extra tool call. The cost of NOT using it on a long doc is truncation, context exhaustion, or a half-baked file.
Before the first write_file, say something like:
This sets expectations: the user knows multiple tool calls are coming and won't expect one big reveal.
One write_file call. The file should contain:
## section headings the doc will have(TBD) or a one-line stub describing what it will containTotal skeleton size target: 30–80 lines. If the skeleton itself exceeds 100 lines, you're putting too much content in it — pull the prose down into individual section fills.
For each edit_file call:
(TBD) stub (or pair of adjacent stubs) you're replacingAfter all sections are filled, run a quick check:
wc -l <file> # sanity-check final length
grep "(TBD)" <file> # should be empty
grep -c "^## " <file> # confirm section count matches what you intended
If TBDs remain, fill them. If section count is off, reconcile.
edit_file call. Three is the absolute limit and only for very short sections.If you delegate document writing to a sub-agent (spawn_specialist), this skill is automatically loaded for the sub-agent (via trigger keywords). But also include in your task prompt:
"Write the document incrementally — skeleton first, then fill sections one or two at a time per edit_file call. See skills/write-doc/SKILL.md."
This is belt-and-suspenders — both the skill trigger and the explicit instruction. Sub-agents are more likely to skip the skeleton step than the main agent.
❌ Bad: write_file with the entire 900-line design.md in one go. Half the time it truncates; the other half it works but you can't fix anything without rewriting the whole file.
❌ Bad: Skipping skeleton because "I know the structure." You don't, until you write it down. The skeleton is the structure, externalized.
❌ Bad: Writing skeleton with sections that already contain 200 lines of "stub" content. That's not a skeleton; that's the doc with extra steps.
✅ Good: write_file with 50-line skeleton (title, lede, 12 ## headings each followed by (TBD)). Then 6 edit_file calls each filling 2 sections. Total: 7 tool calls, no truncation, easy to resume if context strains.
This skill exists because: 2026-04-26 session, RustClaw wrote a ~900-line design.md (gid-rs ISS-052/design.md) and only switched to incremental mode after the user pointed out context was straining. The incremental pattern was already in AGENTS.md but not consistently applied. Fixing both: AGENTS.md upgraded ("MANDATORY"), this skill created (always-triggers on doc-writing keywords).