brewui:image-gen
Generates AI images via OpenRouter (Gemini/GPT-5), Z.ai GLM-image, Google Imagen 4, or OpenAI DALL-E 3 with anti-AI-slop controls. Modes: generate, edit, config, update. Triggers: generate image, create image, AI image, og image, blog image, illustration.
What this skill does
<instructions>
# Image Gen
Generates AI images via Gemini Imagen 4, OpenRouter (Gemini 2.5 Flash Image / GPT-5-image), Z.ai GLM-image, or OpenAI DALL-E 3. Applies anti-AI-slop prompt prefixes per style. Four modes: generate, edit, config, update.
**Arguments:** `$ARGUMENTS`
## Mode Routing
| Mode | Flow |
|------|------|
| generate | Phase 0 -> 1 -> 2 -> 3 -> 4 |
| edit | Phase 0 -> 1 -> 2E -> 3 -> 4 |
| config | Phase 0 -> C |
| update | Phase 0 -> U |
> **CONTEXT-AWARE MODE DETECTION (CRITICAL):**
> Mode is detected from BOTH explicit flags AND natural language context. Priority:
> 1. Explicit flags: `--edit`, `--config`, `--update` -> override everything
> 2. Context analysis of `$ARGUMENTS` text:
> - Edit signals: "edit this", "modify image", "change the", "add to image" + image path present -> **edit**
> - Config signals: "setup", "configure", "set key", "add token" -> **config**
> - Update signals: "check providers", "update models", "latest API" -> **update**
> - Everything else -> **generate** (this is 99% of cases)
> 3. Default: **generate** — just a prompt, generate the image
>
> **FAST PATH (99% case):** When `$ARGUMENTS` is just a prompt text (no flags, no mode signals):
> - Skip Steps 3-6 in Phase 1 (count, service, style, output questions)
> - Use defaults: count=1, service=gemini, style=photo, output=.claude/reports/images/
> - Go straight to config table (Step 7) + confirmation (Step 8)
> - Only AskUserQuestion if API key is missing
>
> **AGENT INVOCATION:** This skill can be called by agents (not just users). When called from an agent:
> - Treat all provided args as final — do NOT ask for confirmation of values already specified
> - Only AskUserQuestion for truly missing required values (prompt, API key)
> - The config table is still mandatory but confirmation step can be skipped if all params are explicit
> **API KEY PRIORITY** (check in order, first found wins):
> 1. Explicit key in `$ARGUMENTS` text (user pasted inline)
> 2. `.env` in project root (`source .env 2>/dev/null`)
> 3. Shell environment variable
> 4. AskUserQuestion (redirect to Phase C)
>
> **MANDATORY:** Before ANY API call, display the full resolved configuration table. User must see exactly what will be sent.
---
## Phase 0: Parse Arguments
### Step 1: Parse Flags
**EXECUTE** using Bash tool:
```bash
bash "${CLAUDE_SKILL_DIR}/scripts/parse-args.sh" $ARGUMENTS && echo "OK" || echo "FAILED"
```
Output: KEY=VALUE pairs. Store all values.
> **Also scan `$ARGUMENTS` raw text** for inline values not captured by flags:
> - API key pasted in prompt text -> extract and use (overrides `.env`)
> - Service/style mentioned in free text -> treat as flags
| Key | Default | Options |
|-----|---------|---------|
| `PROMPT` | (empty) | Free-text image description |
| `MODE` | generate | generate, edit, config, update |
| `SERVICE` | gemini | gemini, openrouter, openai |
| `STYLE` | photo | photo, illustration, art |
| `COUNT` | 1 | 1-10 |
| `OUTPUT` | .claude/reports/images/ | Directory path |
| `SIZE` | 1024x1024 | WxH format |
| `EDIT_IMAGE` | (empty) | Path to image for edit mode |
| `EDIT_INSTRUCTIONS` | (empty) | Edit instructions text |
| `PROMPT_MISSING` | false | true if no prompt in generate mode |
> **STOP if FAILED** -- check parse-args.sh output for error details.
### Step 2: Route to Mode
| Parsed MODE | Go to |
|-------------|-------|
| generate | Phase 1 |
| edit | Phase 1 |
| config | Phase C |
| update | Phase U |
---
## Phase 1: Validate and Gather
### Step 1: Load Environment and Check API Key
**EXECUTE** using Bash tool:
```bash
[ -f .env ] && set -a && . .env && set +a; bash "${CLAUDE_SKILL_DIR}/scripts/validate-key.sh" "SERVICE_HERE" && echo "OK" || echo "FAILED"
```
Replace `SERVICE_HERE` with the resolved SERVICE value.
> **If FAILED (INVALID):** Redirect to Phase C (config mode). Tell the user: "No valid API key found for {SERVICE}. Let's configure it."
### Step 2: Gather Missing Parameters
If MODE=generate and PROMPT_MISSING=true:
**ASK** using AskUserQuestion:
```
What image do you need? Describe the scene, subject, and mood.
```
Options:
- "Describe your image (e.g., 'a cozy coffee shop at sunset with warm lighting')"
- "Cancel"
Store response as PROMPT.
> **FAST PATH CHECK:** If PROMPT is provided (not missing) AND no explicit --service/--style/--count/--output flags were given:
> → Skip Steps 3-6 entirely. Use defaults (count=1, service=gemini, style=photo, output=.claude/reports/images/).
> → Jump to Step 7 (config table).
> This is the 99% path — user just wants an image from their prompt.
### Step 3: Confirm Image Count (skip on fast path)
**ASK** using AskUserQuestion:
```
How many images to generate?
```
Options:
- "1 (default, fastest)"
- "2-3 (compare variations)"
- "4+ (batch generation, up to 10)"
Update COUNT with the number. Default: 1.
> **Provider limit:** DALL-E 3 supports only 1 image per request. If SERVICE=openai and COUNT>1, generate COUNT sequential requests.
### Step 4: Confirm Service (skip on fast path)
**ASK** using AskUserQuestion:
```
Which image generation service?
| Service | Model | Speed | Quality | Cost |
|---------|-------|-------|---------|------|
| openrouter | Gemini 2.5 Flash Image | Fast | High | ~$0.001/image |
| zai | GLM-image | Fast | **Very High** | ~$0.015/image |
| gemini | Imagen 4 | Fast | Very High | Paid plan required |
| openrouter-gpt5 | GPT-5 Image | Medium | **Highest** | ~$0.01/image |
| openai | DALL-E 3 | Medium | High | $0.04-0.12/image |
```
Options:
- "openrouter (Gemini 2.5 Flash -- cheapest, default)"
- "zai (GLM-image -- flagship Z.ai, high quality)"
- "gemini (Imagen 4 -- high quality, paid plan)"
- "openrouter-gpt5 (GPT-5 Image -- highest quality, ~$0.01/img)"
- "openai (DALL-E 3 -- reliable, most expensive)"
- "Keep current: {SERVICE}"
Update SERVICE if changed. Re-validate key if service changed.
### Step 5: Confirm Style (skip on fast path)
**ASK** using AskUserQuestion:
```
Image style? This controls anti-slop prompt engineering.
- photo: Physically accurate photography -- real lighting, correct anatomy, natural materials
- illustration: Professional illustration -- clean line work, proper color theory, organic imperfections
- art: Consistent artistic medium -- unified brushwork, intentional composition, coherent color temperature
```
Options:
- "photo (realistic photography)"
- "illustration (clean vector/drawn style)"
- "art (painterly/artistic medium)"
- "Keep current: {STYLE}"
### Step 6: Confirm Output Directory (skip on fast path)
**ASK** using AskUserQuestion:
```
Where to save generated images?
```
Options:
- ".claude/reports/images/ (default)"
- "Current directory (.)"
- "Custom path (type your preferred directory)"
Update OUTPUT with chosen path.
### Step 7: Display Resolved Configuration (MANDATORY)
Output this table before proceeding. Do NOT skip this step.
```
=== Image Generation Config ===
| Parameter | Value |
|-----------|-------|
| Prompt | {PROMPT (first 80 chars)}... |
| Service | {SERVICE} ({model name}) |
| Style | {STYLE} |
| Count | {COUNT} |
| Size | {SIZE} |
| Output | {OUTPUT} |
| API Key | {first 8 chars}...{last 4 chars} |
| Est. Cost | {estimate based on service and count} |
================================
```
### Step 8: Final Confirmation
**ASK** using AskUserQuestion:
```
Proceed with generation?
```
Options:
- "Yes, generate"
- "No, change settings"
- "Cancel"
> If "change settings" -> go back to Step 4.
> If "Cancel" -> STOP with message "Image generation cancelled."
---
## Phase 2: Build Payload and Generate
### Step 1: Load Anti-Slop Instructions
Read the anti-slop reference for the resolved STYLE:
Read file: `${CLAUDE_SKILL_DIR}/references/anti-slop.md`
Extract the section matching STYLE (photo, illustration, or art). Store as ANTI_SLOP_PREFIX.
### Step 2: Build Enhanced Prompt
Combine anti-slop prefix with user prompt:
```
ENHANCED_PROMPT = ANTI_SLOP_PREFIX + "\n\n" + PROMPT
```
##Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.