Langsung ke konten
Skillpedia
Gambar & ikon33k Β· #8694

luma-imagegen

Fungsinya

Skill ini memungkinkan agent AI Anda membuat gambar menggunakan model Photon dari Luma AI. Skill ini ditujukan untuk orang yang menginginkan gaya gambar Luma atau ingin membimbing gambar baru dengan gambar referensi.

Kapan dipakai

  • βœ“Saat Anda ingin gambar dibuat dengan Luma AI dari deskripsi tertulis.
  • βœ“Saat Anda memiliki gambar referensi dan ingin gambar baru mengikuti gayanya atau karakternya.
  • βœ“Saat Anda ingin mengubah atau mengganti gaya gambar yang sudah ada dengan Luma.

Link skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/luma-imagegen/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/luma-imagegen/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œGunakan Luma untuk membuat poster kota fantasi dalam format persegi.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent meminta prompt, bentuk gambar, dan model yang Anda inginkan. Setelah itu, agent mengirim permintaan ke Luma, menunggu hingga gambar siap, dan menyimpannya ke folder di proyek Anda.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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:

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:
    export LUMA_API_KEY=your_key_here
    
  4. Never ask the user to paste the key in chat. Ask them to set it locally and confirm when ready.
  5. Once confirmed, retry the --check-key command to verify.

Interactive questions to ask the user

Ask these questions before running the generation:

  1. Prompt (required): "What image do you want to generate? Describe the scene, subject, style, and any important details."
  2. Aspect ratio (optional, default 16:9): "What aspect ratio? Options: 1:1, 3:4, 4:3, 9:16, 16:9 (default), 9:21, 21:9"
  3. Model (optional, default photon-1): "Use photon-1 (higher quality) or photon-flash-1 (faster and cheaper)?"
  4. Reference image (optional): "Do you have a reference image URL for style or structure guidance?"

Only ask what's needed β€” skip questions the user has already answered in their message.

Running the CLI

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 conventions

  • Save final images to 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.
  • Log the generation ID for reference (useful to retrieve the image later).
  • If the generation fails, show the failure_reason from the API response.

Prompt augmentation

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:

  • Keep it con
Pertanyaan umum

Apa yang perlu saya siapkan sebelum mulai?

Anda memerlukan API key Luma yang diatur di lingkungan Anda. Jika belum ada, agent akan meminta Anda menambahkannya.

Bisakah saya mencoba lagi jika hasilnya tidak sesuai?

Bisa. Agent dapat menyesuaikan prompt dan menjalankannya lagi.

Di mana gambarnya disimpan?

Gambar diunduh ke folder luma output di dalam proyek Anda.

Detail

Deskripsi asli dari pembuat

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.

repo: davila7/claude-code-templates

Popularitas

Bintang GitHub
33k
Peringkat
#8694
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa