Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sammcj-invokeai-image-gen
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/invokeai-image-gen
What's inside
- Skill name
invokeai-image-gen- Description
- Generate images using InvokeAI's local API. Use when asked to generate, create, or make images with InvokeAI, FLUX.2 Klein, Z-Image Turbo, FLUX, or SDXL models. Supports text-to-image generation, automatic model detection, image download, and parameter selection based on model architecture.
- License
- Apache-2.0
- Instructions
- 118 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (2)
- SKILL.md
- generate.py · scripts/
SKILL.md (first lines)
# InvokeAI Image Generation
Generate images via InvokeAI's REST API. Supports FLUX.2 Klein (default), Z-Image Turbo, FLUX.1, and SDXL.
## Quick Start
Simply call the script with your prompt and the output file name:
```bash
python scripts/generate.py -p "A dramatic sunset over snow-capped mountains, warm orange light reflecting off a still alpine lake in the foreground. Soft clouds catch the fading light." -o sunset.png
```
## Overriding The Default Model
If the user asks you to use a specific model, first find the model key, then use it in the command:
```bash
python scripts/generate.py --list-models | grep -i 'flux'
python scripts/generate.py -p "A tabby cat with bright green eyes sits on a weathered wooden windowsill, soft afternoon light streaming through lace curtains. Cosy, intimate mood." --model MODEL_KEY -o cat.png
```
## Options
| Option | Description |
|--------|-------------|
| `--prompt, -p` | Generation prompt (required) |
| `--negative, -n` | Negative prompt (SDXL only) |
| `--model, -m` | Model key (UUID) or partial name match |
| `--width, -W` / `--height, -H` | Dimensions |
| `--steps, -s` | Denoising steps |
| `--cfg, -c` | CFG scale |
| `--guidance, -g` | Guidance strength (FLUX.1 only) |
| `--scheduler` | Sampling scheduler |
| `--seed` | Random seed |
| `--output, -o` | Output path (default: invokeai-{seed}.png) |
| `--list-models` | List installed models |
| `--json` | JSON output |
## Model Defaults
Note: FLUX.2 Klein is the latest model which is used by default.
| Model | Steps | Guidance | CFG | Scheduler |
|-------|-------|----------|-----|-----------|
| FLUX.2 Klein | 4 | 3.5 | 1.0 | euler |
| Z-Image Turbo | 9 | - | 1.0 | euler |
| **FLUX.1 dev** | 28 | 3.5 | 1.0 | euler |
| **FLUX.1 Krea dev** | 28 | 4.5 | 1.0 | euler |
| **FLUX.1 Kontext dev** | 28 | 2.5 | 1.0 | euler |
| **FLUX.1 schnell** | 4 | 0.0 | 1.0 | euler |
| SDXL | 25 | - | 6.0 | dpmpp_2m_k |
| SDXL Turbo | 8 | - | 1.0 | dpmpp_sde |
All models default to 1024x1024. FLUX requires dimensions divisible by 16, SDXL by 8.
### FLUX.1 Variant Notes
- **FLUX.1 dev**: Standard text-to-image model, balanced quality/speed
- **FLUX.1 Krea dev**: Fine-tuned for aesthetic photography, use higher guidance (4.5)
- **FLUX.1 Kontext dev**: Image editing model, use lower guidance (2.5)
- **FLUX.1 schnell**: Distilled fast model, 4 steps, no guidance needed
## Model Selection
Auto-priority: Klein > Z-Image > FLUX > SDXL
Detection by name/base:
- **flux2_klein**: "klein" in name or "flux2" in base
- **flux_krea**: "krea" in name (FLUX.1 base)
- **flux_kontext**: "kontext" in name (FLUX.1 base)
- **flux_schnell**: "schnell" in name (FLUX.1 base)
- **flux**: "flux" in base (standard dev)
- **zimage**: "z-image" in base or "z-image/zimage" in name
- **sdxl**: "sdxl" in base (turbo/lightning variants auto-detect)
## Prompting (general information, but especially useful for FLUX.2 Klein)
Write prose, not keywords. Structure: **Subject -> Setting -> Details -> Lighting -> Atmosphere**
```
A weathered fisherman in his late sixties stands at the bow of a wooden boat,
wearing a salt-stained wool sweater. Golden hour sunlight filters through
morning mist, creating quiet determination and solitude.
```
**Key techniques:**
1. Front-load critical elements (word order matters)
2. Specify lighting: source, quality, direction, temperature
3. Include sensory texture: materials, reflections, atmosphere
**Good:** "A woman with short blonde hair poses against a light neutral background wearing colourful earrings, resting her chin on her hand."
**Bad:** "woman, blonde, short hair, neutral background, earrings"
Append style tags: `Style: Country chic. Mood: Serene, romantic.`
## Troubleshooting
| Issue | Solution |
|-------|----------|
| Connection refused | Check InvokeAI is running |
| Model not found | Use `--list-models` for valid keys |
| Dimensions error | FLUX: multiples of 16, SDXL: 8 |
| Black images (macOS) | Set `precision: bfloat16` in invokeai.yaml |
If the script fails to find the URL or authentication token, you can set or ask the user to set environment variables:
```bash
export INVOKEAI_API_URL='http://localhost:9090'
export INVOKEAI_AUTH_TOKEN='your-token' # Optional
```
## Resources
- `scripts/generate.py` - Main generation scriptFrom sammcj/agentic-coding, Apache-2.0.
More from sammcj/agentic-coding
- 0.740score
release-debrief
Sam McLeod (adapted from Arjen Schwarz)
Summarises the delta between a tool's latest release and the last summary the user saw.
SkillBFreshness: B★ 167Claude Code - 0.732score
ambitious-model-use
sammcj
Use when the user asks to be more ambitious with an AI task: aim at the outcome behind it, work it like a field-leading expert from raw data, or bring in…
SkillAFreshness: A★ 167Claude Code +9 - 0.732score
rewrite-slop
sammcj
Use when explicitly asked to review or rewrite AI-generated text or UI so it reads as human, or with phrasings like "de-slop", "humanise this", "make it sound…
SkillAFreshness: A★ 167Claude Code +9 - 0.732score
ai-changelog
sammcj
Set up an AI-driven changelog system in any project, code or not.
SkillAFreshness: A★ 167Claude Code +9 - 0.732score
extract-wisdom
sammcj
Extract wisdom, insights, and actionable takeaways from YouTube videos, blog posts, articles, or text files.
SkillAFreshness: A★ 167Claude Code - 0.729score
retro
sammcj
Retrospective on a coding session that proposes changes to the agent's environment (checks, pointers, steering, tooling) so the next run goes better.
SkillAFreshness: A★ 167Claude Code +9 - 0.728score
skill-creator-primer
sammcj
You **MUST** load this skill before the skill-creator skill AND before making ANY change to, or conducting a review of ANY Agent Skill.
SkillAFreshness: A★ 167Claude Code +9 - 0.728score
deferred-task-execution
sammcj
Delays execution of a task until a specified time or after a duration.
SkillAFreshness: A★ 167Claude Code +9 - 0.727score
prompt-enhancer
sammcj
Transform poor or overly simple prompts with expert-level framing.
SkillAFreshness: A★ 167Claude Code +9 - 0.727score
find-docs
sammcj
Retrieves up-to-date documentation, API references and code examples for any developer technology.
SkillAFreshness: A★ 167Claude Code +9 - 0.727score
backlog
sammcj
Capture single backlog items, or list and triage an existing project backlog.
SkillAFreshness: A★ 167Claude Code +9 - 0.727score
creating-development-plans
sammcj
Creates structured development plans with phased task breakdowns, requirements, and QA checklists.
SkillAFreshness: A★ 167Claude Code +9
Signals
- Stars
- 167
- Forks
- 25
- Open issues
- 0
- Last commit (this folder)
- Apr 28, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/sammcj/agentic-coding
- Website
- smcleod.net
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from sammcj
- 0.732score
extract-wisdom
sammcj
Extract wisdom, insights, and actionable takeaways from YouTube videos, blog posts, articles, or text files.
SkillAFreshness: A★ 167Claude Code - 0.732score
rewrite-slop
sammcj
Use when explicitly asked to review or rewrite AI-generated text or UI so it reads as human, or with phrasings like "de-slop", "humanise this", "make it sound…
SkillAFreshness: A★ 167Claude Code +9 - 0.732score
ai-changelog
sammcj
Set up an AI-driven changelog system in any project, code or not.
SkillAFreshness: A★ 167Claude Code +9 - 0.732score
ambitious-model-use
sammcj
Use when the user asks to be more ambitious with an AI task: aim at the outcome behind it, work it like a field-leading expert from raw data, or bring in…
SkillAFreshness: A★ 167Claude Code +9 - 0.729score
retro
sammcj
Retrospective on a coding session that proposes changes to the agent's environment (checks, pointers, steering, tooling) so the next run goes better.
SkillAFreshness: A★ 167Claude Code +9 - 0.728score
deferred-task-execution
sammcj
Delays execution of a task until a specified time or after a duration.
SkillAFreshness: A★ 167Claude Code +9
Cite this page
invokeai-image-gen skill. Agent Mart. https://agentmart.dev/skills/sammcj-invokeai-image-gen (last updated 2026-10-24)