Agent Skillsimraywang/wewrite › wewrite-visual

wewrite-visual

GitHub

为公众号文章生成封面和内文配图或提示词。根据需求选择封面、全图或仅提示词模式,调用图片生成服务并校验质量,最终输出带插图的文章副本及元数据。

skills/wewrite-visual/SKILL.md imraywang/wewrite

Trigger Scenarios

封面图 公众号配图 给文章配图 换封面

Install

npx skills add imraywang/wewrite --skill wewrite-visual -g -y
More Options

Use without installing

npx skills use imraywang/wewrite@wewrite-visual

指定 Agent (Claude Code)

npx skills add imraywang/wewrite --skill wewrite-visual -a claude-code -g -y

安装 repo 全部 skill

npx skills add imraywang/wewrite --all -g -y

预览 repo 内 skill

npx skills add imraywang/wewrite --list

SKILL.md

Frontmatter
{
    "name": "wewrite-visual",
    "description": "WeWrite 视觉模块:为公众号文章生成封面和必要的内文配图,或只交付提示词。触发词:\n封面图、公众号配图、给文章配图、换封面。通用绘图和 logo 设计不触发。\n",
    "allowed-tools": [
        "Bash",
        "Read",
        "Write",
        "Edit",
        "Glob"
    ]
}

wewrite-visual — 封面与配图

前置

用户指定文章时使用该文件;否则 wewrite run show,读取当前任务的 artifacts.articleartifacts.illustrated_articleartifacts.image_promptsartifacts.images_manifestvisualflags 和任务目录。已完成的文章也可以直接配图,不要恢复或新建写作任务。

有任务时运行 wewrite run step visual in_progress。用户直接给了任务外文章时独立执行, 不写任务状态;提示词和图片放进文章同目录的 <文件名>-assets/,带图副本写成 <文件名>-illustrated.md

根据本轮原话确定模式并用 wewrite run update 记录:只要封面用 cover,封面和必要内文图 用 full,只要提示词用 prompts。不要沿用写作模式猜测用户想生图。promptsskip_image_gen=true 时仍要完成提示词,但不调用付费图片服务。

完整读取:

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

执行

  1. 从终稿提取 3-5 个具体实体和文章主情绪,形成统一色板、构图与质感。
  2. 写一个封面提示词。cover 模式到此为止;full 模式只为确实需要解释或缓冲阅读的 段落补图,不按固定数量凑图。
  3. 将提示词和目标路径写到 artifacts.image_prompts;批量清单写到 artifacts.images_manifest
  4. 数量必须不超过任务的 visual.max_images。调用时同时传入数量和费用上限:
wewrite image-gen --manifest {run_dir}/images.json --max-images {max_images} --max-cost {max_cost}

max_cost 为空时省略该参数。预算预检不通过就减少内文图,不能绕过上限。图片服务失败时 保留完整提示词并继续流程。

  1. 一次性检查所有实际文件:能打开、格式与扩展名一致、核心实体可辨、风格连贯。只重试 明显失败的单张一次。full 模式先复制原始正文到 artifacts.illustrated_article,再把 采用的内文图插到副本相应段落;封面不插入正文。任何模式都不得覆盖原始正文。

完成后更新 images.coverimages.figures,再执行:

wewrite run step visual completed

只有提示词时同样标 completed,并明确说明未产生费用、没有实际图片。

Version History

  • 3c03598 Current 2026-07-25 07:30

Same Skill Collection

skills/wewrite-learn/SKILL.md
skills/wewrite-publish/SKILL.md
skills/wewrite-review/SKILL.md
skills/wewrite-rewrite/SKILL.md
skills/wewrite-stats/SKILL.md
skills/wewrite-style/SKILL.md
skills/wewrite-topic/SKILL.md
skills/wewrite-write/SKILL.md
skills/wewrite/SKILL.md

Metadata

Files
0
Version
ed8b083
Hash
7650c189
Indexed
2026-07-25 07:30

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 06:23
浙ICP备14020137号-1 $お客様$