Use when the user asks to generate images via the Luma AI API (Dream Machine / Photon); collects a prompt and options interactively, then calls the API using the bundled script. Requires LUMA_API_KEY — will prompt the user if missing.
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.
modify_image_refLUMA_API_KEY in environment. If missing, guide the user (see below).scripts/luma_imagegen.py with the collected parameters.state: completed.output/luma/.Before any API call, check for the key:
python3 ${CLAUDE_SKILL_DIR}/scripts/luma_imagegen.py --check-key
If LUMA_API_KEY is missing:
.env file or export it in their shell:
export LUMA_API_KEY=your_key_here
--check-key command to verify.Ask these questions before running the generation:
16:9): "What aspect ratio? Options: 1:1, 3:4, 4:3, 9:16, 16:9 (default), 9:21, 21:9"photon-1): "Use photon-1 (higher quality) or photon-flash-1 (faster and cheaper)?"Only ask what's needed — skip questions the user has already answered in their message.
python3 ${CLAUDE_SKILL_DIR}/scripts/luma_imagegen.py \
--prompt "YOUR AUGMENTED PROMPT" \
--aspect-ratio 16:9 \
--model photon-1 \
[--image-ref "https://example.com/ref.jpg" --image-ref-weight 0.85] \
[--out output/luma/]
All flags:
| Flag | Default | Description |
|------|---------|-------------|
| --prompt | (required) | Text description of the image |
| --aspect-ratio | 16:9 | 1:1, 3:4, 4:3, 9:16, 16:9, 9:21, 21:9 |
| --model | photon-1 | photon-1 or photon-flash-1 |
| --image-ref | — | Public URL for style/structure reference |
| --image-ref-weight | 0.85 | Weight of reference image (0.0–1.0) |
| --modify-ref | — | Base image URL to modify |
| --modify-ref-weight | 0.5 | Weight for modification fidelity |
| --out | output/luma/ | Output directory for downloaded images |
| --poll-interval | 3 | Seconds between polling requests |
| --check-key | — | Verify LUMA_API_KEY is set and exit |
output/luma/ with descriptive filenames (e.g., photon1_hero_16x9.png). The output directory is relative to the current working directory when the script is invoked.failure_reason from the API response.Reformat the user's description into a structured spec. Only make implied details explicit — do not invent new requirements.
Template (include only relevant lines):
Primary request: <user's main prompt>
Scene/background: <environment or setting>
Subject: <main subject>
Style/medium: <photo/illustration/3D/cinematic/etc>
Composition/framing: <wide/close-up/overhead; subject placement>
Lighting/mood: <lighting type and emotional tone>
Color palette: <dominant colors or palette notes>
Aspect ratio: <e.g., 16:9 landscape>
Avoid: <elements to exclude>
Augmentation rules:
Primary request: a misty mountain lake at sunrise
Scene/background: alpine lake surrounded by pine trees, light morning fog
Style/medium: photorealistic nature photography
Composition/framing: wide panoramic, lake centered, mountains in background
Lighting/mood: golden hour, warm and serene
Aspect ratio: 16:9 landscape
Avoid: people, boats, watermarks, oversaturation
Primary request: a ceramic coffee mug on a wooden table
Scene/background: warm kitchen interior, soft bokeh background
Subject: minimalist white ceramic mug, steam rising
Style/medium: clean product photography
Lighting/mood: soft diffused window light
Aspect ratio: 1:1 square
Avoid: text, logos, harsh shadows, clutter
photon-flash-1 for quick iteration; switch to photon-1 for final quality.| Model | Speed | Quality | Best for |
|-------|-------|---------|----------|
| photon-1 | Slower | Higher | Final assets, complex scenes |
| photon-flash-1 | Fast | Good | Rapid iteration, drafts |
The script uses only the Python standard library. No additional packages are required.
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/luma-imagegen · pinned to the source commit
# Run from your project root
git clone https://github.com/davila7/claude-code-templates.git .skillboard-tmp
git -C .skillboard-tmp checkout 5cc17cf267132cc690dee82239b80a99ec82e4f8
mkdir -p ".claude/skills"
cp -r ".skillboard-tmp/cli-tool/components/skills/creative-design/luma-imagegen" ".claude/skills/"
rm -rf .skillboard-tmpReview the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
sudo apt update && sudo apt install -y gitnpm install -g @anthropic-ai/claude-code# Run from your project root
git clone https://github.com/davila7/claude-code-templates.git .skillboard-tmp
git -C .skillboard-tmp checkout 5cc17cf267132cc690dee82239b80a99ec82e4f8
mkdir -p ".claude/skills"
cp -r ".skillboard-tmp/cli-tool/components/skills/creative-design/luma-imagegen" ".claude/skills/"
rm -rf .skillboard-tmpDestination: .claude/skills/luma-imagegen
Scanner static-checks@0.1.0 · commit 5cc17cf26713. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
References credentials, tokens or secret files that a skill should not need.
Evidence: [redacted]· fingerprint ccae6d912a41bfef