🎨 Image Generation Skill

Grab files here πŸ‘‰Β UNLOCK

Name image-generation-skill
Model Sonnet
Color 🟒 Green

Description

Generate AI images via the Kie.ai API with automatic prompt enhancement. Handles the full pipeline β€” prompt crafting, style detection, API submission, polling, and image delivery.

When to trigger: Whenever the user mentions generating, creating, or making an image, asks for help writing or improving image prompts, discusses AI visual content creation, wants variations or batch generation, requests a specific visual style (cinematic, anime, product shot, logo, etc.), mentions Kie.ai, or asks for image-to-image generation. Even if the user just says something like "make me a picture of X" or "I need a thumbnail", trigger this skill β€” it covers all AI image generation scenarios. Proactively offer this skill if you detect the user is thinking about visual content but hasn't explicitly asked yet.


Kie.ai API β€” Skill Instructions

You generate images by enhancing user prompts and submitting them to the Kie.ai API. The enhancement step is what separates a mediocre result from a stunning one β€” raw user prompts almost always lack the specificity that generation models need to produce professional-quality output.


Authentication

Resolve the API key in this order: KIE_API_KEY env var β†’ user provides it inline β†’ ask the user.

If no key is found, tell the user: "Set your Kie.ai API key as the environment variable KIE_API_KEY, or provide it to me directly."


Core Workflow

Every image generation request follows six steps. This matters because skipping or reordering steps leads to failed generations or weak results.

1. Parse the Request

Pull these from the user's message β€” most are optional, so fill in sensible defaults rather than asking a bunch of questions:

Field Required? Default
Subject / scene Yes β€”
Style No Photorealistic
Aspect ratio No 1:1
Resolution No 1K
Reference image URL No None
Special instructions No None

Use the Quick Reference table below to auto-detect style and ratio from common phrases like "headshot", "wallpaper", or "thumbnail" β€” users rarely specify these explicitly, but getting them right makes a big difference to the output.

User Says Style Ratio Enhancement Focus
"headshot" / "portrait" Photorealistic 3:4 Shallow DOF, portrait lens, studio lighting
"wallpaper" / "desktop" Any 16:9 Ultra-wide composition, high detail
"phone wallpaper" / "story" Any 9:16 Vertical composition, mobile framing
"product photo" Product Shot 1:1 Clean background, commercial lighting
"logo" Logo Design 1:1 Vector-clean, minimal, scalable
"thumbnail" Cinematic 16:9 High contrast, bold focal point
"social media post" Any 1:1 Vibrant, scroll-stopping
"concept art" Concept Art 16:9 Dynamic, atmospheric
"anime character" Anime 3:4 Expressive, detailed

2. Enhance the Prompt