--- name: generate-image description: Use when user asks to generate, create, draw, or make an image or picture. Triggers on phrases like "generate an image of", "make a picture of", "create an image", "draw me a". --- # Generate Image with FLUX.2 Klein Use this skill to generate images locally using the FLUX.2 Klein 4B model. ## Workflow 1. **Craft a rich prompt** using the FLUX formula: `[Subject] + [Action/Pose] + [Style/Medium] + [Setting] + [Lighting] + [Camera]` - Preserve all specific details the user mentioned - Add lighting if not specified: golden hour, soft diffused, dramatic rim, studio three-point - Add camera if not specified: "shot on Hasselblad 85mm f/2.8, shallow depth of field" - Use hex codes for specific colors (e.g. "#1A2B3C deep navy") - Describe what you WANT — negative prompts don't work with this model 2. **Run the script:** ```bash source ~/venvs/flux/bin/activate && python3.11 ~/Documents/gen-images/claude-cli/flux_klein.py --prompt "" ``` 3. **Parse the output path** from the last line of stdout (`Saved to `) 4. **Auto-open in Preview:** ```bash open ``` 5. **Report the path** to the user. ## Prompt Formula Example User: "a fisherman at sunset" Good prompt: > A weathered fisherman in his 70s, navy cable-knit sweater, standing at the helm of a wooden boat. Golden hour light from the left, dramatic rim lighting. Shot on Hasselblad 85mm f/2.8, shallow depth of field, Kodak Portra 400 color science. ## Notes - Output saved to `~/Documents/gen-images/claude-cli/.png` - Model: FLUX.2 Klein 4B at `~/models/flux2-klein-4b` on MPS - Generation takes ~30-60 seconds on Apple Silicon