luma-imagegen
Installation
SKILL.md
Luma Image Generation Skill
Generates images using the Luma AI Photon model (Dream Machine API). Handles API key detection, interactive prompt collection, parameter selection, async polling, and final image download — all via the bundled scripts/luma_imagegen.py CLI.
When to use
- Generate a new image from a text description using Luma AI (Photon / Photon Flash)
- Use a reference image to guide style, structure, or character consistency
- Modify or stylize an existing image using Luma's
modify_image_ref
Workflow
- Check API key — detect
LUMA_API_KEYin environment. If missing, guide the user (see below). - Collect inputs — ask the user for: prompt, aspect ratio, model choice, and any optional reference images.
- Build the structured prompt — augment the user's description into a labeled spec (see prompt template below).
- Run the bundled CLI — execute
scripts/luma_imagegen.pywith the collected parameters. - Poll until complete — the script handles async polling automatically; wait for
state: completed. - Display result — show the final image URL and download the image to
output/luma/. - Iterate — if the result doesn't match expectations, adjust the prompt and re-run.