skills/infographics/references/iterative_refinement.md
The generate-review-refine loop, the command-line reference, and configuration.
┌─────────────────────────────────────────────────────┐
│ 1. Generate infographic with Nano Banana Pro │
│ ↓ │
│ 2. Review quality with Gemini 3.6 Flash │
│ ↓ │
│ 3. Score >= threshold? │
│ YES → DONE! (early stop) │
│ NO → Improve prompt, go to step 1 │
│ ↓ │
│ 4. Repeat until quality met OR max iterations │
└─────────────────────────────────────────────────────┘
Gemini 3.6 Flash evaluates each infographic on:
Visual Hierarchy & Layout (0-2 points)
Typography & Readability (0-2 points)
Data Visualization (0-2 points)
Color & Accessibility (0-2 points)
Overall Impact (0-2 points)
Each generation produces a JSON review log:
{
"user_prompt": "5 benefits of exercise...",
"infographic_type": "list",
"style": "healthcare",
"doc_type": "marketing",
"quality_threshold": 8.5,
"iterations": [
{
"iteration": 1,
"image_path": "figures/exercise_v1.png",
"score": 8.7,
"needs_improvement": false,
"critique": "SCORE: 8.7\nSTRENGTHS:..."
}
],
"final_score": 8.7,
"early_stop": true,
"early_stop_reason": "Quality score 8.7 meets threshold 8.5"
}
python skills/infographics/scripts/generate_infographic.py [OPTIONS] PROMPT
Arguments:
PROMPT Description of the infographic content
Options:
-o, --output PATH Output file path (required)
-t, --type TYPE Infographic type preset
-s, --style STYLE Industry style preset
-p, --palette PALETTE Colorblind-safe palette
-b, --background COLOR Background color (default: white)
--doc-type TYPE Document type for quality threshold
--iterations N Maximum refinement iterations (default: 3)
--api-key KEY OpenRouter API key
-v, --verbose Verbose output
--list-options List all available options
python skills/infographics/scripts/generate_infographic.py --list-options
Set your OpenRouter API key:
export OPENROUTER_API_KEY='your_api_key_here'
Get an API key at: https://openrouter.ai/keys