Generates publication-quality illustrations using a 5-agent pipeline inspired by PaperBanana (academic illustration framework). Orchestrates specialized agents: Retriever, Planner, Stylist, Visualizer, and Critic. Use when users need high-quality, iterative image generation with style consistency and quality review.
From kw-pluginnpx claudepluginhub kwiggen/claude-code-plugin --plugin kw-pluginThis skill uses the workspace's default tool permissions.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Details PluginEval's skill quality evaluation: 3 layers (static, LLM judge), 10 dimensions, rubrics, formulas, anti-patterns, badges. Use to interpret scores, improve triggering, calibrate thresholds.
You are the orchestrator for a 5-agent image generation pipeline. Your role is to coordinate specialized agents that work together to produce publication-quality illustrations.
| Agent | Role | Responsibility |
|---|---|---|
| retriever | Reference Scout | Searches codebase and available resources for reference images, examples, and style inspiration matching the requested output |
| planner | Content Architect | Converts the user's description into a detailed, structured image specification with composition, elements, and requirements |
| stylist | Style Enforcer | Synthesizes style guidelines from references, defines color palette, typography, layout rules, and visual consistency standards |
| visualizer | Image Creator | Uses the image-generator skill to generate the actual image based on the spec and style guide |
| critic | Quality Reviewer | Evaluates output against the specification, provides structured refinement feedback, decides if another iteration is needed |
User Request
→ Retriever (find references)
→ Planner (create spec)
→ Stylist (define style)
→ Visualizer (generate image)
→ Critic (evaluate)
→ [Loop back to Visualizer if needed, max 3 iterations]
→ Final Output
Parse the user's request to extract:
If the request is vague, ask 2-3 clarifying questions using AskUserQuestion.
Use TeamCreate to create a team named paper-banana:
Then create 5 tasks with TaskCreate — one for each agent's work:
Set up dependencies:
Spawn teammates using the Task tool with team_name: "paper-banana":
Retriever (general-purpose agent):
Search the current project and codebase for visual references, existing images,
or style examples that match: [user request].
Look for:
- Existing images in the project (PNG, JPG, SVG files)
- Style guides or brand guidelines
- Color schemes in CSS/config files
- Similar illustrations in docs/
Return a structured report with:
- Found references (file paths)
- Recommended style direction
- Color palette suggestions
Planner (general-purpose agent):
Create a detailed image specification for: [user request]
Using references from the Retriever, write a spec covering:
- Composition layout (rule of thirds, symmetry, etc.)
- Primary and secondary elements
- Background treatment
- Text placement (if any)
- Required visual elements
- Mood and tone
- Dimensions and aspect ratio
Stylist (general-purpose agent):
Create a style guide for the illustration based on references and spec.
Define:
- Color palette (primary, secondary, accent — hex values)
- Visual style (flat, gradient, 3D, hand-drawn, etc.)
- Line weight and treatment
- Typography style (if text is needed)
- Consistency rules for maintaining visual coherence
- Do's and Don'ts
Visualizer (general-purpose agent):
Generate the image using the image-generator skill.
Use the spec from Planner and style guide from Stylist to create
an enhanced prompt. Then invoke the CLI:
node {pluginDir}/dist/image-gen/cli.js \
--prompt "[enhanced prompt from spec + style]" \
--output "[output path]" \
--size 4K
If reference images were found by the Retriever, include them
with --reference flags.
Critic (general-purpose agent):
Evaluate the generated image against the specification.
Check:
- Does it match the composition spec?
- Does it follow the style guide?
- Is the quality sufficient for the intended purpose?
- Are there artifacts, distortions, or unwanted elements?
Report status using the standard subagent protocol:
| Status | Meaning | Action |
|--------|---------|--------|
| **DONE** | Image meets spec, ready for delivery | Proceed to delivery |
| **DONE_WITH_CONCERNS** | Image is acceptable but has minor issues worth noting | Deliver with notes |
| **NEEDS_CONTEXT** | Cannot evaluate — missing spec, style guide, or reference | Request missing input |
| **BLOCKED** | Fundamental problems — needs a completely new approach | Report to orchestrator |
If status is DONE_WITH_CONCERNS, include specific issues and suggest prompt
adjustments for an optional refinement pass.
Present the final result to the user:
Image generated:
[path]Specification: [brief summary of what was created] Style: [brief style description] Iterations: [number of iterations taken] Critic verdict: [final verdict]
Want me to make any adjustments?
Shut down all teammates and delete the team when done.
/generate-image for quick, single-shot image generation/paper-banana when you need: