image-generation
Use this skill when the user requests to generate, create, imagine, or visualize images including characters, scenes, products, or any visual content. Supports structured prompts and reference images for guided generation.
By bytedance · 2,624 installs
npx skills add bytedance/deer-flow --skill image-generation
Source repository · Upstream listing
Image Generation Skill
Overview
This skill generates high quality images using structured prompts and a Python script. The workflow includes creating JSON formatted prompts and executing image generation with optional reference images.
Core Capabilities
Create structured JSON prompts for AIGC image generation
Support multiple reference images for style/composition guidance
Generate images through automated Python script execution
Handle various image generation scenarios (character design, scenes, products, etc.)
Workflow
Step 1: Understand Requirements
When a user requests image generation, identify:
Subject/content: What should be in the image
Style preferences: Art style, mood, color palette
Technical specs: Aspect ratio, composition, lighting
Reference images: Any images to guide generation
You don't need to check the folder under /mnt/user data
Step 2: Create Structured Prompt
Generate a structured JSON file in /mnt/user data/workspace/ with naming pattern: {descriptive name}.json
Step 3: Execute Generation
Call the Python script:
Parameters:
prompt file : Absolute path to JSON prompt file (required)
reference images : Absolute paths to reference images (optional, space separated)
output file : Absolute path to output image file (required)
aspect ratio : Aspect ratio of the generated image (optional, default: 16:9)
[!NOTE]
Do NOT read the python file, just call it with the parameters.
Character Generation Example
User request: "Create a Tokyo street style woman character in 1990s"
Create prompt file: /mnt/user data/workspace/asian woman.json
Execute generation:
With reference images:
Common Scenarios
Use different JSON schemas for different scenarios.
Character Design :
Physical attributes (gender, age, ethnicity, body type)
Facial features and expressions
Clothing and accessories
Historical era or setting
Pose and context
Scene Generation :
Environment description
Time of day, weather
Mood and atmosphere
Focal points and composition
Product Visualization :
Product details and materials
Lighting setup
Background and context
Presentation angle
Specific Templates
Read the following template file only when matching the user request.
[Doraemon Comic](templates/doraemon.md)
Output Handling
After generation:
Images are typically saved in /mnt/user data/outputs/
Share generated images with user using present files tool
Provide brief description of the generation result
Offer to iterate if adjustments needed
Tips: Enhancing Generation with Reference Images
For scenarios where visual accuracy is critical, use the image search tool first to find reference images before generation.
Recommended scenarios for using image search tool:
Character/Portrait Generation : Search for similar poses, expressions, or styles to guide facial features and body proportions
Specific Objects or Products : Find reference images of real objects to ensure accurate representation
Architectural or Environmental Scenes : Search for location references to capture authentic details
Fashion and Clothing : Find style references to ensure accurate garment details and styling
Example workflow:
1. Call the image search tool to find suitable reference images:
2. Download the returned image URLs to local files
3. Use the downloaded images as reference images parameter in the generation script
This approach significantly improves generation quality by providing the model with concrete visual guidance rather than relying solely on text descriptions.
Providers (Gemini / MiniMax / OpenAI compatible)
This skill auto selects the provider by environment variables (no CLI change):
GEMINI API KEY set → use Gemini (default, unchanged).
Otherwise, MINIMAX API KEY set → use MiniMax ( /v1/image generation , model image 01 ).
Otherwise, IMAGE GENERATION API KEY set → use an OpenAI compatible Images API.
Force one explicitly with IMAGE GENERATION PROVIDER=gemini minimax openai .
openai compatible is also accepted as an alias for openai .
OpenAI compatible settings:
IMAGE GENERATION API KEY (required)
IMAGE GENERATION BASE URL (default https://api.openai.com/v1 )
IMAGE GENERATION MODEL (default gpt image 2.5 flare )
IMAGE GENERATION SIZE (optional fixed size override)
Text to image calls use POST {base url}/images/generations . Reference image calls
use multipart POST {base url}/images/edits ; a relay may support generation without
supporting edits. Responses may contain base64 image data, a data URL, or a downloadable
URL. Aspect ratios map to 1024x1024 , 1536x1024 , or 1024x1536 unless
IMAGE GENERATION SIZE is set. The output extension selects the API output format :
.jpg / .jpeg uses jpeg , .webp uses webp , and all other extensions use png .
When dall e 2 or dall e 3 is configured instead, the request uses the model's
supported dimensions and response format=b64 json ; DALL E output files must use a
.png extension. Reference image editing with DALL E models is not supported by this
skill; use the default GPT Image model for edits.
MiniMax optional overrides: MINIMAX API HOST (default https://api.minimaxi.com ),
MINIMAX IMAGE MODEL (default image 01 ). Reference images are sent as the MiniMax
subject reference character image. The CLI and prompt file / reference images
/ output file / aspect ratio arguments are identical for both providers.
MiniMax prompt handling (provider internal). Authoring is provider agnostic — write
the same structured JSON regardless of which provider is active. MiniMax image 01
consumes a single text string, so the MiniMax path itself sends only the JSON prompt
field (the other fields such as style / composition / negative prompt apply to the
Gemini path) and enables prompt optimizer so MiniMax expands it server side. MiniMax
caps that prompt at 1500 characters; if the prompt field is longer, the script returns
an error instead of calling the API. The Gemini path receives the full structured JSON.
Notes
Always use English for prompts regardless of user's language
JSON format ensures structured, parsable prompts
Reference images enhance generation quality significantly
Iterative refinement is normal for optimal results
For character generation, include the detailed character object plus a consolidated prompt field