doubao-image-gen
Skill4 starsChanged 8 months agoApache-2.0View on GitHub
使用豆包 Seedream 模型文生图,支持并发批量生成,输出图库预览页
- Reads credentials
- Installs packages
In this repository47 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .claude/skills/f-fund-advisor/CLAUDE.mdCLAUDE.md
- .claude/skills/t-supabase/CLAUDE.mdCLAUDE.md
- agent-browserSkill
- find-skillsSkill
- skill-creatorSkill
- fund-advisorSkill
- fundamentalsSkill
- fund-assistantSkill
- fund-screenerSkill
- eastmoney_fin_dataSkill
- eastmoney_fin_searchSkill
- f-mx-select-stockSkill
- mx_self_selectSkill
- eastmoney_stock_simulatorSkill
- baoyu-article-illustratorSkill
- xhs-note-creatorSkill
- auto-wechatSkill
- auto-xSkill
- doubao-videoSkill
- minimaxSkill
- nano-banana2Skill
- remotion-best-practicesSkill
- suno-musicSkill
- whisper-subtitleSkill
- arxivSkill
- bar-chart-race-generatorSkill
- perfect-PPTmakerSkill
- tech-news-dailySkill
- x-apiSkill
- yt-dlp-downloaderSkill
- brainstormingSkill
- dispatching-parallel-agentsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- frontend-designSkill
- receiving-code-reviewSkill
- requesting-code-reviewSkill
- subagent-driven-developmentSkill
- supabase-postgres-best-practicesSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-superpowersSkill
- verification-before-completionSkill
- writing-plansSkill
- writing-skillsSkill
The file
Files
豆包文生图 (Doubao Image Gen)
使用火山引擎豆包 doubao-seedream-5-0-260128 模型,根据文字描述生成高质量图像,支持并发批量生成多张图片,并输出图库预览页面。
环境要求
- Python 3.8+
- openai 库:
pip install "openai>=1.0"
Setup — API Key 配置
API Key 读取优先级(从高到低):
--api-key命令行参数- 环境变量
ARK_API_KEY - 项目目录
.env文件中的ARK_API_KEY=xxx
获取 API Key:登录 火山方舟控制台 → API Key 管理
Run
# 生成单张图片
python {baseDir}/scripts/gen.py --prompt "赛博朋克风格的上海夜景" --api-key YOUR_KEY
# 并发生成4张(默认并发数=4)
python {baseDir}/scripts/gen.py --prompt "水墨风格的山水画" --count 4 --api-key YOUR_KEY
# 指定尺寸(支持 1024x1024 / 2K / 1280x720 / 720x1280 / 2048x2048)
python {baseDir}/scripts/gen.py --prompt "星空下的草原" --size 2K --api-key YOUR_KEY
# 指定输出目录
python {baseDir}/scripts/gen.py --prompt "古风仙侠" --out-dir ./output --api-key YOUR_KEY
# 从环境变量读取 Key(推荐)
python {baseDir}/scripts/gen.py --prompt "未来城市" --count 2参数说明
| 参数 | 默认值 | 说明 |
--prompt | 必填 | 图像描述提示词 |
--count | 1 | 生成数量(并发执行) |
--size | 2K | 图像尺寸 |
--model | doubao-seedream-5-0-260128 | 模型名称 |
--out-dir | ./doubao-output-{时间戳} | 输出目录 |
--api-key | 环境变量 | ARK API Key |
--workers | 4 | 并发线程数 |
--watermark | False | 是否添加水印 |
--dry-run | False | 仅打印参数不调用 API |
Output
*.jpeg图像文件(按序号命名)prompts.json提示词与文件的映射记录index.html图库预览页面(可直接在浏览器打开)
AI 使用指引
当用户说以下内容时,加载本技能并调用脚本:
- "帮我画一张..." / "生成一张..." / "画个图..."
- "批量生成 N 张图片"
- "用豆包生成图片"
标准流程:
- 提取或优化用户的提示词(必要时翻译为英文以提升质量)
- 调用
python {baseDir}/scripts/gen.py生成图片 - 生成完成后,直接在聊天中以 Markdown 图片形式发送给用户:
 - 同时提供
index.html预览链接供浏览
示例 Prompt 优化: 用户说"画一只猫"→ 优化为 "A cute cat sitting gracefully, soft studio lighting, photorealistic, 8K detail"
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

