wewrite-visual
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesewewrite-visual — 封面与配图
wewrite-visual — Covers and Illustrations
前置
Prerequisites
用户指定文章时使用该文件;否则 ,读取当前任务的 、
、、、
、 和任务目录。已完成的文章也可以直接配图,不要恢复或新建写作任务。
wewrite run showartifacts.articleartifacts.illustrated_articleartifacts.image_promptsartifacts.images_manifestvisualflags有任务时运行 。用户直接给了任务外文章时独立执行,
不写任务状态;提示词和图片放进文章同目录的 ,带图副本写成
。
wewrite run step visual in_progress<文件名>-assets/<文件名>-illustrated.md根据本轮原话确定模式并用 记录:只要封面用 ,封面和必要内文图
用 ,只要提示词用 。不要沿用写作模式猜测用户想生图。 或
时仍要完成提示词,但不调用付费图片服务。
wewrite run updatecoverfullpromptspromptsskip_image_gen=true完整读取:
text
读取: {skill_dir}/references/visual-guide.mdUse this file when the user specifies an article; otherwise run to read the current task's ,
, , ,
, , and the task directory. Completed articles can also be directly illustrated — do not resume or create a new writing task.
wewrite run showartifacts.articleartifacts.illustrated_articleartifacts.image_promptsartifacts.images_manifestvisualflagsWhen there is an existing task, run . If the user provides an article outside of an existing task, execute independently without writing task status; place prompts and images in the directory under the same folder as the article, and save the illustrated copy as
.
wewrite run step visual in_progress<filename>-assets/<filename>-illustrated.mdDetermine the mode based on the user's latest message and record it with : use for cover-only requests, for cover plus necessary in-article illustrations, for prompt-only requests. Do not assume the user wants image generation based on the writing mode. When using mode or if , still complete the prompt creation process but do not call paid image generation services.
wewrite run updatecoverfullpromptspromptsskip_image_gen=trueFull read:
text
读取: {skill_dir}/references/visual-guide.md执行
Execution
- 从终稿提取 3-5 个具体实体和文章主情绪,形成统一色板、构图与质感。
- 写一个封面提示词。模式到此为止;
cover模式只为确实需要解释或缓冲阅读的 段落补图,不按固定数量凑图。full - 将提示词和目标路径写到 ;批量清单写到
artifacts.image_prompts。artifacts.images_manifest - 数量必须不超过任务的 。调用时同时传入数量和费用上限:
visual.max_images
bash
wewrite image-gen --manifest {run_dir}/images.json --max-images {max_images} --max-cost {max_cost}max_cost- 一次性检查所有实际文件:能打开、格式与扩展名一致、核心实体可辨、风格连贯。只重试
明显失败的单张一次。模式先复制原始正文到
full,再把 采用的内文图插到副本相应段落;封面不插入正文。任何模式都不得覆盖原始正文。artifacts.illustrated_article
完成后更新 、,再执行:
images.coverimages.figuresbash
wewrite run step visual completed只有提示词时同样标 completed,并明确说明未产生费用、没有实际图片。
- Extract 3-5 specific entities and the main emotion of the article from the final draft to form a unified color palette, composition, and texture.
- Write a cover prompt. Stop here for mode; in
covermode, only add illustrations to paragraphs that genuinely need explanation or reading pacing, do not add images to meet a fixed count.full - Write the prompts and target paths to ; write the batch manifest to
artifacts.image_prompts.artifacts.images_manifest - The number of images must not exceed the task's limit. Pass both the count and cost limit when calling:
visual.max_images
bash
wewrite image-gen --manifest {run_dir}/images.json --max-images {max_images} --max-cost {max_cost}Omit the parameter if is empty. If the budget pre-check fails, reduce in-article illustrations — do not bypass the upper limit. If the image service fails, retain the full prompts and continue the workflow.
--max-costmax_cost- Check all actual files at once: verify they can be opened, format matches the extension, core entities are recognizable, and style is consistent. Retry only obviously failed single images once. In mode, first copy the original article text to
full, then insert the adopted in-article illustrations into the corresponding paragraphs of the copy; do not insert the cover image into the article body. Never overwrite the original article text in any mode.artifacts.illustrated_article
After completion, update and , then execute:
images.coverimages.figuresbash
wewrite run step visual completedMark as completed even for prompt-only requests, and clearly state that no fees were incurred and no actual images were generated.