← 返回 Skills 市场
herry-zhu

Doubao AI Image Generator

作者 herry-zhu · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
1160
总下载
1
收藏
4
当前安装
1
版本数
在 OpenClaw 中安装
/install doubao-img
功能描述
Generate high-quality images using Doubao (豆包) AI image generation. Use when the user asks for AI-generated images, artwork, illustrations, or any visual con...
使用说明 (SKILL.md)

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

  1. Navigate to https://www.doubao.com and open the image generation mode
  2. Enter the prompt and submit
  3. Wait for generation to complete (typically 20-30 seconds)
  4. Extract and download the generated images
  5. 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=\x3Ctextbox-ref>, text="\x3Cprompt>", 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 "\x3Curl_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="\x3Cpath>")

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

  1. Page not loading: Ensure browser has network access and Doubao is accessible
  2. Login required: Check if Doubao session is still active via screenshot
  3. Images not generating: Check for content policy blocks in the prompt
  4. Download fails: Use browser CDP WebSocket extraction instead of direct download
  5. BlueBubbles media path blocked: Use sendAttachment action instead of send with filePath

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 sendAttachment for BlueBubbles to avoid media path issues
安全使用建议
This skill appears to do what it says (drive Doubao in a browser and download generated images), but it relies on a logged-in browser profile and will read page DOM and save temporary files. Before enabling: (1) confirm you are comfortable granting the agent access to the OpenClaw browser profile/session (it can access cookies and other site data in that profile); (2) consider using a dedicated browser profile or isolated environment signed into only the Doubao account; (3) ensure temporary file paths used for downloads are safe and cleared if you handle sensitive data; (4) review agent invocation permissions so the skill cannot run autonomously without your consent. If you need stronger guarantees, request a skill that uses a documented API and explicit credentials rather than browser automation.
功能分析
Type: OpenClaw Skill Name: doubao-img Version: 1.0.0 The skill bundle provides instructions for an AI agent to generate images via the Doubao (豆包) web interface using browser automation. It utilizes standard browser actions, JavaScript evaluation for DOM extraction, and 'curl' for downloading the generated assets from the Doubao CDN. The logic is consistent with the stated purpose of image generation and lacks indicators of malicious intent, data exfiltration, or unauthorized access.
能力评估
Purpose & Capability
The skill is an image-generation helper that uses browser automation to drive Doubao's web UI and download artifacts. Requiring curl and browser automation is coherent with that purpose.
Instruction Scope
SKILL.md explicitly instructs the agent to open Doubao in a browser profile, read DOM elements, evaluate JS in-page, capture screenshots, and extract image data via canvas/CDP. Those actions are necessary to automate a web-only image generator but grant the agent broad access to whatever is available in the specified browser profile/session (cookies, other sites' pages).
Install Mechanism
Instruction-only skill with no install spec and a single low-risk dependency (curl). Nothing is written to disk by an installer; runtime steps may write temporary files for downloads.
Credentials
No environment variables or external credentials are requested (the skill relies on an existing logged-in Doubao browser session). That is reasonable for a browser-driven approach, but it implicitly requires access to a browser profile/session which can expose other site credentials or personal data — this privilege is not declared in requires.env or config paths.
Persistence & Privilege
always is false and there is no install-time persistence. However, because the skill expects access to a browser profile and can be invoked autonomously (platform default), it could access session-bound resources when run. This is expected for an automation skill but increases blast radius if the agent is allowed to run skills without user oversight.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install doubao-img
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /doubao-img 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Generate high-quality images via Doubao browser automation with high-res export
元数据
Slug doubao-img
版本 1.0.0
许可证 MIT-0
累计安装 4
当前安装数 4
历史版本数 1
常见问题

Doubao AI Image Generator 是什么?

Generate high-quality images using Doubao (豆包) AI image generation. Use when the user asks for AI-generated images, artwork, illustrations, or any visual con... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1160 次。

如何安装 Doubao AI Image Generator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install doubao-img」即可一键安装,无需额外配置。

Doubao AI Image Generator 是免费的吗?

是的,Doubao AI Image Generator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Doubao AI Image Generator 支持哪些平台?

Doubao AI Image Generator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Doubao AI Image Generator?

由 herry-zhu(@herry-zhu)开发并维护,当前版本 v1.0.0。

💬 留言讨论