Logo di Image Gen

Image Gen

Community
MoizIbnYousaf
image-gen

Generate images using the brand's visual identity and Gemini API. Reads brand/creative-kit.md for visual style, crafts narrative prompts, and produces images via Nano Banana Pro (gemini-3-pro-image-preview). Supports on-brand and freestyle modes. Use when the user needs a blog header, social graphic, product shot, hero image, banner, thumbnail, or any generated image. Also use proactively when building content that would benefit from visuals. Triggers on "generate image", "create image", "make me an image", "blog header", "social graphic", "product shot", "hero image", "banner", "thumbnail", "I need an image", "visual for", or any request for generated artwork. Even if they just say "image" or "picture for this" — this is the skill.

Panoramica

Pubblicato daMoizIbnYousaf
Repositorymarketing-cli
Nome della skillimage-gen
Stelle
35
Fork
5
File inclusi
2
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 2

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da MoizIbnYousaf su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Image Gen in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/MoizIbnYousaf/marketing-cli/tree/main/skills/image-gen
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MoizIbnYousaf/marketing-cli.git /tmp/marketing-cli
mkdir -p .claude/skills
cp -r /tmp/marketing-cli/skills/image-gen .claude/skills/image-gen
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Image Gen in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Image Gen non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Image Gen non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

/image-gen — On-Brand Image Generation

Describe what you need. Get an image that looks like your brand made it.

This skill reads your visual brand identity from brand/creative-kit.md, crafts a narrative prompt that bakes in your style constraints, and generates the image via Gemini API. No brand style defined yet? It still works — just at a lower enhancement level. Run /visual-style first for the best results.


On Activation

  1. Check GEMINI_API_KEY environment variable.

    • If missing: "Image generation requires a Gemini API key. Set GEMINI_API_KEY in your environment. Get one at ai.google.dev."
    • Do not proceed without it.
  2. Read brand files in priority order:

    • brand/creative-kit.md — look for ## Visual Brand Style section
    • brand/voice-profile.md — personality informs image tone
    • brand/positioning.md — angles inform visual metaphors
    • brand/landscape.md — Claims Blacklist (don't generate imagery that visually implies blacklisted claims)
  3. Determine enhancement level:

LevelContext availableImage quality
L0No brand filesGood generic images — uses discovery questions + prompt craft
L1voice-profile.mdPersonality-aligned — playful brand gets warm/bright images
L2+ creative-kit.md colors/typographyColor-constrained — palette woven into prompts
L3+ Visual Brand Style sectionFully on-brand — style anchors, lighting, mood, composition all applied

Phase 1: Discovery

Use AskUserQuestion. Ask one at a time. Skip questions the user already answered in their request.

Question 1: Purpose "What's this image for?"

  • Blog header / article illustration
  • Social media post (which platform?)
  • Product shot / marketing asset
  • Hero image / landing page
  • Presentation / slide deck
  • Something else (describe it)

This determines aspect ratio:

Use caseDefault ratioResolution
Blog header16:92K
Social square1:12K
Social story9:162K
Hero / banner21:92K
Product shot4:34K
Thumbnail16:91K

Question 2: Feeling "What should someone feel when they see this?" (Free text — this drives the prompt's emotional anchor)

Question 3: Style override (only if L3 brand style exists) "Use your on-brand style, or something different?"

  • On-brand (default) — applies Visual Brand Style from creative-kit.md
  • Different — describe the style you want instead

If user picks "different," their description overrides the brand style for this image only.

Skip discovery when: The user's request is specific enough. "Generate a 16:9 blog header showing a glowing terminal on a dark background, warm rim lighting" — don't ask what they want, they just told you.


Phase 2: Prompt Crafting (Nano Banana Prompt Engineering)

You are an expert Nano Banana prompt engineer. Your job is to turn the user's brief into a single, high-quality prompt for Nano Banana 2 (or Pro), a "thinking" image model used for professional asset production.

Core principle: brief a senior art director, don't list keywords. Write natural language in full sentences. Never use "tag soup" like "dog, park, 4k, realistic."

The 10 Rules

1. General style. Be specific and descriptive about subject, setting, composition, camera/viewpoint, lighting, mood, materials, and textures. Full sentences, not comma lists.

2. Context and purpose. Always encode the purpose and audience (YouTube thumbnail, app icon, hero banner, tweet graphic, 4K wallpaper). Let purpose guide style, polish level, and framing.

3. Text and infographics. If text must appear, put it clearly in quotes in the prompt. Ask for legible, clean typography and specify style (bold sans-serif, monospace, handwritten). For data, ask the model to compress into infographics, diagrams, or whiteboards.

4. Character and brand consistency. When reference images exist, explicitly refer to them: "Keep the person's facial features exactly the same as Image 1." Allow changes in pose, expression, angle while preserving identity.

5. Grounding and realism. For real data, locations, or products, tell the model to rely on up-to-date factual knowledge. Encourage coherent details consistent with physics.

6. Editing and restoration. For edits to existing images, give semantic instructions: "remove," "replace," "add," "restore," "change the season." Maintain original structure, only change what's intended.

7. Dimensional and structural control. For floor plans, schematics, wireframes, grids, tell the model to follow that layout closely. For 2D↔3D, describe how the new representation should look while preserving key relationships.

8. Resolution, detail, and format. Specify resolution ("high detail suitable for 4K wallpaper," "clean 16:9 thumbnail"). Call out micro details and textures when needed (brushed steel, cracked paint, mossy stone).

9. Narrative and sequences. For multiple images, describe the story arc, emotional beats, what stays consistent across images. Specify count, format, and identity/style consistency.

10. Output rules. Do not ask follow-up questions about the prompt. Resolve small ambiguities with sensible professional defaults. Output a single flowing narrative prompt.

Prompt Structure

Build the narrative in this order, woven into flowing prose:

  1. Purpose and format — what this is for, aspect ratio, resolution
  2. Scene — what's happening, where, environment
  3. Subject — detailed description with textures, materials, poses
  4. Composition — framing, focal point, depth of field, negative space
  5. Lighting — source, quality, color temperature, interaction with materials
  6. Mood — emotional tone, atmosphere
  7. Text — any text in quotes with typography specification
  8. Technical — camera/lens for photorealistic, style reference for illustrated

Brand Constraints (L3)

When Visual Brand Style exists, weave constraints INTO the narrative — don't add as a separate block:

  • Primary Aesthetic → sets overall style direction
  • Lighting → overrides generic lighting with brand-specific lighting
  • Backgrounds → constrains background treatment
  • Composition → constrains layout/framing
  • Mood → anchors emotional tone
  • Avoid → explicit exclusions baked into prompt
  • Reference Prompts → use as structural templates, adapting subject matter

See references/prompt-patterns.md for proven patterns. See references/visual-metaphors.md for concept-to-metaphor mapping.


Phase 3: Generate

Gemini API Call

python
import os
from google import genai
from google.genai import types

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])

response = client.models.generate_content(
    model="gemini-3.1-flash-image-preview",
    contents=["<narrative prompt>"],
    config=types.GenerateContentConfig(
        response_modalities=['TEXT', 'IMAGE'],
        image_config=types.ImageConfig(
            aspect_ratio="<ratio>",
            image_size="<resolution>",
        ),
    ),
)

for part in response.parts:
    if part.text:
        print(part.text)
    elif part.inline_data:
        image = part.as_image()
        image.save("output.png")

Default to gemini-3.1-flash-image-preview (Nano Banana 2). Launched Feb 26, 2026. Pro quality at Flash speed/pricing. 4K support, up to 14 reference images for style consistency. Use gemini-3-pro-image-preview (Nano Banana Pro) only when text-heavy infographics or premium quality justify the higher cost.

Save and Log

  1. Save image to project directory (e.g., images/, assets/, or wherever the project keeps visuals)
  2. Append to brand/assets.md:
    | <date> | image | <file-path> | image-gen | <1-line description of what was generated> |

Phase 4: Iterate

After generating, show the image and offer:

"Image generated. Want me to:"

  1. Adjust the lighting or mood
  2. Change the composition or framing
  3. Try a completely different approach
  4. Generate more variations
  5. Ship it

For adjustments, use Gemini's multi-turn chat API for iterative refinement — pass the previous image + adjustment prompt.

python
chat = client.chats.create(model="gemini-3-pro-image-preview")
response = chat.send_message("Make the lighting warmer and add more negative space on the left for text")

Image Editing

When the user provides an existing image to modify:

python
from PIL import Image

img = Image.open("input.png")
response = client.models.generate_content(
    model="gemini-3-pro-image-preview",
    contents=["<edit instruction>", img],
    config=types.GenerateContentConfig(
        response_modalities=['TEXT', 'IMAGE'],
    ),
)

Supports: style transfer, background replacement, object removal, color grading, text overlay.


Claims Blacklist Awareness

If brand/landscape.md exists, check the Claims Blacklist before generating:

  • Don't generate imagery that visually implies "the only X" if that claim is blacklisted
  • Don't generate competitor comparisons that misrepresent the competitive landscape
  • When in doubt, describe the concept to the user and ask if it implies a blacklisted claim

Anti-Patterns

Anti-patternWhy it failsInstead
Listing comma-separated keywords"professional, modern, tech, blue, minimal" produces generic AI artWrite a narrative: "A single glowing terminal on a dark slate desk, soft amber rim lighting catching the screen edges"
Ignoring aspect ratioGenerating 1:1 for a blog header means the user has to crop, losing compositionAlways ask where the image goes FIRST — ratio determines everything
Overriding brand style silentlyUser defined a visual brand identity for consistency — ignoring it defeats the purposeDefault to brand style. Only override when user explicitly asks for something different
Generating without purpose"A nice image" produces nothing distinctiveEvery image needs a purpose (blog header, social, hero) and a feeling (trust, excitement, calm)
Saving as JPEG when PNG neededGemini returns JPEG by default — transparency and quality lossAlways convert to PNG with image.save("output.png", format="PNG")
Skipping the assets logFuture agents won't know what images exist, leading to duplicate generationAlways append to brand/assets.md after generating

Related Skills

  • /visual-style — builds the Visual Brand Style section this skill reads
  • /creative — produces multi-mode creative briefs (not pixels). Route here for ad concepts and video scripts
  • /paper-marketing — designs in Paper MCP. Route here for carousels, slideshows, and social graphics designed as HTML
  • /app-store-screenshots — specialized screenshot generator for App Store listings

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Image Gen?

Generate images using the brand's visual identity and Gemini API. Reads brand/creative-kit.md for visual style, crafts narrative prompts, and produces images via Nano Banana Pro (gemini-3-pro-image-preview). Supports on-brand and freestyle modes. Use when the user needs a blog header, social graphic, product shot, hero image, banner, thumbnail, or any generated image. Also use proactively when building content that would benefit from visuals. Triggers on "generate image", "create image", "make me an image", "blog header", "social graphic", "product shot", "hero image", "banner", "thumbnail"...

Perché usare Image Gen su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Image Gen è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Image Gen in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/MoizIbnYousaf/marketing-cli/tree/main/skills/image-gen. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Image Gen?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Image Gen?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Image Gen: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Image Gen è gratuita?

Sì. È pubblicata su GitHub da MoizIbnYousaf con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇