ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

image-generation

图像生成辅助。支持通过 OpenRouter 直接调用各种生图模型(如 Seedream),为 OpenClaw 优化,支持提示词、尺寸等参数配置。目前仅限 OpenRouter provider。

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/goforu/phoenixclaw-image-gen
Or

图像生成辅助

为 OpenClaw 提供原生的图像生成能力,通过文字描述词快速生成高质量图像。

工作流程

用户提示词 (Prompt)
    ↓
┌─────────────────────────────────────┐
│  识别参数:模型、尺寸、比例、路径   │
└─────────────────────────────────────┘
    ↓
┌─────────────────────────────────────┐
│  调用 OpenRouter 接口 (OpenClaw)    │
└─────────────────────────────────────┘
    ↓
┌─────────────────────────────────────┐
│  默认模型:seedream-4.5 (Text-to-Image) & Gemini 2.5 (Image-to-Image) │
└─────────────────────────────────────┘
    ↓
┌─────────────────────────────────────┐
│  原子化写入本地存储 (Safety First)  │
└─────────────────────────────────────┘
    ↓
返回结构化 JSON (Success Payload)

安装与配置

1. 获取 API Key

本技能需要 OpenRouter API Key 才能调用图像生成服务。

  1. 访问 OpenRouter 控制台 创建 API Key
  2. 请根据下方指引手动配置环境变量

2. 配置到环境变量

根据 OpenClaw 官方最佳实践,请通过 ~/.openclaw/openclaw.json 配置环境变量:

{
  skills: {
    entries: {
      "image-generation": {
        enabled: true,
        env: {
          OPENROUTER_API_KEY: "sk-or-v1-xxxxxxxx..."
        }
      }
    }
  }
}

或使用 primaryEnv 快捷配置:

{
  skills: {
    entries: {
      "image-generation": {
        enabled: true,
        apiKey: "sk-or-v1-xxxxxxxx..."
      }
    }
  }
}

配置完成后无需重启,新配置会在下次运行 OpenClaw 时自动生效。

3. 选择默认模型(可选)

本技能默认使用 bytedance-seed/seedream-4.5 作为文本生图模型,google/gemini-2.5-flash-image 作为图生图模型。你可以通过以下方式更改:

方式一:环境变量配置~/.openclaw/openclaw.json 中添加:

{
  skills: {
    entries: {
      "image-generation": {
        enabled: true,
        env: {
          OPENROUTER_API_KEY: "sk-or-v1-xxx",
          IMAGE_GEN_TEXT_TO_IMAGE_MODEL: "bytedance-seed/seedream-4.5",
          IMAGE_GEN_IMAGE_TO_IMAGE_MODEL: "google/gemini-2.5-flash-image"
        }
      }
    }
  }
}

本技能默认使用 bytedance-seed/seedream-4.5 模型,你可以通过以下方式更改:

方式一:环境变量配置~/.openclaw/openclaw.json 中添加:

{
  skills: {
    entries: {
      "image-generation": {
        enabled: true,
        env: {
          OPENROUTER_API_KEY: "sk-or-v1-xxx",
          IMAGE_GEN_IMAGE_TO_IMAGE_MODEL: "google/gemini-2.5-flash-image",
          IMAGE_GEN_TEXT_TO_IMAGE_MODEL: "bytedance-seed/seedream-4.5"
      }
    }
  }
}

方式二:查看可用模型

node skills/image-generation/scripts/cli/openrouter.js --list-models

方式三:生成时指定模型

node skills/image-generation/scripts/generate.js \
  --prompt "a futuristic city" \
  --model "bytedance-seed/seedream-4.5" \
  --i2i-model "google/gemini-2.5-flash-image"
node skills/image-generation/scripts/generate.js \
  --prompt "a futuristic city" \
  --image "bytedance-seed/seedream-4.5" \
  --model "google/gemini-2.5-flash-image"

推荐模型

  • bytedance-seed/seedream-4.5 - 默认,高质量图像生成
  • anthropic/claude-3.5-sonnet-image - Claude 图像生成
  • openai/dall-e-3 - DALL-E 3

4. 验证配置

node skills/image-generation/scripts/cli/openrouter.js --test

预期输出:

{
  "success": true,
  "message": "OpenRouter API key is configured. Test passed."
}

Metadata

Author@goforu
Stars2387
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-goforu-phoenixclaw-image-gen": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.

Related Skills

phoenixclaw-ledger

Passive financial tracking plugin for PhoenixClaw. Automatically detects expenses and income from conversations and payment screenshots. Use when: - User mentions money/spending (any language) - User shares payment screenshots (WeChat Pay, Alipay, etc.) - User asks about finances ("How much did I spend?", "My budget") - User wants expense reports ("Monthly summary", "Spending analysis")

goforu 2387

openclaw-visual

将 OpenClaw 中的信息(PhoenixClaw 日志、聊天记录、单条消息等)转换为精美排版的图片, 便于在聊天窗口(Telegram/Slack/Discord 等)中直接展示和分享。 Use when: - 用户要求将内容做成图片 ("帮我把这段话做成图片") - 用户要求生成日志可视化 ("生成今日日志分享图") - 用户要求将聊天记录可视化 ("把今天的对话做成总结图")

goforu 2387

founder-coach

AI-powered startup mindset coach that helps founders upgrade their thinking patterns, track mental model progress, and set weekly challenges. Use when: - User is a startup founder seeking to improve their entrepreneurial mindset - User wants to detect and overcome low-level thinking patterns - User needs guidance on applying mental models (PMF, 4Ps, NFX frameworks) - User wants to set and track weekly challenges - User requests a weekly progress report - User is discussing startup challenges and needs Socratic questioning

goforu 2387

phoenixclaw

Passive journaling skill that scans daily conversations via cron to generate markdown journals using semantic understanding. Use when: - User requests journaling ("Show me my journal", "What did I do today?") - User asks for pattern analysis ("Analyze my patterns", "How am I doing?") - User requests summaries ("Generate weekly/monthly summary")

goforu 2387