Skill · em Criar imagem, vídeo e arte

luma-imagegen

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.

Procedência

Antes de instalar

2 arquivos · 14,9 KB · inclui 1 script que executa: scripts/luma_imagegen.py

Instalar na sua CLI

O comando baixa a versão fixada (commit 57f899e) direto da origem, para a pasta que a CLI lê. Precisa de curl (macOS e Linux); no Windows não há comando, porque o Rook Labs é para macOS.

Claude Code

Neste projeto: instala em .claude/skills/luma-imagegen/.

d=".claude/skills/luma-imagegen"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/creative-design/luma-imagegen"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/scripts/luma_imagegen.py" "$u/scripts/luma_imagegen.py" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Global: instala em ~/.claude/skills/luma-imagegen/.

d="$HOME/.claude/skills/luma-imagegen"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/creative-design/luma-imagegen"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/scripts/luma_imagegen.py" "$u/scripts/luma_imagegen.py" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Codex

Neste projeto: instala em .agents/skills/luma-imagegen/.

d=".agents/skills/luma-imagegen"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/creative-design/luma-imagegen"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/scripts/luma_imagegen.py" "$u/scripts/luma_imagegen.py" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Global: instala em ~/.agents/skills/luma-imagegen/.

d="$HOME/.agents/skills/luma-imagegen"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/creative-design/luma-imagegen"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/scripts/luma_imagegen.py" "$u/scripts/luma_imagegen.py" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Antigravity

Neste projeto: instala em .agents/skills/luma-imagegen/.

d=".agents/skills/luma-imagegen"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/creative-design/luma-imagegen"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/scripts/luma_imagegen.py" "$u/scripts/luma_imagegen.py" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Global: instala em ~/.gemini/antigravity-cli/skills/luma-imagegen/.

d="$HOME/.gemini/antigravity-cli/skills/luma-imagegen"
u="https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/cli-tool/components/skills/creative-design/luma-imagegen"
curl -fsSL --create-dirs \
  -o "$d/SKILL.md" "$u/SKILL.md" \
  -o "$d/scripts/luma_imagegen.py" "$u/scripts/luma_imagegen.py" \
  -o "$d/LICENSE" "https://raw.githubusercontent.com/davila7/claude-code-templates/57f899e5394bb8ca166f38eacae8f0853cbfe033/LICENSE"

Peça ao Rook

Já usa o Rook Labs? Cole no chat do Rook: instale a skill https://rooklabs.sh/marketplace/cct.luma-imagegen

Prévia do SKILL.md

---
name: "luma-imagegen"
description: "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."
author: lumalabs
---

# 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

1. **Check API key** — detect `LUMA_API_KEY` in environment. If missing, guide the user (see below).
2. **Collect inputs** — ask the user for: prompt, aspect ratio, model choice, and any optional reference images.
3. **Build the structured prompt** — augment the user's description into a labeled spec (see prompt template below).
4. **Run the bundled CLI** — execute `scripts/luma_imagegen.py` with the collected parameters.
5. **Poll until complete** — the script handles async polling automatically; wait for `state: completed`.
6. **Display result** — show the final image URL and download the image to `output/luma/`.
7. **Iterate** — if the result doesn't match expectations, adjust the prompt and re-run.

## API key detection & setup

Before any API call, check for the key:

```bash
python3 ${CLAUDE_SKILL_DIR}/scripts/luma_imagegen.py --check-key
```

If `LUMA_API_KEY` is missing:
1. Tell the user the key is not set.
2. Direct them to generate one: https://lumalabs.ai/dream-machine/api/keys
3. Ask them to add it to their `.env` file or export it in their shell:
   ```bash
   export LUMA_API_KEY=your_key_here
   ```
…

Ver todo o marketplace