Turn an articlerestructureinto a rewrite draft content.json: you are responsible for reading, planning, rewriting, choosing images, and fact-checking numbers; the script handles validation. The rewrite draft contains only content, no colors or fonts, so switching styles does not require rewriting. Rewriting and summarizing are the same thing.
Parameters:$ARGUMENTS
| Output | For whom |
|---|---|
content.json(rewrite draft) |
long-image(magazine long image),image-cards(summary card),explainer-video(reference facts and structure) |
rewrite.md + rewrite-assets/(the article form of the rewrite draft,export.mjs export) |
wechat-layout(WeChat official account summary), and can also be read directly by people |
Input
article.md(original text, translation, or verbatim transcript). When given a link or file, first use article-fetch(for videos use video-transcript) to fetch the original text; for usage and working directory see ../article2media/references/pipeline.md. If the same article already has content.json hoursdo not rewrite: only add the fields required by the new layout.
A verbatim transcript iscolloquial: remove filler words and repetitions; facts, numbers, and names follow the video; check potentially misrecognized proper nouns against transcript/segments.md to judge, and explain anything uncertain at delivery. Write the source as "Content compiled from <author>'s <platform> video 'Title'."
On first use, first run node ${CLAUDE_SKILL_DIR}/scripts/doctor.mjs(validation and export require Node 22+, Chrome;ai-illustration the line is the image generation capability).
1. Planning
Read through completely article.md, then read references/writing-guide.md, then determine:
- Core claim (one sentence);
- Number of pages and each page's
part, determined by the density table at the end ofreferences/content-schema.md(--pagescan force 1–4 pages); - Each section's heading, the types of the two charts, the panel type;
- Theme: when the user has not specified one, choose one according to
../article2media/references/styles.mdand write it intotheme。
There is no need to get the user to confirm the outline first, unless the user asks to see the outline first.
2. Fact-check numbers (only in --verify or when the user requests it)
- For 3–8 key numbers or facts in the text, use WebSearch / WebFetch to check the original sources.
- State the conclusion in the corresponding panel, e.g. "consistent with IAB; 2026 is a forecast value" "source not found", and write the panel title as "· Editor's check".
- When not fact-checked, the word "check" must not appear anywhere.
3. Write content.json
Before writingyou mustread references/content-schema.md and references/figures.md(for the complete syntax of each chart and panel see examples/gallery.json; for a complete example of a 3,700-word long article see examples/dan-koe.json). Write to content.jsonin the same directory as the original text, then validate:
node ${CLAUDE_SKILL_DIR}/scripts/check.mjs <目录>/content.json # 长图
node ${CLAUDE_SKILL_DIR}/scripts/check.mjs <目录>/content.json --ratio 3:4 # 还要出卡片时,同时检查卡片
- When producing cards, also read
../image-cards/references/xhs-guide.md, writecover、xhs, and addcardhints to individual sections when needed. - When producing a WeChat official account summary, also read
../wechat-layout/references/wechat-guide.md, writewechat.title、wechat.digest。 - ✗ Must be fully fixed; ⚠ length warnings should be handled where possible (shorten the text).
- For content explaining concepts and mechanisms, follow section 6 of the writing-guide to connect specific situations, the basis for judgment, relationships, and outcomes.
4. AI illustrations (only when the user asks for illustrations or has uploaded --illustrate )
- Follow the illustration section of
figures.md:cover.illustration.prompt(cover), then pick 1–2 sections with strong narrative and missing data, and replace one of their images with{"type": "illustration", "prompt": "…"}。 - Generate with:
node ${CLAUDE_SKILL_DIR}/scripts/illustrate.mjs <目录>/content.json. The script picks the art style based on the theme in content.json; to keep the same art style when changing themes later, add--theme 新主题and generate again. - If generation fails (no image generation capability, no image quota on the free tier, etc.), tell the user the exact error message, thenremove the illustration fieldand continue as usual. Do not deliver images with "illustration pending" placeholder boxes.
- Open the generated image and take a look: check whether it contains text, whether the subject is clear, and whether it fits the theme. If you are not satisfied, revise the prompt, add
--force, and regenerate.
5. Export the article (for a WeChat official account summary, or when the user wants a summary draft)
node ${CLAUDE_SKILL_DIR}/scripts/export.mjs <目录>/content.json # → <目录>/rewrite.md + rewrite-assets/
node ${CLAUDE_SKILL_DIR}/scripts/export.mjs <目录>/content.json --theme quiet # 图表按指定主题截图
- Screenshot charts as images; colors follow the theme, and the theme is written into
rewrite.mdfront matter; WeChat official account layout uses the same theme by default. Re-export if the theme changes. - After export,
rewrite.mdis parsed back for validation; a ✗ means content.json contains text that will be treated as Markdown structure. Fix content.json as prompted and re-export,do not manually edit rewrite.md。
6. Delivery
- When used standalone:
content.json(andrewrite.md) absolute paths, a one-line outline (the part for each page), the theme and the reason, plus: to generate images uselong-image/image-cards, to publish to a WeChat official account usewechat-layoutto lay outrewrite.md。 - In a combination: hand the directory to the next capability.
- Things the user should note: unverified numbers, paragraphs that were not fully scraped, sections added by the editor, and the illustration provider and number of images used.