Token导航 LogoToken导航TokenDH.com
图像处理敏感数据github未标认证来源可访问许可证需确认审计异常

image-generate图像生成

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

528

周安装

22

GitHub Stars

325

下载量

176
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:image-generate(图像生成)
来源仓库:https://github.com/bytedance/agentkit-samples
仓库路径:skills/image-generate
安装命令:
npx skills add https://github.com/bytedance/agentkit-samples --skill image-generate
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bytedance/agentkit-samples --skill image-generate

简介

用于基于豆包 Seedream 模型生成图像。

  • 支持文本到图片及参考图生成,需配置 API Key。
  • 可设置模型版本和 API 基础地址。image-generate 属于图像处理类 Skill,可作为该场景下的辅助能力补充。
  • 安装方式:通过 npx 从 GitHub 仓库添加技能。
  • 注意:涉及人物或品牌内容时应核对授权与真实性。

SKILL.md

Image Generate Skill

This skill generates images using Doubao Seedream 4.0/4.5/5.0 models.

Trigger Conditions

  1. User wants to generate images from text descriptions
  2. User wants to create images based on reference images
  3. User asks for image generation capabilities

Usage

Environment Variables

Before using this skill, ensure the following environment variables are set:

  • ARK_API_KEY or MODEL_IMAGE_API_KEY or MODEL_AGENT_API_KEY: API key for the image generation service
  • MODEL_IMAGE_API_BASE: API base URL (optional, has default)
  • MODEL_IMAGE_NAME: Model name (optional, has default)

Function Signature

async def image_generate(
    tasks: list[dict],
    timeout: int = 600,
    model_name: str = None,
) -> Dict:

Parameters

tasks (list[dict])

A list of image-generation tasks. Each task is a dict with the following fields:

Required:

  • prompt (str): Text description of the desired image(s). Chinese or English both work. To specify the number of images, add "生成N张图片" in the prompt.

Optional:

  • size (str): Image size. Two formats:

- Resolution level: "1K", "2K", "4K" - Exact dimensions: "x", e.g., "2048x2048", "2384x1728" - Default: "2048x2048"

  • response_format (str): Return format. "url" (default, URL expires in 24h) or "b64_json"
  • watermark (bool): Add watermark. Default: true
  • image (str | list[str]): Reference image(s) as URL or Base64

- For single image tasks: pass a string (exactly 1 image) - For group image tasks: pass an array (2-10 images)

  • sequential_image_generation (str): Control group image generation. Default: "disabled"

- Set to "auto" to generate multiple images

  • max_images (int): Maximum number of images for group generation. Range [1, 15]
  • tools (list[dict]): Tool configuration, e.g., [{"type": "web_search"}]
  • output_format (str): Output format. "png" or "jpeg". Default: "jpeg"

Task Types

The model infers the task type from parameters:

  1. Text to Single Image: No image, sequential_image_generation not set or "disabled"
  2. Text to Group Images: No image, sequential_image_generation="auto"
  3. Single Image to Single Image: image=string, sequential_image_generation not set or "disabled"
  4. Single Image to Group Images: image=string, sequential_image_generation="auto"
  5. Multi Image to Single Image: image=array (2-10), sequential_image_generation not set or "disabled"
  6. Multi Image to Group Images: image=array (2-10), sequential_image_generation="auto"

Return Value

Script Return Info

The image_generate.py script will return these info:

{
    "status": "success" | "error",
    "success_list": [{"name": "image_name", "url": "image_url", "local_path": "local_path"}],
    "error_list": ["image_name"],
    "error_detail_list": [{"task_idx": 0, "error": {...}}]
}

Based on the script return info, the final response returned to the user consists of a description of the image generation task and the image URL(s) and local path(s). You may download the image from the URL, but the image URL should still be provided to the user for viewing and downloading.

Note: the URL is the 'url' in the success_list of script return info.

Final Return Info

You should return three types of information:

  1. File format, return the image file (if you have some other methods to send the image file) and the local path of the image, for example: local_path: /root/.openclaw/workspace/skills/image-generate/xxx.png
  2. After generation, show list of images with Markdown format, for example:
      ![generated-image-1](https://example.com/image1.png)
      ![generated-image-2](https://example.com/image2.png)

Code Implementation

See scripts/image_generate.py for the full implementation.

Example Usage

# Text to single image
python scripts/image_generate.py -p "A beautiful sunset over the ocean" -s 2048x2048

# Text to group images (generate 3 images)
python scripts/image_generate.py -p "生成3张可爱的小猫图片" -s 2K -g --max-images 3

# Image to image
python scripts/image_generate.py -p "Convert this image to anime style" -i "https://example.com/image.jpg"

# Multi-image to group images
python scripts/image_generate.py -p "Combine these images into a collage" --images "https://example.com/img1.jpg" "https://example.com/img2.jpg" -g --max-images 5

# Use specific model
python scripts/image_generate.py -p "A futuristic city" -m doubao-seedream-5-0-260128

# No watermark
python scripts/image_generate.py -p "A beautiful landscape" --no-watermark

# Output as PNG
python scripts/image_generate.py -p "A portrait photo" --output-format png

Command Line Options

OptionShortDescription
--prompt-pText description of the desired image(s) (required)
--size-sImage size (default: 2048x2048)
--model-mModel name (default: doubao-seedream-4-0-250828)
--image-iSingle reference image URL
--imagesMultiple reference image URLs (space-separated)
--group-gEnable group image generation
--max-imagesMax images for group generation (default: 15)
--output-formatOutput format: png or jpeg (default: jpeg)
--timeout-tTimeout in seconds (default: 600)
--no-watermarkDisable watermark

Model Fallback

If you encounter a model-related error (like ModelNotOpen), you can downgrade to these models:

  • doubao-seedream-5-0-260128
  • doubao-seedream-4-5-251128
  • doubao-seedream-4-0-250828

Error Handling

  • IF the script raises the error "PermissionError: ARK_API_KEY or MODEL_IMAGE_API_KEY or MODEL_AGENT_API_KEY not found in environment variables", inform the user that they need to provide the ARK_API_KEY or MODEL_IMAGE_API_KEY or MODEL_AGENT_API_KEY environment variable. Write it to the environment variable file in the workspace. If the file already exists, append it to the end. Ensure the environment variable format is correct, make the environment variable effective, and retry the image generation task that just failed.

Notes

  • Group image tasks require sequential_image_generation="auto"
  • To specify the number of group images, add the count in the prompt (e.g., "生成3张图片")
  • Recommended sizes: 2048x2048 or standard aspect ratios for best quality
  • URL responses expire in 24 hours

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.39%
按下载量换算68

Claude

32.5%
按下载量换算57

Cursor

17.84%
按下载量换算31

Gemini CLI

8.63%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills