writing-shape:mattpocock/skills 方法论: in-progress/writing-shape,适用于工程实践、代码质量与开发流程优化。
writing-shape:mattpocock/skills 方法论: in-progress/writing-shape,适用于工程实践、代码质量与开发流程优化。
> 来源: mattpocock/skills (141k stars) — Total TypeScript 创始人 Matt Pocock
> 类目: 实验性
> 原文件: skills/in-progress/writing-shape/SKILL.md
> 模型推荐: gpt-4.1 (代码工程)
Matt Pocock (Total TypeScript, 141k stars) 沉淀下来的"日常代码工程动作"skill 模板。
每一个对应一个具体动作(代码评审 / TDD / 重构 / 文档对齐 / 任务交接),不是工具,是"该怎么干这件事"的工作流模板。
michael 强调"skill 要有相应的指导功能,指导用户使用",所以这里加了下面两节让 Agent 和用户对接。
---
1. 接到任务后先按这个 skill 的检查清单走一遍
2. 清单里如果出现"先做 X 才能做 Y"的红线 → 必须先完成 X
3. 跑完清单后开始动手(改代码 / 写文档 / 评审)
4. 完工前用 `verification-before-completion`(superpowers) 或 `verification` 类 step 自检
5. 任务量大时考虑用 `dispatching-parallel-agents`(superpowers) 或 `wayfinder`(mattpocock) 拆解
1. 告诉 Agent 你要做什么(一句话即可)
2. Agent 跑 skill 清单时不要打断 — 它可能在收集上下文
3. 如果 Agent 主动问你"代码评审要不要安排一个 reviewer"等决策点 → 直接回答
4. 完工后让 Agent 跑一遍自检再交回
5. 整个过程 Agent 自动化,不需要手工介入
---
---
name: writing-shape
description: Writing, exploit — shape raw material into an article, paragraph by paragraph.
disable-model-invocation: true
---
<what-to-do>
The user has passed (or will pass) a markdown file of raw material. Treat it as the input pile — anything from a tidy list of fragments to a wall of unstructured prose to a transcript. The format does not matter. Read it end-to-end before doing anything else.
Then run a shaping session that produces a separate article document. This is **exploit**: the exploring is done, the pile is fixed — commit to a structure and mine the pile to fill it. Do not edit the raw material file — it is read-only to this skill.
If the user did not say where to save the article, ask once and remember the path.
</what-to-do>
<supporting-info>
1. **Read the pile.** Read the input file in full. Form a sense of what's in it.
2. **Establish the prerequisites.** Settle with the user what the reader knows walking in — the concepts that are **grounded** from the start. Everything else must be grounded by a block before a later block can lean on it. See [Grounding](#grounding).
3. **Draft 2–3 candidate openings.** Each opening should imply a different thesis or angle for the article. Show all of them. Force the user to pick or compose a hybrid. The chosen opening defines what the rest of the article must do.
4. **Grow paragraph by paragraph.** After the opening lands, ask "given this opening, what does the reader need to hear next?" Pull material from the pile to answer. The next block may only lean on grounded concepts, and grounds new ones as it lands. Argue about the form the next block takes — a paragraph, a list, a table, a callout, a quote, a code block. Each format choice should be deliberate and defensible.
5. **Append to the article file as you go.** Don't batch. Write each agreed paragraph or block immediately so the user can see the article taking shape.
6. **Loop step 4 until the article is done.** The user decides when it's done.
Every **concept** has to be **grounded** before a block can lean on it: the reader either walked in knowing it or met it in an earlier block. A block that reaches for an ungrounded concept loses the reader. The unit is the concept, not the word for it — a block can lean on an idea the reader lacks even with no jargon in sight. Where a concept has a name — a **term** — grounding it means landing the idea and the term together.
A concept gets grounded one of two ways:
Keep a running list of what's grounded. When you ask "what does the reader need to hear next?", an ungrounded concept the next move needs is itself the answer: ground it first — here or in an earlier block — or you can't make the move. This is the gap-naming of [Pulling from the pile](#pulling-from-the-pile) one level up: there the pile is missing material; here the article is missing a foundation.
The lever is what you make a prerequisite versus what you ground inside the article. Demand too much up front and you shut readers out; ground too much inside and the opening drowns in definitions. Settle it with the user when you establish prerequisites.
This is a grilling session inverted. In ideation, the question was "what are you actually noticing?" Here it's "what is this article actually arguing, and in what order does the reader need to hear it?" Push back. Refuse to let weak transitions slide. If a paragraph doesn't earn its place, cut it.
Specific moves to keep using:
Treat the raw material as a quarry, not a script. Pull a fragment, rework it to fit the surrounding paragraph, and place it. A fragment may be split across multiple paragraphs, merged with another, or paraphrased. The pile's job is to be mined; the article's job is to read as one voice.
If the pile lacks something the article needs, name the gap explicitly: "We need an example here and the pile doesn't have one — give me one now or we cut this section."
When choosing how to render a block, weigh these tradeoffs out loud with the user, not silently:
Append to the article file as each block is agreed. Re-read the file from disk before every write — the user may have edited between turns. Never overwrite blindly. If the user wants a paragraph rewritten, edit that specific paragraph in place; leave the rest alone.
</supporting-info>
本 skill 专注于writing-shape,mattpocock/skills 方法论: in-progress/writing-shape。它将相关流程标准化,帮助用户更快拿到可靠结果,减少重复手工操作。
当你需要在writing-shape相关工作中获得稳定、可复用的产出时最适合——无论是单次任务还是纳入日常工作流,都能直接调用。
需要一个具体的项目或任务上下文,最好带有代码仓库或需求文档。
1. 告诉 Agent 你要做什么(一句话即可)
2. Agent 跑 skill 清单时不要打断 — 它可能在收集上下文
3. 如果 Agent 主动问你"代码评审要不要安排一个 reviewer"等决策点 → 直接回答
4. 完工后让 Agent 跑一遍自检再交回
5. 整个过程 Agent 自动化,不需要手工介入
---
本 skill 专注于writing-shape,mattpocock/skills 方法论: in-progress/writing-shape。它将相关流程标准化,帮助用户更快拿到可靠结果,减少重复手工操作。
当你需要在writing-shape相关工作中获得稳定、可复用的产出时最适合——无论是单次任务还是纳入日常工作流,都能直接调用。
需要一个具体的项目或任务上下文,最好带有代码仓库或需求文档。