image-generation by bytedance/deer-flow
npx skills add https://github.com/bytedance/deer-flow --skill image-generation此技能使用结构化提示词和 Python 脚本生成高质量图像。工作流程包括创建 JSON 格式的提示词以及执行图像生成(可选择使用参考图像)。
当用户请求生成图像时,请识别:
/mnt/user-data 下的文件夹在 /mnt/user-data/workspace/ 目录下生成一个结构化的 JSON 文件,命名模式为:{描述性名称}.json
调用 Python 脚本:
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/prompt-file.json \
--reference-images /path/to/ref1.jpg /path/to/ref2.png \
--output-file /mnt/user-data/outputs/generated-image.jpg
--aspect-ratio 16:9
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
参数:
--prompt-file:JSON 提示词文件的绝对路径(必需)--reference-images:参考图像的绝对路径(可选,以空格分隔)--output-file:输出图像文件的绝对路径(必需)--aspect-ratio:生成图像的宽高比(可选,默认:16:9)[!注意] 请勿读取 python 文件,只需使用参数调用它。
用户请求:"创建一个 1990 年代东京街头风格女性角色"
创建提示词文件:/mnt/user-data/workspace/asian-woman.json
{
"characters": [{
"gender": "female",
"age": "mid-20s",
"ethnicity": "Japanese",
"body_type": "slender, elegant",
"facial_features": "delicate features, expressive eyes, subtle makeup with emphasis on lips, long dark hair partially wet from rain",
"clothing": "stylish trench coat, designer handbag, high heels, contemporary Tokyo street fashion",
"accessories": "minimal jewelry, statement earrings, leather handbag",
"era": "1990s"
}],
"negative_prompt": "blurry face, deformed, low quality, overly sharp digital look, oversaturated colors, artificial lighting, studio setting, posed, selfie angle",
"style": "Leica M11 street photography aesthetic, film-like rendering, natural color palette with slight warmth, bokeh background blur, analog photography feel",
"composition": "medium shot, rule of thirds, subject slightly off-center, environmental context of Tokyo street visible, shallow depth of field isolating subject",
"lighting": "neon lights from signs and storefronts, wet pavement reflections, soft ambient city glow, natural street lighting, rim lighting from background neons",
"color_palette": "muted naturalistic tones, warm skin tones, cool blue and magenta neon accents, desaturated compared to digital photography, film grain texture"
}
执行生成:
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/cyberpunk-hacker.json \
--output-file /mnt/user-data/outputs/cyberpunk-hacker-01.jpg \
--aspect-ratio 2:3
使用参考图像:
{
"characters": [{
"gender": "based on [Image 1]",
"age": "based on [Image 1]",
"ethnicity": "human from [Image 1] adapted to Star Wars universe",
"body_type": "based on [Image 1]",
"facial_features": "matching [Image 1] with slight weathered look from space travel",
"clothing": "Star Wars style outfit - worn leather jacket with utility vest, cargo pants with tactical pouches, scuffed boots, belt with holster",
"accessories": "blaster pistol on hip, comlink device on wrist, goggles pushed up on forehead, satchel with supplies, personal vehicle based on [Image 2]",
"era": "Star Wars universe, post-Empire era"
}],
"prompt": "Character inspired by [Image 1] standing next to a vehicle inspired by [Image 2] on a bustling alien planet street in Star Wars universe aesthetic. Character wearing worn leather jacket with utility vest, cargo pants with tactical pouches, scuffed boots, belt with blaster holster. The vehicle adapted to Star Wars aesthetic with weathered metal panels, repulsor engines, desert dust covering, parked on the street. Exotic alien marketplace street with multi-level architecture, weathered metal structures, hanging market stalls with colorful awnings, alien species walking by as background characters. Twin suns casting warm golden light, atmospheric dust particles in air, moisture vaporators visible in distance. Gritty lived-in Star Wars aesthetic, practical effects look, film grain texture, cinematic composition.",
"negative_prompt": "clean futuristic look, sterile environment, overly CGI appearance, fantasy medieval elements, Earth architecture, modern city",
"style": "Star Wars original trilogy aesthetic, lived-in universe, practical effects inspired, cinematic film look, slightly desaturated with warm tones",
"composition": "medium wide shot, character in foreground with alien street extending into background, environmental storytelling, rule of thirds",
"lighting": "warm golden hour lighting from twin suns, rim lighting on character, atmospheric haze, practical light sources from market stalls",
"color_palette": "warm sandy tones, ochre and sienna, dusty blues, weathered metals, muted earth colors with pops of alien market colors",
"technical": {
"aspect_ratio": "9:16",
"quality": "high",
"detail_level": "highly detailed with film-like texture"
}
}
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/star-wars-scene.json \
--reference-images /mnt/user-data/uploads/character-ref.jpg /mnt/user-data/uploads/vehicle-ref.jpg \
--output-file /mnt/user-data/outputs/star-wars-scene-01.jpg \
--aspect-ratio 16:9
针对不同场景使用不同的 JSON 模式。
角色设计:
场景生成:
产品可视化:
仅在匹配用户请求时读取以下模板文件。
生成后:
/mnt/user-data/outputs/ 目录下对于视觉准确性至关重要的场景,首先使用 image_search 工具在生成前查找参考图像。
推荐使用 image_search 工具的场景:
示例工作流程:
调用 image_search 工具查找合适的参考图像:
image_search(query="Japanese woman street photography 1990s", size="Large")
将返回的图像 URL 下载到本地文件
将下载的图像用作生成脚本中的 --reference-images 参数
这种方法通过为模型提供具体的视觉指导,而不是仅仅依赖文本描述,显著提高了生成质量。
每周安装数
197
仓库
GitHub 星标数
29.5K
首次出现
2026年2月17日
安全审计
安装于
opencode192
gemini-cli191
github-copilot191
codex191
amp190
kimi-cli190
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.
When a user requests image generation, identify:
/mnt/user-dataGenerate a structured JSON file in /mnt/user-data/workspace/ with naming pattern: {descriptive-name}.json
Call the Python script:
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/prompt-file.json \
--reference-images /path/to/ref1.jpg /path/to/ref2.png \
--output-file /mnt/user-data/outputs/generated-image.jpg
--aspect-ratio 16:9
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.
User request: "Create a Tokyo street style woman character in 1990s"
Create prompt file: /mnt/user-data/workspace/asian-woman.json
{
"characters": [{
"gender": "female",
"age": "mid-20s",
"ethnicity": "Japanese",
"body_type": "slender, elegant",
"facial_features": "delicate features, expressive eyes, subtle makeup with emphasis on lips, long dark hair partially wet from rain",
"clothing": "stylish trench coat, designer handbag, high heels, contemporary Tokyo street fashion",
"accessories": "minimal jewelry, statement earrings, leather handbag",
"era": "1990s"
}],
"negative_prompt": "blurry face, deformed, low quality, overly sharp digital look, oversaturated colors, artificial lighting, studio setting, posed, selfie angle",
"style": "Leica M11 street photography aesthetic, film-like rendering, natural color palette with slight warmth, bokeh background blur, analog photography feel",
"composition": "medium shot, rule of thirds, subject slightly off-center, environmental context of Tokyo street visible, shallow depth of field isolating subject",
"lighting": "neon lights from signs and storefronts, wet pavement reflections, soft ambient city glow, natural street lighting, rim lighting from background neons",
"color_palette": "muted naturalistic tones, warm skin tones, cool blue and magenta neon accents, desaturated compared to digital photography, film grain texture"
}
Execute generation:
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/cyberpunk-hacker.json \
--output-file /mnt/user-data/outputs/cyberpunk-hacker-01.jpg \
--aspect-ratio 2:3
With reference images:
{
"characters": [{
"gender": "based on [Image 1]",
"age": "based on [Image 1]",
"ethnicity": "human from [Image 1] adapted to Star Wars universe",
"body_type": "based on [Image 1]",
"facial_features": "matching [Image 1] with slight weathered look from space travel",
"clothing": "Star Wars style outfit - worn leather jacket with utility vest, cargo pants with tactical pouches, scuffed boots, belt with holster",
"accessories": "blaster pistol on hip, comlink device on wrist, goggles pushed up on forehead, satchel with supplies, personal vehicle based on [Image 2]",
"era": "Star Wars universe, post-Empire era"
}],
"prompt": "Character inspired by [Image 1] standing next to a vehicle inspired by [Image 2] on a bustling alien planet street in Star Wars universe aesthetic. Character wearing worn leather jacket with utility vest, cargo pants with tactical pouches, scuffed boots, belt with blaster holster. The vehicle adapted to Star Wars aesthetic with weathered metal panels, repulsor engines, desert dust covering, parked on the street. Exotic alien marketplace street with multi-level architecture, weathered metal structures, hanging market stalls with colorful awnings, alien species walking by as background characters. Twin suns casting warm golden light, atmospheric dust particles in air, moisture vaporators visible in distance. Gritty lived-in Star Wars aesthetic, practical effects look, film grain texture, cinematic composition.",
"negative_prompt": "clean futuristic look, sterile environment, overly CGI appearance, fantasy medieval elements, Earth architecture, modern city",
"style": "Star Wars original trilogy aesthetic, lived-in universe, practical effects inspired, cinematic film look, slightly desaturated with warm tones",
"composition": "medium wide shot, character in foreground with alien street extending into background, environmental storytelling, rule of thirds",
"lighting": "warm golden hour lighting from twin suns, rim lighting on character, atmospheric haze, practical light sources from market stalls",
"color_palette": "warm sandy tones, ochre and sienna, dusty blues, weathered metals, muted earth colors with pops of alien market colors",
"technical": {
"aspect_ratio": "9:16",
"quality": "high",
"detail_level": "highly detailed with film-like texture"
}
}
python /mnt/skills/public/image-generation/scripts/generate.py \
--prompt-file /mnt/user-data/workspace/star-wars-scene.json \
--reference-images /mnt/user-data/uploads/character-ref.jpg /mnt/user-data/uploads/vehicle-ref.jpg \
--output-file /mnt/user-data/outputs/star-wars-scene-01.jpg \
--aspect-ratio 16:9
Use different JSON schemas for different scenarios.
Character Design :
Scene Generation :
Product Visualization :
Read the following template file only when matching the user request.
After generation:
/mnt/user-data/outputs/For scenarios where visual accuracy is critical, use theimage_search tool first to find reference images before generation.
Recommended scenarios for using image_search tool:
Example workflow:
Call the image_search tool to find suitable reference images:
image_search(query="Japanese woman street photography 1990s", size="Large")
Download the returned image URLs to local files
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.
Weekly Installs
197
Repository
GitHub Stars
29.5K
First Seen
Feb 17, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
opencode192
gemini-cli191
github-copilot191
codex191
amp190
kimi-cli190
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
54,900 周安装