Logo vun Image Gen

Image Gen

Communautéit
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.

Iwwersiicht

EditeurMoizIbnYousaf
Repositorymarketing-cli
Skill-Nummimage-gen
Stären
35
Forks
5
Matgeliwwert Fichieren
2
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum MoizIbnYousaf op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Image Gen an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/MoizIbnYousaf/marketing-cli/tree/main/skills/image-gen
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Image Gen an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Image Gen automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Image Gen net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

/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

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill 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"...

Firwat Image Gen op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Image Gen besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Image Gen an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/MoizIbnYousaf/marketing-cli/tree/main/skills/image-gen an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Image Gen benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Image Gen benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Image Gen domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Image Gen gratis?

Jo. De Skill gëtt vum MoizIbnYousaf ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇