Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate images, edit existing images, create short videos, run inpainting/outpainting and object-focused edits, use reference images as provider inputs, batch related media jobs from a manifest, and fetch returned media from URLs/HTML/JSON/data URLs/base64. Use when working on AI image generation, AI image editing, mask-based inpainting, outpainting, reference-image workflows, short AI video generation, product-shot variations, or reusable media-production pipelines.
.claude/skills/media-generation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | — | — |
| case-11 | ✗→✓ | ▲ Improved | — | — |
| case-07 | ✗→✓ | ▲ Improved | — | — |
| case-18 | ✗→✓ | ▲ Improved | — | — |
| case-19 | ✗→✓ | ▲ Improved | — | — |
Handle image generation, image editing, and short video generation through one workflow: choose the right modality, pass caller intent through to the provider, save outputs under tmp/images/ or tmp/videos/, and prefer the bundled helpers over ad-hoc one-off API calls.
scripts/generate_image.py for still-image generation.scripts/edit_image.py for direct image edits.scripts/mask_inpaint.py for localized edits with masks or generated regions.scripts/outpaint_image.py for canvas expansion / outpainting.scripts/generate_consistent_media.py when reference images need to be passed through.scripts/generate_video.py for video generation, especially when the provider may return async job payloads.scripts/generate_batch_media.py for repeatable batch jobs, templated variations, or auditable manifests.scripts/object_select_edit.py for simple object-vs-background edits on transparent assets or clean backdrops.data: URL, or b64_json, use scripts/fetch_generated_media.py.tmp/images/tmp/videos/Default to prompt pass-through.
Use the scripts mainly as functional helpers:
tmp/images/ or tmp/videos/tmp/images/.tmp/videos/.Use scripts/generate_image.py for direct still-image generation.
Example:
bashpython3 skills/media-generation/scripts/generate_image.py \ --prompt 'person' \ --size '1024x1024' \ --out-dir 'tmp/images' \ --prefix 'generated'
The helper:
~/.openclaw/openclaw.json by default, or --config / $OPENCLAW_CONFIG)/images/generations by defaultsize, quality, style, background, n, seed, extra-json, and extra-json-filetmp/images/ by defaultdata: URL, or b64_jsonUse scripts/edit_image.py for direct image-edit calls.
Example:
bashpython3 skills/media-generation/scripts/edit_image.py \ --image 'tmp/images/source.jpg' \ --prompt 'replace the background' \ --out-dir 'tmp/images' \ --prefix 'edited'
The helper:
/images/edits by default--mask input for localized editstmp/images/ by defaultdata: URL, or b64_jsonUse scripts/mask_inpaint.py for localized repainting tasks.
Example:
bashpython3 skills/media-generation/scripts/mask_inpaint.py \ --image 'tmp/images/source.jpg' \ --x 120 --y 80 --width 220 --height 180 \ --prompt 'replace the masked area' \ --out-dir 'tmp/images' \ --prefix 'mask-result'
The helper:
--mask image or generated regions--region specsrect-pct / ellipse-pct--expand / --shrink before feathering--mask-only for local preparation / testing without a live API call--config, --provider, --model, and --endpoint to scripts/edit_image.pyscripts/edit_image.py for the final edit callUse scripts/outpaint_image.py for extension / canvas expansion tasks.
Example:
bashpython3 skills/media-generation/scripts/outpaint_image.py \ --image 'tmp/images/source.jpg' \ --left 512 --right 512 --top 128 --bottom 128 \ --mode blur \ --prompt 'extend outward' \ --out-dir 'tmp/images' \ --prefix 'outpaint-result'
The helper:
transparent, blur, and solid initialization modes--config, --provider, --model, and --endpoint to scripts/edit_image.pyscripts/edit_image.py for the final edit callUse scripts/generate_consistent_media.py when one or more reference images need to be passed through to the provider.
Note: the script name is historical; its current role is reference-image transport and delegation.
Example:
bashpython3 skills/media-generation/scripts/generate_consistent_media.py \ --mode image \ --reference-image 'tmp/images/reference.png' \ --prompt 'character' \ --size '1024x1024' \ --out-dir 'tmp/images' \ --prefix 'reference-output'
The helper:
reference_images)autoscripts/generate_image.py or scripts/generate_video.pyUse scripts/generate_batch_media.py when the user wants several related outputs, repeatable batch rendering, or a manifest-driven workflow.
Example:
bashpython3 skills/media-generation/scripts/generate_batch_media.py \ --manifest 'tmp/images/media-batch.jsonl' \ --vars-json '{"subject":"item"}' \ --summary-out 'tmp/images/media-batch-summary.json' \ --continue-on-error \ --print-json
The helper supports:
--vars-json or --vars-filevars objects for per-item string rendering such as {index}--summary-out to persist the resolved batch result JSON--dry-run to validate a manifest before spending live generation callsUse scripts/object_select_edit.py when the source has a transparent background or a simple clean backdrop and the user wants a one-step object or background edit workflow.
Example:
bashpython3 skills/media-generation/scripts/object_select_edit.py \ --image 'tmp/images/product.png' \ --selection-mode alpha \ --edit-target background \ --prompt 'replace the background' \ --out-dir 'tmp/images' \ --prefix 'product-bg-edit'
The helper:
prepare_object_mask.pymask_inpaint.py--prepare-only for local inspection/testing without a live edit callUse scripts/generate_video.py for direct video-generation calls.
Example:
bashpython3 skills/media-generation/scripts/generate_video.py \ --prompt 'motion clip' \ --size '720x1280' \ --seconds 6 \ --out-dir 'tmp/videos' \ --prefix 'generated-video'
The helper:
/videos by defaultsize, seconds / duration, fps, seed, optional input image, extra-json, and extra-json-filetmp/videos/ by defaultUse scripts/fetch_generated_media.py for both images and videos. It can extract downloadable refs from markdown / HTML / JSON, and can also persist data: URLs or b64_json payloads directly to local files.
Before blaming the skill, check these first:
config.models.providers.<provider> existsbaseUrl and apiKey--extra-json or --extra-json-file match that provider's schemaDefaults used by the bundled scripts:
~/.openclaw/openclaw.json or $OPENCLAW_CONFIG$OPENCLAW_MEDIA_PROVIDER, otherwise the first provider found in config--model$OPENCLAW_MEDIA_IMAGE_MODEL or image-model$OPENCLAW_MEDIA_EDIT_MODEL or image-edit-model$OPENCLAW_MEDIA_VIDEO_MODEL or video-modeltmp/ or $MEDIA_GENERATION_OUTPUT_ROOT--out-dirCommon failure patterns:
provider not found → pass --provider explicitly or set $OPENCLAW_MEDIA_PROVIDERimage-model / image-edit-model / video-model) → pass --model explicitly or set the matching $OPENCLAW_MEDIA_*_MODEL env varconfig not found / invalid JSON → pass --config explicitly or fix the OpenClaw config file--endpoint and video polling paths--extra-json / --extra-json-fileapiKeyUse --print-json when debugging so the response body, resolved endpoint, and failure hints stay visible.
references/batch-workflows.mdreferences/model-capabilities.mdreferences/reference-image-workflow.mdscripts/generate_image.pyscripts/generate_consistent_media.pyscripts/edit_image.pyscripts/mask_inpaint.pyscripts/outpaint_image.pyscripts/generate_video.pyscripts/generate_batch_media.pyscripts/object_select_edit.pyscripts/prepare_object_mask.pyscripts/media_request_common.pyscripts/smoke_test.pyscripts/fetch_generated_media.py| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 15 counted toward the lift figure. The other 7 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +41 percentage points is the difference between those two pass rates over the 15 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.