← 返回
内容创作 Key 中文

SMTools Image Generation Skill

Generate images from text prompts using AI models via OpenRouter, Kie.ai, or YandexART. Use when the user asks to generate, create, draw, or illustrate an im...
根据文本提示使用 OpenRouter、Kie.ai 或 YandexART 等 AI 模型生成图像。在用户请求生成、创建、绘制或描绘图像时使用。
bzsega
内容创作 clawhub v1.9.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 616
下载
💾 52
安装
1
版本
#latest

概述

Image Generation Skill

Generate images from text prompts. Default provider is OpenRouter (synchronous). Alternative: Kie.ai (async, task-based).

When to Activate

Activate when the user asks to:

  • Generate, create, draw, paint, illustrate, or render an image
  • Make a picture, artwork, photo, or illustration
  • Visualize something as an image
  • Edit, modify, or transform an existing image

How to Use

Run the generation script with an absolute path to avoid directory change prompts:

bash SKILL_DIR/scripts/run.sh --prompt "PROMPT" [OPTIONS]

Replace SKILL_DIR with the absolute path to this skill's root directory.

Options

FlagDescription
-------------------
-p, --promptText prompt (required)
--provideropenrouter (default), kie, or yandexart
-m, --modelModel name (provider-specific)
-i, --inputInput image for editing (path or URL)
-o, --outputOutput file path
-c, --configPath to config.json
--list-modelsList available models
-v, --verboseDebug output to stderr

Output

The script outputs JSON to stdout:

{"status": "ok", "image_path": "/absolute/path/to/image.png", "model": "google/gemini-3.1-flash-image-preview", "provider": "openrouter"}

After successful generation, show the user the image path and confirm the image was created.

Image Editing

When the user wants to edit, modify, or transform an existing image, use the -i flag to pass the input image:

bash SKILL_DIR/scripts/run.sh -p "EDITING INSTRUCTION" -i /path/to/source/image.png

How to decide:

  • User says "draw/generate/create X" → generate from scratch (no -i)
  • User says "edit/change/modify this image" or references an existing image file → use -i with the path to that image
  • User provides an image path and an editing instruction → use -i

The editing prompt should describe what to change, e.g. "Add sunglasses", "Make the background blue", "Remove the text".

Provider Selection

  • OpenRouter (default): Fast, synchronous. Models: google/gemini-3.1-flash-image-preview, openai/gpt-image-1, google/imagen-4, stabilityai/stable-diffusion-3. Requires OPENROUTER_API_KEY.
  • Kie.ai: Async task-based. Models: nano-banana-2, flux-ai, midjourney, google-4o-image, ghibli-ai. Requires KIE_API_KEY. Use when the user explicitly requests Kie.ai or a Kie-specific model.
  • YandexART: Async task-based. Models: yandex-art/latest. Requires YANDEX_IAM_TOKEN and YANDEX_FOLDER_ID. Use when the user explicitly requests YandexART or Yandex.

Examples

Basic generation:

bash SKILL_DIR/scripts/run.sh -p "A serene mountain lake at sunset"

Specific model:

bash SKILL_DIR/scripts/run.sh -p "Cyberpunk cityscape" -m "google/imagen-4"

Kie.ai provider:

bash SKILL_DIR/scripts/run.sh -p "Studio Ghibli forest" --provider kie -m ghibli-ai

Edit an existing image:

bash SKILL_DIR/scripts/run.sh -p "Add a rainbow to the sky" -i /path/to/photo.png

Custom output path:

bash SKILL_DIR/scripts/run.sh -p "A red fox" -o /tmp/fox.png

Error Handling

ErrorAction
---------------
Missing API keyTell the user to set the environment variable (OPENROUTER_API_KEY or KIE_API_KEY)
Network/timeout errorRetry once. If still failing, inform the user
No image in responseShow the raw error from the JSON output
Kie.ai task timeoutInform user that generation took too long, suggest retrying

Setup

If the skill has not been set up yet, run:

bash SKILL_DIR/setup.sh

Security

  • Never display or log API keys
  • Never modify config.json without user permission

版本历史

共 1 个版本

  • v1.9.1 当前
    2026-03-29 17:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 857 📥 199,306
communication-collaboration

Telegram Channel Reader

bzsega
使用MTProto(Pyrogram或Telethon)读取Telegram频道的帖子和评论,获取公开或私密频道的最新消息及讨论回复。
★ 1 📥 1,546
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,413