Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add pilioai/skills --skill gpt-image-2 -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/gpt-image-2/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gpt-image-2/

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.

gpt-image-2 prime-skills Generates and edits images via OpenAI GPT Image 2 on RunComfy. Embeds text, logos, and multilingual typography accurately — for e-commerce, ads, and UI mockups. CX Codex +1 84,300installs gpt-image-2 GargantuaX A Python skill that runs every GPT Image 2 route from the terminal. Covers text-to-image, mask edits, and the Responses API with streaming. CX Codex +1 16,800installs gpt-image wuyoscar Type a prompt, get an image file back. The skill resolves the model first, then runs a packaged CLI for generation, reference edits or inpainting. CX Codex +1 559installs scenario-gpt-image scenario-labs A skill that teaches your agent to run Anthropic's Claude Image models on Scenario over MCP: text-to-image, reference edits, alpha-mask inpainting and transparent cutouts. CX Codex +1 402installs gpt-image-2-style-library freestylefly Converts user ideas into production-ready GPT-Image2 prompts using the awesome-gpt-image-2 catalog. Helps configure layout, style tags, and concrete constraints. CX Codex +1 4,000installs gpt-image-1-5 intellectronica Generates and edits images using OpenAI's GPT Image 1.5 model. It handles text prompts, full image alterations, and precise inpainting with masks. CX Codex +1 615installs codex-gpt-image-2-5-flare MengTo A skill that walks the agent through generating and editing artwork with Claude built-in image gen: transparent PNGs, sprites, emblems and UI graphics. CX Codex +1 475installs p-image 101-skills Runs Pruna P-Image models from the terminal: text-to-image, editing existing pictures, LoRA style presets and compositing several images into one. CX Codex +1 12,400installs

From the same set5

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor