用途:为文章生成封面图,采用类型、配色、渲染、文字、情绪五维(5D)系统,流程简化且确定性高。
后端:仅一个提供方,端点 http://localhost:5678/webhook/qwen_image_2512,方法 POST,请求体 {"prompt": string, "width": number, "height": number},响应为 PNG 二进制。提示词以中文为主,结构为 主体+场景+风格,可选镜头语言、氛围词与细节修饰。
用法:脚本位于 SKILL_DIR,运行 npx -y bun ${SKILL_DIR}/scripts/main.ts。可从文章文件或直接内容生成,例如 npx -y bun ${SKILL_DIR}/scripts/main.ts path/to/article.md,或加 --content "..."。5D 选项示例:--type conceptual --palette cool --rendering digital --text title-subtitle --mood bold;也可用 --style blueprint 预设展开配色与渲染。其他选项包括 --aspect(16:9 默认、2.35:1、4:3、3:2、1:1、3:4)、--lang、--no-title、--quick、--image 指定输出路径。
流程:读取偏好(EXTEND.md 可选)、读取内容、按 CLI>风格预设>EXTEND>默认>自动 解析尺寸、生成 prompts/cover.md、映射宽高、调用 Qwen API、失败重试一次、保存 cover.png。未指定 --image 时默认输出到 Resources/Attachments/cover-image/<topic-slug>/。
偏好文件查找顺序:.baoyu-skills/woa-cover-image/EXTEND.md,$HOME/.baoyu-skills/woa-cover-image/EXTEND.md,支持 quick_mode、preferred_type、preferred_palette、preferred_rendering、preferred_text、preferred_mood、default_aspect、default_output_dir、language 等键。
限制:MVP 为非交互解析,缺失维度无论是否加 --quick 都会自动选择;--quick 仅为未来交互模式保留。自动文字策略下,技术/观点内容默认 text=none,需显式 --text 强制标题。需本地 Qwen 端点可用。