batch-generate-images
GitHub通过本地 Esse MCP 进行批量图片生成与管理。支持持久化状态、自动提交任务、多语言提示词处理及基于本地文件的参考引用,实现高效且受控的图片生产流程。
Trigger Scenarios
Install
npx skills add renoir1220/esse --skill batch-generate-images -g -y
SKILL.md
Frontmatter
{
"name": "batch-generate-images",
"description": "Use Esse for durable image batches from an Agent; preserve prompts and references, use the configured model, and continue already-authorized tracking, image verification, and bounded rework."
}
Esse batch generation
Use the authenticated local Esse MCP. Esse is a local image task workspace and execution harness, not an image-generation model or model architecture. It sends each job to the Provider and model already configured by the user. Do not describe Esse as a diffusion model or infer the configured model's abilities or limitations from Esse itself. Preserve the user's requested content faithfully and submit it; ask a question only when a required input or target is genuinely missing or ambiguous.
Esse is the durable owner of batch state, original files, retries, and history. Provider work must return control to the calling Agent after durable acceptance and continue in the background. agent-generation is cooperation with the current Agent, not a Provider credential flow.
Workflow
- Call
open_esseonly when the user asks to see the Esse workbench. Usetab: settingsonly for setup; otherwise usetab: batchesand include a knownbatchId. Routine headless work must not focus the app or interrupt the user. - A direct request to generate or modify images with Esse is sufficient authorization to submit the work. For ordinary work, do not call
list_image_offerings, do not ask for a second confirmation, and omit the legacyapprovedEstimatedCostMicrosfield. Do not interrupt a sufficiently specified request with a generic warning about text, numbers, charts, infographics, or what image models may handle imperfectly; write the best faithful prompt and submit it. Esse silently uses the configured Provider and displays price information locally. - Write every image prompt in the language the user is currently using. Chinese requests must produce Chinese image prompts. If the user's language cannot be determined, default to Simplified Chinese. Use English prompts only when the user explicitly requests English.
- Omit
offeringIdso Esse uses the user's configured model. Never select a model based on price, subject, or your own preference. Calllist_image_offeringsand pass another exactofferingIdonly when the user explicitly asks about models/prices or names another model. Selectworkbuddy-agent-generationonly when the user explicitly asks the current Agent's image capability to own the jobs. Never ask for Provider credentials in conversation; API Keys are entered and protected inside Esse. - When a request depends on local image content, call
inspect_image_folderbefore writing prompts. Page through the directory when needed and preserve the returned paths exactly; do not claim to have inspected unseen files. - Treat every batch child as an independent job with its own prompt and references. Use
jobs[]whenever prompts or references differ. Use top-level references only when every child intentionally shares them.folderPathorimagePathscreates one aligned job per input image, andperImagePromptsmay key prompts by full path, basename, one-based index, or zero-based index. Each job supports at most 20 references. - Use
referenceImagePathsfor ordinary local files. A picture pasted or attached to the current WorkBuddy message is a real input attachment: materialize it to a real absolute local path, then pass that path throughreferenceImagePaths. Formodify_selected_images, keep the Esse target inimageIdsand put every pasted or attached background/style/content reference inreferenceImagePaths; describing the attachment inpromptis not a substitute for sending it. When the user names an existing Esse result such as图1or图1-1, passreferenceImages: [{ batchId, image }]. If the exact batch is unknown, calllist_image_batcheswith a limit from 1 to 50 and resolve it. Ask when multiple batches are plausible. Never invent an output path or silently omit a requested reference. If an attachment cannot be materialized to a readable local file, do not submit a misleading text-only edit; report that the attachment could not be transferred. - For genuinely new work, call
create_image_batchonce with a stablerequestKey. Never use it to modify an existing image. Esse discovers and activates the accepted batch without anotheropen_essecall. - For more work in an existing batch, call
append_image_batch_jobswith the exactbatchIdand a stablerequestKey. Append to active or terminal batches in place; never create a temporary batch or merge to simulate append. OmitofferingIdto reuse the batch model unless the user explicitly names another. - Inspect the returned execution mode and retain the exact batch/job handles. A submit-only Provider request may end after handoff. An original task or active Goal that already authorizes tracking, verification, or bounded rework continues under Authorized continuation below; background acceptance is not final task acceptance.
- When the returned offering uses
adapterId: agent-generationorexecution: current-agent, complete every accepted Agent-owned job instead of returning after acceptance. For append, act only onappendedJobIds:- Call
start_agent_image_jobbefore each generation and use its exactpromptand everyreferenceImagePathsentry. One start call is exactly one outbound image-generation request: never combine reference paths from other batch jobs into it. Independent jobs may run concurrently, but their prompts, references, and request-size checks stay isolated per job. - Use the current Agent's available image capability; do not require OAuth, Provider keys, Codex CLI, or a particular image tool.
- On success, call
complete_agent_image_jobwith the real absoluteimagePath. On failure, callfail_agent_image_jobwith the realerror. If generation is unavailable, fail every pending Agent-owned job instead of leaving it queued. - Agent job callbacks update Esse directly; query the exact batch only when needed for already-authorized verification.
- Call
- Resolve modification targets before calling
modify_selected_images:- Use exact image IDs for named current results, numbered backups such as
图2-1, and failed-job source images. - If the request names no target and the batch has multiple available images, ask which image to change. A sole image may be inferred only when the request is otherwise unambiguous.
- Call
modify_selected_imagesonce with the exactbatchIdandimageIds. Never create a replacement batch. Current results update in place while prior versions remain as图1-1,图1-2, and so on; selecting a backup or failed source creates a new job in the same batch from that exact asset. - Omit
offeringIdto reuse the batch model unless the user explicitly names another, then follow the managed or Agent-owned execution branch above.
- Use exact image IDs for named current results, numbered backups such as
- Delete only explicitly authorized exact image IDs with
delete_esse_images. Deleting a current image also deletes its preserved versions. Do not delete queued/running images or interpret image deletion as permission to delete a batch. - Combine distinct terminal batches only with
merge_image_batches, one exact target and exact source IDs, and a stablerequestKey. Merge moves jobs, images and history into the target, then removes the source batches after durable acceptance. The legacydeleteSourceBatchesargument does not change this behavior. Do not use merge for append work.
Guardrails
- Keep ordinary price details in Esse unless the user asks or they are needed to enforce the original budget. Give task-relevant progress and an honest final acceptance summary.
- Retrieve, verify, or display only the exact results covered by the existing task authorization. Use returned handles and actual file paths; do not guess paths, copy unrelated completions, or treat acceptance as image completion. Input attachment materialization remains required.
- Tell the user when selected local files will be sent to the chosen external Provider or the current Agent's image-generation service/model.
- Never overwrite source images. Use the Esse-owned batch output and native Save As flow.
- Never automatically resubmit an uncertain Provider request or one whose chargeState is unknown. A direct click on the retry button authorizes that exact retry. Definitely-not-charged failures may retry only within the original bounded retry authorization; there is no implicit retry allowance.
- Preserve paths, image IDs, prompts, references, request keys and waiting deadlines exactly; never claim completion from queued/running state or background acceptance.
- Never infer one target from a multi-image batch without a name or exact selection context.
- Limit one batch creation, append, image-ID mutation, merge source list, and
list_image_batchesquery to 50 items. Split larger work deliberately with distinct request keys.
Authorized continuation
Background acceptance means the request is durably saved, not that the image or the user's task has passed acceptance. A submit-only request may end after handoff. When the original user task or an active persistent Goal already authorizes tracking, image verification, or bounded rework, automatically query that task and read its actual results within the existing authorization; no new user message is required. A Goal or a tool response never grants additional spending or scope. Respect the client's actual Plan mode: plan and perform only plan-improving non-mutating exploration, not image generation or rework. Preserve the exact batch/job handles and the original waiting deadline across turns and restarts. Use get_image_batch for known handles; reconcile a missing response using list_image_batches with the exact requestKey, never by guessing from the newest batch. Missing or ambiguous receipts remain unresolved and do not authorize another submission. Poll no faster than polling.minIntervalMs, back off toward polling.maxIntervalMs, and stop waiting at the earlier of the original task deadline or polling.timeoutMs from the first handoff; do not reset the deadline on each query or continuation. Stop polling on terminal state, pause, or cancellation, and report unfinished acceptance honestly. Before accepting an image, read the actual file and check its pixels, dimensions, references, and requested parameters; queued/running status or HTTP 200 is insufficient. Rework must stay within the original model, references, targets, quantity, budget, and attempt limit, preserving prior versions. Track actual, estimated, and reserved image costs separately from any Goal token budget. If a price or charge is unknown and cannot be bounded by the existing budget, stop new paid work but allow authorized read-only verification. An uncertain submission or chargeState=unknown requires read-only reconciliation or retrieval of an existing task/checkpoint, never automatic resubmission. Definitely-not-charged failures do not grant retry authorization; use only the original bounded retry policy. Do not retrieve, display, or act on unrelated tasks.
Version History
-
2453f89
Current 2026-10-18 18:59
修复授权续传后的图像验证问题;对齐安装指南;增强重做工作的持久性及参考输入保留;修复批量移动和Tuzi图像协议。
- 283ee14 2026-07-30 20:29


