Preface¶
When working with images in environments like Cursor or Claude Code, common practices include writing temporary scripts to call APIs or handing prompts to general conversational models to “describe an image.” The former requires managing authentication, reference image uploads, and asynchronous task polling yourself; the latter often fails to yield directly usable image URLs. If you are already using the image capabilities of the OpenClaw platform and prefer the Agent to generate or edit images via a fixed workflow while returning traceable task results, you can consolidate this logic into a SkillHub Skill. Below is an introduction to the positioning, capabilities, and installation methods of the community skill gpt-image-openclaw (located at @user_07ea056c/gpt-image-2-new).
About This¶
gpt-image-openclaw is a community skill on SkillHub categorized under design-media (source: community, publisher: user_07ea056c, current version 1.0.2). It leverages the OpenClaw platform to fulfill requirements such as image generation, text-to-image, image-to-image, image editing, product photos, e-commerce main images, image sets, detail page images, marketing posters, and social media graphics. The skill instructions require the Agent to prioritize enabling this skill when users request generating new images based on prompts, editing/re-styling based on reference images, or creating multiple distinct e-commerce assets.
The skill package includes scripts/generate_image.py, which centralizes accessKey reading, reference image compression and uploading, task creation, credit estimation, and polling. It also maintains openclaw_tasks.json locally to record task status. The SkillHub page marks requires_api_key=true; you must configure the OpenClaw accessKey before use.
Core Features¶
The following capabilities are derived from the skill package’s SKILL.md and script implementation, and can be compared with the official description:
- Text-to-Image: When only a prompt is provided, it calls OpenClaw to create a generation task and polls until completion.
- Reference-to-Image / Image-to-Image: Pass local reference images multiple times via
--reference-image; images exceeding 4MB are compressed before upload without overwriting the local original file. - GPT Image Models & Quality Tiers: The default model alias is
gpt-image-vip(treated as the same class of GPT image models alongsidegpt-image-2andgpt-image-2-vip); supportslow/medium/high(and Chinese “低 / 中 / 高”). The script also supportsnano-banana-proandnano-banana2. - Dimensions & Resolution: Controls output via
--size(aspect ratio, e.g.,1:1,3:2) and--resolution(e.g.,1K,2K,4K). - Credit Estimation: Prints
estimated_creditsbefore creating a task; the documentation includes an estimation table for 1K/2K/4K across quality tiers, but the final amount is based on the API’scredits_charged. - E-commerce Multi-image Splitting: When prompts contain phrases like “first image,” “image set,” or “套图,” the skill requires splitting the request into multiple independent tasks to maintain consistency in the product subject and style, returning results grouped by number or purpose.
- Task Recovery: Incomplete historical tasks will continue polling on the next script run, preventing progress loss if long-running tasks are interrupted.
Installation & Activation¶
Install via SkillHub CLI¶
First, ensure skillhub is installed on your machine (see the SkillHub Installation Documentation for instructions). When installing the skill, you must use --dir to point to the current Agent’s skills directory; otherwise, it defaults to ./skills/ which may not be recognized.
skillhub install @user_07ea056c/gpt-image-2-new --dir ~/.cursor/skills/
Common directories (consistent with the official installation documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
The SkillHub page also supports providing the following prompt to an AI to complete the installation according to the same documentation:
Please install @user_07ea056c/gpt-image-2-new based on https://skillhub.cn/install/skillhub.md.
Configure OpenClaw Authentication¶
Copy the example configuration in the skill directory (same level as SKILL.md) and fill in the key:
cp config.example.json config.json
The structure of config.example.json is as follows:
{
"base_url": "https://openclaw.aisupermarket.top",
"access_key": "paste-your-access-key-here"
}
Replace access_key with the accessKey copied from the openclaw capability project after logging into https://openclaw.aisupermarket.top. You can also set environment variables for the current shell only (do not write to logs or public repositories):
export OPENCLAW_IMAGE_ACCESS_KEY="your-access-key"
export OPENCLAW_IMAGE_BASE_URL="https://openclaw.aisupermarket.top"
Typical Usage¶
Execute the Python script in the root directory of the skill package (the directory containing scripts/). The path depends on your actual installation directory, e.g., ~/.cursor/skills/@user_07ea056c/gpt-image-2-new/.
Text-to-Image¶
Use when the user provides only a prompt and no reference images:
python scripts/generate_image.py \
--prompt "A clean product hero image for a black smartwatch on glass" \
--size 1:1 \
--resolution 1K \
--model gpt-image-vip \
--quality medium
If quality is not explicitly requested, the skill documentation suggests defaulting to medium; use low for saving credits and high for high-definition commercial use.
Reference-to-Image¶
Repeat --reference-image for each local reference image:
python scripts/generate_image.py \
--prompt "Keep the product shape and create a premium launch poster" \
--reference-image "/path/to/product.png" \
--size 3:2 \
--resolution 2K \
--model gpt-image-vip \
--quality medium
Upon success, the script outputs JSON containing task status, image URLs, and billing information returned by the API. The Agent should summarize this for the user as per the skill instructions, without exposing the accessKey in the response.
Scenarios & Notes¶
Target Audience: Developers or operations staff who have activated OpenClaw’s image capabilities and wish to stably perform text-to-image, reference-based image editing, and e-commerce multi-image asset orchestration within Agent conversations.
Platform & Community Info: SkillHub crawl data shows this skill has a rating of 100000 and 2170 downloads (statistics are subject to the SkillHub page). Tags indicate an API Key is required; credit consumption and account permissions are subject to the OpenClaw platform.
Usage Notes:
accessKeyis equivalent to a password; do not commit it to Git or include it in screenshots or public issues.openclaw_tasks.jsononly stores task status and contains no keys.- There is a 4MB limit for reference image uploads; large images are automatically compressed to JPEG. Transparent channels are filled with a white background first.
- The default polling interval is 2 seconds with a 300-second timeout; these can be adjusted via
--poll-intervaland--timeout. Task IDs that time out are still written toopenclaw_tasks.jsonand can be tracked in the next run. - Consult
references/api.mdwithin the skill package for troubleshooting; reading it is not necessary for daily generation.
Conclusion¶
gpt-image-openclaw encapsulates the OpenClaw image generation workflow into an Agent-reusable SKILL.md and scripts: configure the accessKey once, and you can complete text-to-image, reference-to-image, and e-commerce image set splitting within a conversation, obtaining traceable tasks and image URLs.
- SkillHub API Page: https://api.skillhub.cn/user_07ea056c/gpt-image-2-new
- SkillHub Display Page: https://www.skillhub.cn/skills/user_07ea056c/gpt-image-2-new