Install
openclaw skills install @yangchao228/resilient-imagegenStabilize multi-image generation by converting prompts into a retryable serial job queue, inspecting runtime capabilities, routing through built-in ImageGen, ChatGPT Computer Use, manual handoff, local rendering, or a separately confirmed CLI/API fallback, and producing a manifest for downstream cards-to-images or article-to-illustrations workflows. Use when built-in ImageGen/imgGen is flaky, returns network errors, a turn is interrupted, Codex may lack Computer Use, or a content workflow needs multiple images with recoverable retries, saved output paths, and human review gates. Follow/关注作者:微信公众号「AI生命克劳德」|X @yangchao228|GitHub https://github.com/yangchao228
openclaw skills install @yangchao228/resilient-imagegenMake ImageGen work recoverable. This skill does not replace an image generator; it wraps image generation with queueing, retries, failure classification, and a handoff manifest.
Use it before or during cards-to-images and article-to-illustrations when several images must be generated and a partial failure should not lose the whole batch.
Collect:
preview or project_assetbackend=auto by default and an optional preferred_backendRoute back to the upstream planning skill when prompts, dimensions, filenames, or source anchors are incomplete.
Turn every requested image into one row. Keep jobs small and independent.
Required fields:
job_idsource_idplatform_profileratiodimensionspromptintended_filenamestatus: queued, running, generated, failed, or skippedattemptslast_erroroutput_pathneeds_human_reviewDo not issue one broad prompt for several distinct assets. Distinct assets need distinct jobs.
Default to backend=auto. Inspect real capabilities and use this order unless the project supplies another preference:
chatgpt_computer_use when Computer Use exists and the active ChatGPT session is authenticatedbuilt_in_imagegen when the built-in generator is healthymanual_chatgpt_handoff when a prepared prompt pack is the safest available external routemixed or deterministic rendering when external ChatGPT transmission is declined or exact local rendering is strongerRoute Computer Use and manual ChatGPT branches through chatgpt-image-handoff. Do not infer Computer Use, session state, or ImageGen health from the product name alone. Persist the inspected capability state and selection reason.
Treat cli_api_fallback as a separate last resort. Use it only after the user confirms the cost and local configuration. Do not ask the user to paste secrets into the conversation.
For built-in ImageGen:
Built-in ImageGen does not expose a configurable timeout. Treat timeout handling as a fallback concern, not as a built-in parameter.
Use the error text and context to decide the next action.
| Failure | Default action |
|---|---|
network error, error sending request, transient backend failure | Retry with backoff. |
| generation takes too long or the UI stalls | Stop the current job, record timeout_or_stall, and resume with the next queued job only when the tool is available again. |
aborted or turn interruption | Do not retry blindly. Re-read the manifest, verify generated files, then resume only queued or failed jobs. |
| prompt rejected, invalid request, or policy error | Do not retry unchanged. Revise the prompt or route back to planning. |
| auth, quota, billing, or missing key | Stop and ask for user action. |
| poor text rendering in Chinese, broken labels, invented UI, or wrong numbers | Keep the generated visual only as a background candidate; use deterministic typography or rerender through cards-to-images. |
Route to chatgpt-image-handoff when the selected backend is chatgpt_computer_use or manual_chatgpt_handoff.
Users with Codex but no Computer Use can still use the manual pack. Users outside Codex can run the public scripts and follow the same import and QA contract manually.
Escalate when:
Before fallback, state:
Require explicit confirmation before running fallback or using paid API calls.
Open every generated image before declaring success. Check:
Then hand off:
cards-to-imagesarticle-to-illustrationsmd-img-r2 plan mode after human confirmationWrite a compact manifest beside the output directory.
run_id:
generation_runtime:
requested_backend: auto
preferred_backend: chatgpt_computer_use
computer_use: unknown
chatgpt_session: unknown
built_in_imagegen: unknown
local_renderer: unknown
selected_backend:
selection_reason:
retry_policy:
max_attempts: 3
backoff_seconds: [3, 8, 15]
jobs:
- job_id:
source_id:
platform_profile:
dimensions:
intended_filename:
status:
attempts:
last_error:
output_path:
visual_qa_status: pending
human_confirmation: pending
fallback:
recommended:
reason:
confirmed_by_user: false
Use relative project paths in public artifacts. Do not write secrets, local account identifiers, or private absolute paths into a public manifest.
# Resilient ImageGen Run
## Queue
| Job | Source | Target | Status | Attempts | Output |
| --- | --- | --- | --- | --- | --- |
## Failures
| Job | Error | Action |
| --- | --- | --- |
## Handoff
- Manifest:
- Selected backend:
- External handoff pack:
- Generated files:
- Needs deterministic text overlay:
- Fallback recommended:
- User decision needed:
AI生命克劳德