SuperAPI AI Directory

wewrite-visual

Marketing & growth

View repository

Updated 10-15 22:37

About this skill

wewrite-visual — cover and illustrations

Prerequisites

Use this file when the user specifies an article; otherwise wewrite run show, read the current task's artifacts.article、 artifacts.illustrated_article、artifacts.image_prompts、artifacts.images_manifest、 visual、flags and task directory. Completed articles can also be illustrated directly; do not resume or create a new writing task.

When there is a task, run wewrite run step visual in_progress. When the user directly provides an article outside the task, execute independently, do not write task status; put prompts and images in the same directory as the article <文件名>-assets/, and write the illustrated copy as <文件名>-illustrated.md。

Determine the mode based on the user's exact words in this round and record it with wewrite run update : for cover only use cover, for cover and necessary in-article images use full, for prompts only use prompts. Do not follow the writing mode to guess that the user wants image generation.prompts or skip_image_gen=true , still complete the prompts, but do not call paid image services.

Read in full:

读取: {skill_dir}/references/visual-guide.md

Execute

  1. Extract 3-5 specific entities and the article's main emotion from the final draft to form a unified color palette, composition, and texture.
  2. Write one cover prompt.cover mode stops here;full mode only adds images for paragraphs that truly need explanation or reading buffer, and does not pad images to a fixed count.
  3. Write the prompts and target paths to artifacts.image_prompts; write the batch list to artifacts.images_manifest。
  4. The quantity must not exceed the task's visual.max_images. When calling, pass both the quantity and the cost cap:
wewrite image-gen --manifest {run_dir}/images.json --max-images {max_images} --max-cost {max_cost}

max_cost When empty, omit this parameter. If the budget precheck fails, reduce in-article images; do not bypass the cap. If the image service fails, keep the complete prompts and continue the process.

  1. Check all actual files at once: they can be opened, the format matches the extension, core entities are recognizable, and the style is consistent. Retry only an obviously failed single image once.full mode first copies the original body text to artifacts.illustrated_article, then inserts the adopted in-article images into the corresponding paragraphs of the copy; the cover is not inserted into the body text. No mode may overwrite the original body text.

After completion, update images.cover、images.figures, then execute:

wewrite run step visual completed

When there are only prompts, also mark completed, and clearly state that no cost was incurred and there are no actual images.