Claude Code-image-2 · pilioai — Claude Code skill: generate and edit images
A skill that wires Claude Image 2 into your agent through the Pilio API: text-to-image, prompt-based edits, restyling and reference composition.
npx skills add pilioai/skills --skill gpt-image-2 -a claude-codeWhat gpt-image-2 does
The skill hands your agent Claude Image 2 through the unified Pilio developer API. It covers text-to-image generation, prompt-based editing, restyling, turning a plain product shot into a studio photo, and building one composition from several local reference images.
Everything runs through the Pilio CLI, so uploads, polling, credits and API errors behave the same as in the official SDK. You need PILIO_API_KEY in your environment; the skill tells the agent not to ask you to paste keys into the chat. There is no separate resolution parameter upstream — the canvas shape comes from --aspect-ratio, and Pilio appends that ratio to the prompt. Send a resolution field and the request comes back with HTTP 400, so leave it out.
The command returns a task payload. If the task is still pending or processing, wait on it with pnpm dlx @pilio/cli task wait <task_id>.
What it helps with
- generate an image from a text prompt
- edit an existing picture by prompt
- compose one frame from several local references
- turn a product photo into a studio shot
- set the output canvas shape via aspect ratio
Example prompts for the agent
- Generate a 16:9 image: mountain landscape at sunrise
- Edit ./reference.png — drop the background and light it like a studio
- Compose ./front.png and ./back.png into a single frame
How to install gpt-image-2
1Skills CLI (Vercel)
npx skills add pilioai/skills --skill gpt-image-2 -a claude-code2Manually: put the files in place
~/.claude/skills/gpt-image-2/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gpt-image-2/
1Skills CLI (Vercel)
npx skills add pilioai/skills --skill gpt-image-2 -a codex2Manually: put the files in place
.agents/skills/gpt-image-2/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add pilioai/skills --skill gpt-image-2 -a cursor2Manually: put the files in place
.cursor/skills/gpt-image-2/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install pilioai/skills gpt-image-22Manually: put the files in place
.github/skills/gpt-image-2/SKILL.md1Skills CLI (Vercel)
npx skills add pilioai/skills --skill gpt-image-2 -a gemini-cli2Platform CLI
gemini skills install https://github.com/pilioai/skills --path skills/gpt-image-2Manually: put the files in place
.devin/skills/gpt-image-2/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add pilioai/skills --skill gpt-image-2 -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about gpt-image-2
How do I install Claude-image-2 in Claude?
Run npx skills add pilioai/skills --skill gpt-image-2 -a claude-code. The skill file then lands at ~/.claude/skills/gpt-image-2/SKILL.md.
What does Claude-image-2 do?
It generates images from text prompts and edits existing ones: restyling, background changes, composition from multiple references. All of it goes through the Pilio CLI and the Claude Image 2 model.
What do I need before using it?
A PILIO_API_KEY in your environment variables. Don't paste the key into the conversation with the agent.
Source text
SKILL.md · MIT
--- name: gpt-image-2 description: Create or edit images with Pilio GPT Image 2 through the unified Pilio developer API. Use when the user wants text-to-image generation, prompt-based image editing, restyling, product-photo transformation, or composition from one or more local reference images. --- # GPT Image 2 Use the Pilio CLI so upload, polling, credits, and API errors stay consistent with the official SDK. Require `PILIO_API_KEY` in the environment. Do not ask the user to paste API keys into the conversation. Try the same workflow online first: https://pilio.ai/ Generate from text: ```bash pnpm dlx @pilio/cli gpt-image-2 --prompt "<prompt>" --aspect-ratio "1:1" ``` Edit or compose from one or more references: ```bash pnpm dlx @pilio/cli gpt-image-2 --input ./reference.png --prompt "<edit prompt>" ``` Common options: - `--input`: local reference image path. Repeat for multiple references. - `--aspect-ratio`: `1:1`, `3:2`, `2:3`, `3:4`, `4:3`, `4:5`, `5:4`, `16:9`, `9:16`, `21:9`, or `auto`. - `--quality`: `low`, `medium`, or `high`. GPT Image 2's upstream model does not expose a separate resolution parameter. Use `--aspect-ratio` to request the output canvas shape; Pilio appends that ratio to the prompt to guide generation. Requests containing `resolution` are rejected with HTTP 400. The command returns a task payload. If the task is still pending or processing, wait for it: ```bash pnpm dlx @pilio/cli task wait <task_id> ```
© pilioai · MIT · pilioai/skills
Similar skills
Everything for AI and ML →gpt-image-2 by other authors comes first.