doubao-image-gen
БесплатноБез исполняемых скриптовНе проверенGenerate high-quality images using Doubao (豆包) AI image generation. Use when the user asks for AI-generated images, artwork, illustrations, or any visual…
от lxyeternal★ 68 звёзд на GitHubОб этом скилле
Doubao Image Generation Skill
Generate images using ByteDance's Doubao (豆包) AI image generation service via browser automation.
Requirements
- OpenClaw browser (headless or profile) with access to
https://www.doubao.com - Doubao account must be logged in
- Workspace directory for temporary file storage
Usage
Basic Image Generation
- Navigate to
https://www.doubao.comand open the image generation mode - Enter the prompt and submit
- Wait for generation to complete (typically 20-30 seconds)
- Extract and download the generated images
- Send images to the user
Step-by-Step Process
1. Open Doubao Image Generation
browser(action="open", url="https://www.doubao.com/chat/create-image", profile="openclaw")
Or navigate to existing chat with image gen history:
browser(action="snapshot", profile="openclaw")
2. Enter Prompt
Find the text input and enter the image description:
browser(action="act", kind="fill", ref=<textbox-ref>, text="<prompt>", profile="openclaw")
browser(action="act", kind="press", key="Enter", profile="openclaw")
3. Wait for Generation
Wait 10-20 seconds for the images to generate:
exec(command="sleep 15")
Then check if images are ready by taking a screenshot.
4. Extract Image URLs
Use browser evaluate to extract image URLs from the page:
// Find all generated images (image_generation URL pattern)
const imgs = document.querySelectorAll('img[src*="image_generation"]');
const urls = Array.from(imgs).map(img => ({
src: img.src,
w: img.naturalWidth,
h: img.naturalHeight
}));
5. Download Images
Use the image_pre_watermark_1_5b URL variant for highest quality (1773×2364):
curl -L -H "Referer: https://www.doubao.com/" \
-H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)" \
-o output.png "<url_with_image_pre_watermark>"
If the image_pre_watermark URL fails (signature mismatch), fall back to extracting via browser CDP WebSocket:
// Connect to CDP and extract image via canvas
const dataUrl = await new Promise(resolve => {
const canvas = document.createElement('canvas');
canvas.width = img.naturalWidth;
canvas.height = img.naturalHeight;
const ctx = canvas.getContext('2d');
ctx.drawImage(img, 0, 0);
canvas.toBlob(blob => {
const reader = new FileReader();
reader.onload = () => resolve(reader.result);
reader.readAsDataURL(blob);
}, 'image/png');
});
6. Send to User
Use sendAttachment for BlueBubbles/iMessage:
message(action="sendAttachment", channel="bluebubbles", filePath="<path>")
Image URL Patterns
Doubao CDN serves multiple versions of generated images:
| URL Suffix | Resolution | Use Case |
|---|---|---|
downsize_watermark_1_5_b.png |
~288×384 | Thumbnail, watermarked |
image_pre_watermark_1_5b.png |
~1773×2364 | High-res, no watermark |
image_dld_watermark_1_5b.png |
~1773×2364 | Download version |
web-operation.webp |
~435×580 | Web preview |
Important: Each URL requires a unique CDN signature (x-signature). You cannot simply swap URL suffixes — the signature must match the specific image and URL type.
Prompts for Best Results
For high-quality image generation, include these keywords in prompts:
- Quality: "高精度", "高品质", "8K", "超高分辨率"
- Style: "专业摄影棚灯光", "工作室渲染", "景深效果"
- Details: "精美的细节", "精细纹理"
Troubleshooting
- Page not loading: Ensure browser has network access and Doubao is accessible
- Login required: Check if Doubao session is still active via screenshot
- Images not generating: Check for content policy blocks in the prompt
- Download fails: Use browser CDP WebSocket extraction instead of direct download
- BlueBubbles media path blocked: Use
sendAttachmentaction instead ofsendwithfilePath
Example Prompts
战斗暴龙兽3D手办,高精度模型,精美的细节,金属质感盔甲,蓝色闪耀的勇气之盾,动感战斗姿态,站在岩石底座上,专业摄影棚灯光,工作室渲染,高品质,8K
可爱柴犬头像,日式插画风格,柔和配色,圆润线条,温暖光影,专业插画师作品
赛博朋克城市夜景,霓虹灯,高楼大厦,雨天反射,电影级渲染,超高清细节
Notes
- Doubao free tier has daily generation limits
- Generated images are stored in CDN with time-limited signatures
- Browser automation is required due to lack of public API
- Always use
sendAttachmentfor BlueBubbles to avoid media path issues
Установить doubao-image-gen в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл doubao-image-gen?
Generate high-quality images using Doubao (豆包) AI image generation. Use when the user asks for AI-generated images, artwork, illustrations, or any visual content. Supports custom prompts, multiple styles, and high-resolution output.
Как установить скилл doubao-image-gen?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл doubao-image-gen запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic