图片生成与参考图改图
选择图片生成服务,用文字或参考图制作图片,控制比例和质量,并记录批量任务的成功与失败。
适用场景
为文章、课程、产品介绍或活动制作图片,需要控制发布比例、使用参考图,或按一套要求生成多张图时可以用。它提供多种生成服务的统一入口;图片风格由你的要求和所选模型决定,不包含文章配图位置、整套漫画分镜或自动发布。
主要功能
先选适合环境的生成服务
支持 OpenAI、Google、通义万相等多种服务,也有专门的本地 CLI 入口。首次运行确认服务、模型与默认偏好;使用哪一项,取决于账号、接口可用性和你愿意承担的费用。
用文字或参考图提出具体要求
描述用途、主体、构图和要避免的内容,也可以提供有权使用的参考图。改图和参考图能力受服务及模型限制;要求保留人物或主体时明确说清,而不是默认它能精确还原。
按发布位置控制画幅与质量
可指定方形、横向、竖向等比例,以及可用的质量选项。先做一张样图,检查构图、文字和尺寸;最终分辨率与支持的参数由实际模型决定。
批量生成并保留处理记录
将多张图片的要求整理成批量任务,按服务限制安排并发和重试。记录已完成与失败的项目,优先处理失败项,减少重复生成已经满意的图片。
准备资料
说明图片用途、数量、比例、视觉要求和保存位置,提供可使用的参考图。准备所选服务的账号与凭据,先约定单张试图及整批预算;只需要配置检查时,明确暂不生成。
使用方法
安装并检查账号与配置
保留完整脚本目录,检查 Bun 或 npx 等运行条件。确认服务、模型、凭据和输出规则;API 凭据与网页登录是不同条件,不能凭已登录网页就判断接口可用。
先做一张并审阅
用一份具体要求生成样图,检查主体、比例、文字和参考图保留程度。先调整描述或模型,再决定是否继续整批。
处理整批并核对结果
沿确认参数生成其余图片,记录成功、失败和保存路径。检查结果后再使用,失败项单独重试;需要公开发布的文字与素材继续核对。
交付内容
你会得到保存到指定位置的图片及生成记录。支持参考图的模型可按要求改图;它不会保证中文完全准确或主体毫无变化,也不会将结果自动上传到你的文章和账号。
- 按用途与画幅生成的图片
- 参考图改图结果,取决于模型支持
- 批量任务、保存位置与失败记录
使用条件与费用
- 需要能够联网、读写文件并运行脚本的 Agent,以及 Bun 或 npx 等环境。
- 多数服务需要自己的 API 凭据;CLI 入口需要对应程序及登录条件。图片服务可能收费,生成前确认实际账户额度与费用。
安装细节
安装和使用命令已经备好,按右侧步骤操作即可。需要查看技术配置时,可参考作者说明。
- 作者提供 npx skills 安装方式。本页安装命令要求获取核验提交的完整目录,避免未经核验的版本变化。
使用提醒
- 配置了某一种服务,不表示其他服务也能直接使用;批量生成前先用同一账号与模型确认样图。
- 参考图、比例和质量支持随模型而异;文字、人物和细节都可能有误,需要查看实际图片。
作者与来源
已核对作者文档,未进行运行测试。
查看关键事实的原文依据
Reference-Image Identity Preservation:详见中文功能与使用说明。
## Reference-Image Identity Preservation When the user wants a person/object preserved from reference images: - Prefer a small curated set of existing source references (usually 2–4) over many images; large multi-megabyte refs can destabilize streaming providers. - Make the prompt say the references are the same subject and the output must use that identity. Avoid long generic facial-feature descriptions that can cause the model to synthesize a new similar-looking person. - Do not use newly generated outputs as references unless the user explicitly asks; generated refs compound drift. - If r来源文档:skill
Options:详见中文功能与使用说明。
## Options | Option | Description | |--------|-------------| | `--prompt <text>`, `-p` | Prompt text | | `--promptfiles <files...>` | Read prompt from files (concatenated) | | `--image <path>` | Output image path (required in single-image mode) | | `--batchfile <path>` | JSON batch file for multi-image generation | | `--jobs <count>` | Worker count for batch mode (default: auto, max from config, built-in default 10) | | `--provider google\|openai\|azure\|openrouter\|dashscope\|zai\|minimax\|jimeng\|seedream\|replicate\|codex-cli\|agnes` | Force provider (default: auto-detect; `codex-cli` is n来源文档:skill
Generation Mode:详见中文功能与使用说明。
## Generation Mode **Default**: sequential. **Batch parallel**: enabled automatically when `--batchfile` contains 2+ pending tasks. | Situation | Prefer | Why | |-----------|--------|-----| | One image, or 1-2 simple images | Sequential | Lower coordination overhead, easier debugging | | Multiple images with saved prompt files | Batch (`--batchfile`) | Reuses finalized prompts, applies shared throttling/retries, predictable throughput | | Each image still needs its own reasoning / prompt writing / style exploration | Subagents | Work is still exploratory, each needs independent analysis | |来源文档:skill
Error Handling:详见中文功能与使用说明。
## Error Handling - Missing API key → error with setup instructions - Generation failure → auto-retry up to 3 attempts per image - Invalid aspect ratio → warning, proceed with default - Reference images with unsupported provider/model → error with fix hint ### Codex image2 fallback If `--provider openai --model gpt-image-2.5-flare` fails because `OPENAI_API_KEY` is missing but the current runtime has a native image-generation backend or the repo-level `codex-imagegen` wrapper is available, use that path rather than leaving the user waiting. Be explicit about whether the fallback is true ref来源文档:skill
来源仓库采用 MIT 许可;另有说明的第三方素材按各自许可。
MIT License Copyright (c) 2026 Jim Liu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notic来源文档:file1
作者提供 npx skills 安装方式。本页安装命令要求获取核验提交的完整目录,避免未经核验的版本变化。
npx skills add jimliu/baoyu-skills来源文档:file2
内容有误?告诉我们
01 安装到 Agent
复制安装命令,发给你正在使用的 Agent。
查看完整安装命令
发送后,等待 Agent 回复安装结果。
首次使用请先安装;已安装可直接填写下方任务。
02 填写你的任务
复制后,粘贴到已安装 Skill 的 Agent 对话。