Image generator

From NaveedTechLab/skills-library · View interactive version

Image generator is an AI agent skill from the GitHub repository NaveedTechLab/skills-library. Generate high-quality images using multi-turn reasoning and professional creative brief methodology. Use when you need distinctive, purpose-driven visuals rather than generic AI-generated images.

How to use this skill

Skill file

Image Generator Skill

Context & Problem

Visual generation converges toward accepting first output ("looks good enough") and following technical specifications rigidly. This produces generic aesthetics and misses Gemini 3's reasoning capabilities.

This skill provides multi-turn reasoning partnership methodology with professional quality standards.


Core Principles

  1. Reasoning mode over prediction mode - Creative briefs (Story/Intent/Metaphor) activate reasoning; technical specs don't
  2. Multi-turn partnership - Teach Gemini your standards through principle-based feedback
  3. Professional quality gates - Explicit pass/fail criteria (99% spelling, not "check spelling")
  4. Autonomous agency - Batch mode without permission-asking between visuals

Dimensional Guidance

Input: Professional Creative Briefs (NOT Technical Specs)

Receive from visual-asset-workflow v5.0:

## The Story
[Narrative about what's visualized]

## Emotional Intent
[What it should FEEL like]

## Visual Metaphor
[Universal concept for instant comprehension]

## Subject / Composition / Action / Location / Style / Camera / Lighting
[Official Gemini 3 prompt structure]

## Color Semantics
Blue (#2563eb) = Authority (teaches governance)
Green (#10b981) = Execution (teaches work)

## Typography Hierarchy
Largest: Key insight (information importance drives sizing)
Medium: Supporting components
Smallest: Context

## Pedagogical Reasoning
[Why these choices serve teaching]

DO NOT convert briefs back to pixel specs - Use AS-IS to activate reasoning.

Principle: Creative briefs activate Gemini's reasoning about HOW to achieve intent visually


Workflow: Browser-Based Generation (Playwright MCP)

CRITICAL: Use gemini.google.com ONLY (NOT Google AI Studio, NOT other image generators)

Initialize once:

  1. Navigate to https://gemini.google.com/ (Playwright MCP)
  2. User signs in if needed (session persists)
  3. Select "🍌 Create Image" tool (Nano Banana Pro)

For EACH visual:

  1. Type creative brief directly into Gemini chat textbox (use condensed format in batch mode - see Token Conservation below)
  2. Press Enter to submit
  3. Wait 30-35 seconds for generation
  4. Click "Download full size image" button when ready
  5. Wait 3-5 seconds for download completion
  6. Verify quality IMMEDIATELY (6 gates below)
  7. If gates fail: Continue in same chat with principle-based feedback (max 3 iterations)
  8. If gates pass: Copy from .playwright-mcp/Gemini-Generated-Image-*.png to book-source/static/img/part-{N}/chapter-{NN}/{filename}.png
  9. Embed in lesson (Step 8.5 below)
  10. Start NEW CHAT for next visual (prevents context contamination)

Principle: New chat per visual prevents cross-contamination; immediate verification catches issues early; immediate embedding prevents orphans


Quality Gates: 5-Gate Professional Standard

ALL must pass before download:

Gate 1: Spelling Accuracy (99% standard)

Gate 2: Layout Precision

Gate 3: Color Accuracy

Gate 4: Typography Hierarchy

Gate 5: Teaching Effectiveness (<5 sec concept grasp)

Gate 6: Uniqueness Validation (NEW)

Decision:

Principle: Explicit criteria prevent "good enough" false positives; uniqueness check prevents duplicate rework


Token Conservation Mode

When: Batch mode with >8 visuals OR continuation session

Condensation strategy:

Example condensation:

ORIGINAL (250 tokens):

"Top Layer shows the Coordinator at center top with label 'Orchestrator'
featuring a conductor icon, with the role description 'Strategic oversight,
contract validation', rendered in Gold color (#fbbf24) as a Large hexagon..."

CONDENSED (80 tokens):

"Top Layer - Coordinator: Center top: 'Orchestrator' (conductor icon),
Role: 'Strategic oversight, contract validation', Gold (#fbbf24), Large hexagon."

Success metric: 60-70% token reduction while maintaining 100% first-attempt success rate

Principle: Efficiency without sacrificing reasoning activation


Immediate Embedding Workflow (Step 8.5)

After copying image to destination, BEFORE starting next visual:

  1. Determine lesson file:
  1. Find insertion point:
  1. Insert reference:

```markdown

!{Alt text from creative brief}

```

  1. Verify no code block interruption:

Why this matters: Completes the work immediately; prevents orphan images

Result: Each visual is generated → validated → placed → verified before moving to next

Principle: Immediate embedding prevents disconnect between generation and integration


Multi-Turn Reasoning Partnership (Three Roles)

Avoid: Accepting first output without evaluation

Prefer: Teaching Gemini your standards through iteration

Iteration Pattern:

Turn 1: Initial Generation

Turn 2: Principle-Based Feedback (if gates fail)

Gate 4 FAILED: Typography hierarchy incorrect

The largest text is "$100K" (supporting detail) but should be "$3T"
(key insight students must grasp).

Pedagogical reasoning: Information importance drives sizing. $3T is
the insight, not the starting value. Visual weight teaches what matters.

Increase '$3T' to dominant size (largest element). Reduce '$100K' to
supporting size. This teaches magnitude through visual hierarchy.

Turn 3: Validation

Principle: You teach Gemini (principle-based feedback), Gemini teaches you (reveals understanding), Co-evolve toward quality

Why it matters: Gemini learns your pedagogical standards across iterations


Batch Mode: Autonomous Agency

Avoid: Permission-asking between visuals

Prefer: Autonomous batch execution

When invoked with: "generate all visuals" or "batch generate"

Execute WITHOUT STOPPING:

For EACH visual in approved list:
  A. NEW CHAT (context isolation)
  B. Generate image (paste condensed creative brief)
  C. Verify quality (6 gates including uniqueness)
  D. Iterate if needed (max 3 tries)
  E. Download when pass (organized directory)
  F. Embed in lesson immediately (no orphans)
  G. Log progress ("✅ Generated N/M")
  H. IMMEDIATELY next visual (NO STOPPING)

NEVER ask:

Only report summary at END:

BATCH COMPLETE
Total: 18 visuals
✅ Generated: 16 (2K, avg 2-3 iterations)
⚠️ Deferred: 2 (quality issues after 3 tries)
Time: ~45 min
Location: book-source/static/img/part-{N}/chapter-{NN}/

Principle: Autonomous execution without interruption = efficient batch processing


Proficiency-Complexity Guardrails

From visual-asset-workflow, enforce during generation:

A2 Beginner Limits:

B1 Intermediate:

C2 Professional:

Validation during generation: "Does this visual's complexity match proficiency from creative brief?"

Principle: Complexity mismatch = pedagogical failure


Post-Generation Reflection (After Batch)

AFTER completing batch, analyze systematically:

Success patterns:

Failure analysis:

Improvement opportunities:

Output: history/visual-assets/reflections/chapter-{NN}-reflection.md

Principle: Systematic reflection → Continuous improvement


Session Interruption & Continuation Protocol

If session ends mid-batch (token limit, context overflow):

Create checkpoint file: history/visual-assets/checkpoints/part-{N}-checkpoint.md

## Batch Status: Part {N}
**Date:** 2025-11-24
**Status:** INTERRUPTED at {X}/{Y} images

### Completed:
- ✅ Image 1: {filename} (2 iterations, embedded in lesson-01.md)
- ✅ Image 2: {filename} (1 iteration, embedded in lesson-02.md)
...

### Remaining:
- ⏳ Image 8: {filename} (not started)
- ⏳ Image 9: {filename} (not started)
...

### Quality Stats (so far):
- Success rate: {X/Y} production-ready
- Avg iterations: {N}
- Gate failures: Gate 1: {n}, Gate 2: {n}...

### Continuation Instructions:
1. Read this checkpoint
2. Start at Image {next}
3. Continue autonomous batch mode
4. Update checkpoint after each image

On continuation:

Principle: Seamless recovery from interruptions maintains momentum


Anti-Patterns

Never:

Even if it seems reasonable:


Creative Variance

You tend to accept visuals after 1 iteration even with minor issues. Push for quality:

Professional content creators iterate. You should too.


Success Indicators

You'll know this skill is working when:

Result: Professional-quality visuals with distinctive aesthetics, generated autonomously with systematic quality control, embedded immediately, and recoverable from interruptions.

When NOT to Use This Skill

Common Mistakes

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.