Token导航 LogoToken导航TokenDH.com
图像处理敏感数据clawhub未标认证来源可访问clear审计提醒

cpa-gpt-image-2CPA GPT 图像 2

Agent Skill

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

总安装

1,071

周安装

46

GitHub Stars

公开资料未说明

下载量

375
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:cpa-gpt-image-2(CPA GPT 图像 2)
来源仓库:https://github.com/shiftshen/cpa-gpt-image-2
安装命令:
openclaw skills install cpa-gpt-image-2
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install cpa-gpt-image-2

简介

用于基于 GPT 模型生成图像,匹配 CPA 博客等特定风格示例。

  • 支持 OpenAI 兼容接口,可调用 image_generation 工具。
  • 通过 clawhub 安装,需配置正确的 API 端点和密钥。
  • 输出结果可能与训练数据相似,不能保证原创性或版权归属。
  • 不建议用于商业发布,需人工审核内容适宜性。cpa-gpt-image-2 属于图像处理类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
cpa-gpt-image-2
description
Use a text model such as gpt-5.4 with the image_generation tool over an OpenAI-compatible /v1/responses endpoint, matching the CPA blog example. Do not call gpt-image-2 as a direct model on gateways that do not expose it.

cpa-gpt-image-2

Use this skill when image generation should go through the CPA blog pattern: a normal text model invokes the image_generation tool over a compatible /v1/responses endpoint.

What this skill does

  • sends a request to an OpenAI-compatible /v1/responses endpoint
  • matches the CPA blog example request shape closely
  • uses the image_generation tool
  • defaults to model gpt-5.4
  • prefers non-streaming mode by default for simpler and more stable parsing
  • can switch to streaming mode when needed
  • automatically retries short image rate-limit responses
  • automatically retries transient tools: [] text fallbacks from the gateway
  • keeps credentials in environment variables, never in the skill files

Important rule

Do not treat gpt-image-2 as the direct model on gateways that do not expose that model.

Correct pattern:

  • use a normal model such as gpt-5.4
  • pass tools: [{"type": "image_generation", "output_format": "png"}]
  • let the gateway/tool layer decide whether image generation is available

Wrong pattern for this gateway:

  • directly calling model gpt-image-2 when the provider does not publish that model

Default environment resolution

The script resolves credentials in this order.

Base URL:

  • IMAGE_GEN_BASE_URL
  • OTCBOT_BASE_URL
  • CPA_BASE_URL
  • OPENAI_BASE_URL
  • fallback to OpenClaw models.json otcbot provider baseUrl

API key:

  • IMAGE_GEN_KEY
  • OTCBOT_API_KEY
  • CPA_API_KEY
  • OPENAI_API_KEY
  • fallback to OpenClaw models.json otcbot provider apiKey

Model default:

  • IMAGE_GEN_MODEL
  • OTCBOT_IMAGE_MODEL
  • CPA_MODEL
  • fallback to current OpenClaw image/default model
  • final fallback: gpt-5.4

Optional:

  • IMAGE_GEN_OUTPUT_FORMAT — default png
  • CPA_SESSION_ID — session id header value, default test-session
  • CPA_USER_AGENT — custom user-agent header
  • CPA_VERSION — request header version, default 0.122.0
  • CPA_ORIGINATOR — request header originator, default codex_cli_rs

The script calls:

  • ${BASE_URL%/}/v1/responses

Default execution path

Use the bundled script:

python3 skills/cpa-gpt-image-2/scripts/generate_image.py \
  --prompt "画一只可爱的松鼠" \
  --output /tmp/squirrel.png \
  --model gpt-5.4

Recommended env contract:

export IMAGE_GEN_BASE_URL='http://192.168.10.8:8317/v1'
export IMAGE_GEN_KEY='sk-xxxx'
export IMAGE_GEN_MODEL='gpt-5.4'

Override model when needed:

python3 skills/cpa-gpt-image-2/scripts/generate_image.py \
  --prompt "a cinematic fox detective in Bangkok neon rain" \
  --output /tmp/fox.png \
  --model gpt-5.4 \
  --format png

Expected behavior

The script:

  1. reads credentials from env or OpenClaw otcbot defaults
  2. POSTs to /v1/responses
  3. sends codex-style headers: user-agent, version, originator, session_id
  4. requests the image_generation tool, defaulting to stream: false
  5. parses normal JSON, or SSE data: payloads when streaming is enabled
  6. auto-retries short rate_limit_exceeded image responses when the server provides a retry delay
  7. auto-retries transient gateway fallbacks where the tool list comes back empty and the response degrades to text
  8. extracts the first base64 image from the response
  9. writes the file to the requested output path

Fallback curl patterns

Preferred non-streaming version:

curl --location "$IMAGE_GEN_BASE_URL/responses" \
  --header "Authorization: Bearer $IMAGE_GEN_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "gpt-5.4",
    "input": "画一只可爱的松鼠",
    "tools": [
      {
        "type": "image_generation",
        "output_format": "png"
      }
    ],
    "instructions": "you are a helpful assistant",
    "tool_choice": "auto",
    "stream": false,
    "store": false
  }'

Streaming version when needed:

curl --location "$IMAGE_GEN_BASE_URL/responses" \
  --header "Authorization: Bearer $IMAGE_GEN_KEY" \
  --header "user-agent: ${CPA_USER_AGENT:-codex-tui/0.122.0 (Manjaro 26.1.0-pre; x86_64) vscode/3.0.12 (codex-tui; 0.122.0)}" \
  --header "version: ${CPA_VERSION:-0.122.0}" \
  --header "originator: ${CPA_ORIGINATOR:-codex_cli_rs}" \
  --header "session_id: ${CPA_SESSION_ID:-test-session}" \
  --header 'accept: text/event-stream' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gpt-5.4",
    "input": "画一只可爱的松鼠",
    "tools": [
      {
        "type": "image_generation",
        "output_format": "png"
      }
    ],
    "instructions": "you are a helpful assistant",
    "tool_choice": "auto",
    "stream": true,
    "store": false
  }'

Notes

  • Prefer the bundled script for repeatability.
  • Do not hardcode live keys, base URLs, or session ids into workspace docs.
  • This skill intentionally mirrors the CPA blog example request shape as closely as practical.
  • On this gateway, prefer gpt-5.4 plus image_generation tool instead of direct gpt-image-2 model calls.
  • For the known local otcbot endpoint, prefer setting OTCBOT_BASE_URL and OTCBOT_API_KEY explicitly when testing.
  • If the endpoint returns provider-specific SSE events, extend the SSE parser instead of changing the whole request shape.
  • If the user asks to send the generated file back in the current chat, use the normal file-delivery flow after generation.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenClaw

76.76%
按下载量换算288

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills