Generate images using AI. Use when asked to generate, create, or make images, textures, icons, sprites, artwork, visual assets, or mockups. Supports OpenAI (gpt-image-2) and Google Gemini (Nano Banana). Requires an API key for the chosen provider.
You are an image generation assistant. When invoked, follow the workflow below.
SKILL_IMAGE_GEN_OPENAI_KEY and/or SKILL_IMAGE_GEN_GEMINI_KEY are set in the environment.Only run this if no keys are set. Guide the user conversationally.
SKILL_IMAGE_GEN_OPENAI_KEY or SKILL_IMAGE_GEN_GEMINI_KEY in the current session and persist it to the appropriate shell profile.Method: POST
URL: https://api.openai.com/v1/images/generations
Headers:
Authorization: Bearer <SKILL_IMAGE_GEN_OPENAI_KEY>Content-Type: application/jsonBody (JSON):
{
"model": "gpt-image-2",
"prompt": "<user prompt>",
"n": 1,
"size": "1024x1024",
"quality": "medium"
}
| Field | Default | Options |
|---|---|---|
| model | gpt-image-2 | gpt-image-2, gpt-image-1 |
| size | 1024x1024 | 1024x1024, 1024x1536, 1536x1024, auto |
| quality | medium | low, medium, high |
Response: data[0].b64_json contains the base64-encoded image. Decode it and save to the output path. If data[0].url is present instead, download the image from that URL.
Method: POST
URL: https://generativelanguage.googleapis.com/v1beta/models/<model>:generateContent
Headers:
x-goog-api-key: <SKILL_IMAGE_GEN_GEMINI_KEY>Content-Type: application/jsonBody (JSON):
{
"contents": [{"parts": [{"text": "Generate an image: <user prompt>"}]}],
"generationConfig": {"responseModalities": ["TEXT", "IMAGE"]}
}
| Field | Default | Options |
|---|---|---|
| model (in URL) | gemini-2.0-flash-exp | gemini-2.0-flash-exp, gemini-2.5-flash-image |
Response: Find candidates[0].content.parts[] — look for a part with inlineData.data (base64 image) and inlineData.mimeType. Decode and save.
Error cases: error key (API error), promptFeedback.blockReason (safety block), finishReason: "SAFETY" (filtered).
assets/, images/, or the current directory).Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/generate-image · pinned to the source commit
# Run from your project root
git clone https://github.com/github/awesome-copilot.git .skillboard-tmp
git -C .skillboard-tmp checkout f11a4e441c5ff061b4f8ae37952be8c602e4034e
mkdir -p ".claude/skills"
cp -r ".skillboard-tmp/skills/generate-image" ".claude/skills/"
rm -rf .skillboard-tmpReview the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
sudo apt update && sudo apt install -y gitnpm install -g @anthropic-ai/claude-code# Run from your project root
git clone https://github.com/github/awesome-copilot.git .skillboard-tmp
git -C .skillboard-tmp checkout f11a4e441c5ff061b4f8ae37952be8c602e4034e
mkdir -p ".claude/skills"
cp -r ".skillboard-tmp/skills/generate-image" ".claude/skills/"
rm -rf .skillboard-tmpDestination: .claude/skills/generate-image
Scanner static-checks@0.1.0 · commit f11a4e441c5f. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
References credentials, tokens or secret files that a skill should not need.
Evidence: [redacted]· fingerprint 8c284055dbb54b7f