image-batch-runner
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseImage Batch Runner
图片批量运行器
Follow shared release-shell rules in:
- release-shell rules
postplus-shared
Use this skill after persona and concept work already exists.
This skill is for:
- batch-generating persona candidates
- generating first-frame / cover candidates
- applying light consistency edits to approved images
- saving local image assets plus model-call metadata
This skill is not for unconstrained concept art.
请遵循以下共享发布壳规则:
- 发布壳规则
postplus-shared
本技能应在人物形象和概念工作已完成后使用。
本技能适用于:
- 批量生成人物形象候选图
- 生成首帧/封面候选图
- 对已核准图片进行轻度一致性编辑
- 保存本地图片资产及模型调用元数据
本技能不适用于无约束的概念艺术创作。
Quality Default
质量默认规则
When realism matters, default to the strongest provider quality settings that are practically available.
Default quality assumption:
- higher image quality usually lowers visible AI artifacts
- lower-quality first passes can exaggerate fake skin, eyes, and texture
- it is better to step down only when cost, latency, or provider limits force it
Capture the chosen quality settings in the local request record so later QA can trace realism issues back to generation parameters.
当需要保证真实感时,默认使用当前可获取的最强供应商质量设置。
默认质量假设:
- 更高的图片质量通常能减少可见的AI伪影
- 低质量的首次生成可能会放大虚假皮肤、眼睛和纹理问题
- 仅在成本、延迟或供应商限制的情况下,才降低质量等级
将所选质量设置记录到本地请求记录中,以便后续QA可以追踪真实感问题与生成参数的关联。
Fact Rule
事实规则
Image generation inputs must be grounded in upstream research artifacts.
Required upstream inputs:
- a benchmark-backed persona lock
- a concept or shot need
- visual constraints derived from benchmark evidence
Do not let the image model invent:
- a new creator archetype
- ad-like polish not supported by references
- wardrobes or environments that break persona continuity
If the visual request is not supported by benchmark evidence, mark it as an explicit variant test.
图片生成输入必须基于上游研究成果。
必需的上游输入:
- 经基准验证的人物形象锁定
- 概念或镜头需求
- 基于基准证据的视觉约束
禁止让图片模型凭空生成:
- 新的创作者原型
- 参考资料未支持的广告级润色
- 破坏人物形象连续性的服装或环境
如果视觉请求无基准证据支持,请将其标记为显式变体测试。
Source Selection Rule
源选择规则
Use source files from the active project or client context.
If a current task already lives inside one project folder, keep the evidence lookup there first.
Do not assume one client's reports are the default source basis for all image work.
使用活跃项目或客户端上下文的源文件。
如果当前任务已位于某个项目文件夹内,优先在此文件夹中查找相关证据。
不要默认将某一客户端的报告作为所有图片工作的源依据。
Hosted Media
托管媒体
Current hosted image endpoint keys:
image-nano-banana-2-textimage-nano-banana-2-editimage-seedream-v5-lite-textimage-seedream-v5-lite-editimage-seedream-v5-lite-sequentialimage-seedream-v5-lite-edit-sequential
Read for endpoint request notes.
references/hosted-image-models.mdIf you need image and video outputs to live under one durable asset folder instead of separate job folders, also read .
references/unified-asset-contract-v1.md当前可用的托管图片端点密钥:
image-nano-banana-2-textimage-nano-banana-2-editimage-seedream-v5-lite-textimage-seedream-v5-lite-editimage-seedream-v5-lite-sequentialimage-seedream-v5-lite-edit-sequential
请阅读 获取端点请求说明。
references/hosted-image-models.md如果您需要将图片和视频输出存放在同一个持久化资产文件夹而非单独的任务文件夹中,还请阅读 。
references/unified-asset-contract-v1.mdCore Scripts
核心脚本
scripts/generate_image.mjsscripts/poll_prediction.mjsscripts/upload_media.mjsscripts/edit_image.mjs
These scripts take normalized request JSON files and write:
- run metadata under or
runs/image/<run-id>/runs/upload/<run-id>/ - downloaded image assets under
images/candidates/ - asset-level records such as and
asset.jsonindex.json
scripts/generate_image.mjsscripts/poll_prediction.mjsscripts/upload_media.mjsscripts/edit_image.mjs
这些脚本接收标准化的请求JSON文件,并生成以下内容:
- 运行元数据存储在 或
runs/image/<run-id>/runs/upload/<run-id>/ - 下载的图片资产存储在
images/candidates/ - 资产级记录,如 和
asset.jsonindex.json
Hosted Boundary Rule
托管边界规则
- keep request files, raw provider responses, and polling state under
when they are internal execution state
<work-folder>/.postplus/image-batch-runner/ - keep only final user-facing assets outside
.postplus/ - if hosted image capability is unavailable, unauthorized, or returns a stable network error, stop immediately instead of switching to ad hoc shell glue
- 当请求文件、原始供应商响应和轮询状态属于内部执行状态时,将其保存在
<work-folder>/.postplus/image-batch-runner/ - 仅将最终面向用户的资产存放在 外部
.postplus/ - 如果托管图片功能不可用、未授权或返回稳定网络错误,请立即停止操作,不要改用临时shell脚本
Default Workflow
默认工作流
1. Lock the generation brief
1. 锁定生成简报
Before generating any image, write down:
assetIdrunIdcampaignIdpersonaId- if relevant
conceptId assetPurposepersona_candidatecover_frameshot_supportedit_fix
sourceBasismustKeepcanVarymustAvoid
Do not jump straight from prose to provider call.
在生成任何图片之前,请记录以下信息:
assetIdrunIdcampaignIdpersonaId- 相关的 (如有)
conceptId assetPurposepersona_candidatecover_frameshot_supportedit_fix
sourceBasismustKeepcanVarymustAvoid
不要直接从文本描述跳转到供应商调用。
2. Produce a normalized request record
2. 生成标准化请求记录
For each generation job, create a local JSON request record containing:
- asset id
- run id
- prompt
- negative prompt if supported upstream
- model name
- mode
- aspect ratio
- resolution
- output format
- local asset directory
- source basis
When the provider exposes multiple quality tiers or resolutions, default to the highest practical tier for first-pass realism work unless the job is explicitly a cheap draft or throughput test.
This request record is the stable local truth even if provider parameters evolve.
针对每个生成任务,创建包含以下内容的本地JSON请求记录:
- 资产ID
- 运行ID
- 提示词
- 上游支持的负面提示词(如有)
- 模型名称
- 模式
- 宽高比
- 分辨率
- 输出格式
- 本地资产目录
- 源依据
当供应商提供多个质量等级或分辨率选项时,首次真实感生成工作默认使用最高实用等级,除非任务明确为低成本草稿或吞吐量测试。
即使供应商参数发生变化,此请求记录也作为稳定的本地基准。
3. Call the provider and save raw response
3. 调用供应商并保存原始响应
Use the PostPlus-supported Node scripts in this skill directory for provider calls.
Do not replace them with , inline , , or ad hoc shell
glue.
curlfetchnode -eAlways save:
- raw request JSON
- raw provider response JSON
- normalized asset manifest JSON
- final downloaded image files
Do not treat the provider response alone as the asset store.
Current first-version execution path:
- for new persona or cover candidates
generate_image - if a high-quality or async image job returns before outputs are ready
poll_prediction - if an edit job starts from a local file
upload_media - using uploaded URLs
edit_image
使用本技能目录中PostPlus支持的Node脚本进行供应商调用。请勿使用 、内联 、 或临时shell脚本替代。
curlfetchnode -e请始终保存:
- 原始请求JSON
- 原始供应商响应JSON
- 标准化资产清单JSON
- 最终下载的图片文件
不要仅将供应商响应作为资产存储。
当前第一版执行流程:
- 使用 生成新的人物形象或封面候选图
generate_image - 如果高质量或异步图片任务在输出准备好前返回,使用
poll_prediction - 如果编辑任务从本地文件开始,使用
upload_media - 使用上传的URL调用
edit_image
4. Normalize local outputs
4. 标准化本地输出
Every batch should end with a small local manifest containing:
assetIdrunIdpersonaIdconceptIdprovidermodelmodeassets[]- local path
- remote URL if any
- prompt hash
- source basis
- created time
This is the handoff to later review and render stages.
每个批量任务结束时,应生成一个小型本地清单,包含:
assetIdrunIdpersonaIdconceptIdprovidermodelmodeassets[]- 本地路径
- 远程URL(如有)
- 提示词哈希
- 源依据
- 创建时间
这是后续审查和渲染阶段的交接依据。
5. Prefer edit over full regeneration once a face is approved
5. 面部核准后优先使用编辑而非重新生成
Use mode when the user feedback is about:
edit- wardrobe tweaks
- desk setup tweaks
- lighting tweaks
- background cleanup
- microphone / accessory adjustment
Do not regenerate from scratch if the approved face and general structure are already correct.
当用户反馈涉及以下内容时,使用模式:
edit- 服装调整
- 桌面设置调整
- 光线调整
- 背景清理
- 麦克风/配件调整
如果已核准的面部和整体结构正确,请勿从头重新生成。
Path Selection Rule
路径选择规则
Store outputs inside the active project's asset structure when one already exists.
If no project-specific asset structure exists yet, choose a clear workspace
asset folder and make the chosen path explicit.
If the output location will become a long-lived handoff point, prefer confirming the destination with the user.
如果已有活跃项目的资产结构,请将输出存储在该结构内。
如果尚无项目特定的资产结构,请选择一个清晰的工作区资产文件夹,并明确所选路径。
如果输出位置将成为长期交接点,建议与用户确认目标位置。
Example Persistence Convention
示例持久化约定
One possible project-local layout is:
text
assets/<asset-id>/
asset.json
index.json
images/
candidates/
approved/
runs/
image/<run-id>/
request.json
response.json
manifest.json
upload/<run-id>/
request.json
response.json
manifest.jsonKeep the intermediates under
when they are internal execution state rather than the user-facing handoff.
runs/<work-folder>/.postplus/image-batch-runner/Do not assume this example layout is the global default.
Avoid for final assets.
/tmp一种可能的项目本地布局如下:
text
assets/<asset-id>/
asset.json
index.json
images/
candidates/
approved/
runs/
image/<run-id>/
request.json
response.json
manifest.json
upload/<run-id>/
request.json
response.json
manifest.json当中间文件属于内部执行状态而非面向用户的交接内容时,请将其保存在 。
runs/<work-folder>/.postplus/image-batch-runner/不要假设此示例布局为全局默认。
避免将最终资产存储在目录。
/tmpTool Contract
工具约定
This skill expects two tool adapters:
generate_imageupload_mediaedit_image
The normalized request/response shapes live in .
references/tool-contracts.mdFor the current hosted integration:
- calls the selected model endpoint directly
generate_image - uploads local files to hosted media storage and returns a reusable URL
upload_media - must consume uploaded image URLs, not raw local file paths
edit_image
Model selection rule:
- set to one of the hosted image endpoint keys above
request.model - default is
image-nano-banana-2-text - use Seedream sequential variants when cross-shot identity consistency matters more than single-image iteration speed
- for Seedream models, prefer explicit
size - for sequential Seedream models, set to the intended number of outputs
maxImages
本技能需要两个工具适配器:
generate_imageupload_mediaedit_image
标准化的请求/响应格式请查阅 。
references/tool-contracts.md对于当前的托管集成:
- 直接调用所选模型端点
generate_image - 将本地文件上传到托管媒体存储并返回可复用的URL
upload_media - 必须使用上传的图片URL,而非原始本地文件路径
edit_image
模型选择规则:
- 将设置为上述托管图片端点密钥之一
request.model - 默认值为
image-nano-banana-2-text - 当跨镜头身份一致性比单图迭代速度更重要时,使用Seedream序列变体
- 对于Seedream模型,优先使用显式参数
size - 对于Seedream序列模型,将设置为预期的输出数量
maxImages
Review Rule
审查规则
Before calling an image provider, verify:
- persona is benchmark-backed
- image request is tied to a real asset purpose
- the job records what should stay fixed vs vary
After generation, review:
- realism
- benchmark fit
- repeatability across 10 videos
- risk of looking like a specific copied creator
- ad-like drift
在调用图片供应商之前,请验证:
- 人物形象已通过基准验证
- 图片请求与实际资产用途相关
- 任务记录了应保持固定和可变化的内容
生成后,请审查:
- 真实感
- 基准匹配度
- 在10条视频中的可重复性
- 与特定创作者相似的风险
- 广告风格偏离
Failure Mode
失败模式
Stop and say the request is under-specified if any of these are missing:
- no locked persona or visual direction
- no asset purpose
- no source basis
- no local output path
Do not compensate for missing strategic inputs by inventing a style.
如果缺少以下任何一项,请停止操作并说明请求规格不足:
- 无锁定的人物形象或视觉方向
- 无资产用途
- 无源依据
- 无本地输出路径
不要通过自创风格来弥补缺失的战略输入。
Example Commands
示例命令
Generate from a normalized request file:
bash
node ${CLAUDE_SKILL_DIR}/scripts/generate_image.mjs \
--request /path/to/request.jsonPoll an async prediction later:
bash
node ${CLAUDE_SKILL_DIR}/scripts/poll_prediction.mjs \
--request /path/to/request.jsonUpload a local file for later edit:
bash
node ${CLAUDE_SKILL_DIR}/scripts/upload_media.mjs \
--request /path/to/upload-request.jsonRun an edit job using uploaded URLs:
bash
node ${CLAUDE_SKILL_DIR}/scripts/edit_image.mjs \
--request /path/to/edit-request.json从标准化请求文件生成图片:
bash
node ${CLAUDE_SKILL_DIR}/scripts/generate_image.mjs \
--request /path/to/request.json稍后轮询异步预测结果:
bash
node ${CLAUDE_SKILL_DIR}/scripts/poll_prediction.mjs \
--request /path/to/request.json上传本地文件供后续编辑:
bash
node ${CLAUDE_SKILL_DIR}/scripts/upload_media.mjs \
--request /path/to/upload-request.json使用上传的URL运行编辑任务:
bash
node ${CLAUDE_SKILL_DIR}/scripts/edit_image.mjs \
--request /path/to/edit-request.json