본문으로 건너뛰기
Skillpedia
이미지 및 아이콘48k · #3615

image-generation

하는 일

AI 이미지 모델로 그림을 만들고 편집하는 방법을 에이전트에 가르칩니다. 글로 된 설명으로 시각 자료가 필요한 사람을 위한 스킬이며, 사용 가능한 제공자를 자동으로 고릅니다.

사용하는 경우

  • ✓일러스트, 아이콘, 포스터, 사진을 만들어 달라고 요청할 때.
  • ✓기존 이미지의 스타일이나 색을 바꾸는 등 편집이 필요할 때.
  • ✓어떤 AI 모델이 만들든 상관없이 시각 자료가 필요한 경우.

스킬 링크

https://github.com/zhayujie/CowAgent/blob/master/skills/image-generation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/zhayujie/CowAgent/blob/master/skills/image-generation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“따뜻하고 명랑한 분위기로 제 빵집 오픈을 알리는 포스터를 만들어 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 설정된 키를 바탕으로 사용 가능한 이미지 모델을 고르고, 요청문을 작성해 이미지를 작업 공간에 저장합니다. 생성에는 1분 이상 걸릴 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Image Generation

Generate and edit images using AI models. The script automatically picks a backend based on which API keys are configured — you don't need to specify a model unless the user explicitly names one. Never guess or invent a model: when the user doesn't name one, omit model entirely so the configured default/provider is used.

Supported models (passed via model only when the user asks for a specific one):

  • OpenAI — gpt-image-2.5-flare (recommended default: best quality/latency trade-off), gpt-image-2.5-sunburst (highest editing precision), gpt-image-2, gpt-image-1
  • Gemini Nano Banana — nano-banana-2, nano-banana-pro, nano-banana
  • Seedream (Volcengine Ark) — seedream-5.0-lite, seedream-4.5
  • Qwen (DashScope) — qwen-image-2.0, qwen-image-2.0-pro
  • MiniMax — image-01

Usage

Run scripts/generate.py with a JSON argument. Use the absolute <base_dir> path — do NOT cd into the skill directory, since it is a builtin skill and gets reset on restart (anything written there is lost).

python <base_dir>/scripts/generate.py '<json_args>'

Images are saved to the workspace (or the open project dir) under images/, so they persist and stay reachable to the client.

Set bash timeout to at least 600 seconds, as image generation can take 30–200s per provider, and the script may try multiple providers sequentially. Call it synchronously (do not run it in the background) and wait for its output in the same turn.

Parameters

Parameter Type Required Default Description
prompt string yes — Image description
image_url string / list no null Input image(s) for editing: local file path or URL. Multi-image fusion is supported (pass a list)
quality string no auto low / medium / high (only some backends honour this)
size string no auto 512 / 1K / 2K / 3K / 4K, or pixel value (1024x1024)
aspect_ratio string no null 1:1 / 3:2 / 2:3 / 16:9 / 9:16 / 21:9 (some backends also support extreme ratios like 1:4 / 8:1)

Higher quality and larger size cost more and run slower. In normal cases, when the user does not explicitly specify, low or medium is sufficient. Only use high when the user asks for it.

Example — generate

python <base_dir>/scripts/generate.py '{"prompt": "A corgi astronaut floating in space"}'

With aspect ratio:

python <base_dir>/scripts/generate.py '{"prompt": "Isometric miniature city of Shanghai at sunset", "size": "2K", "aspect_ratio": "16:9"}'

Important: Editing vs Generating

When the user asks to edit, modify, or improve an existing image, pass the original image via image_url. Prefer local file paths directly — the script handles file reading internally. Without image_url, the script generates a brand-new image instead of editing.

Example — edit (image-to-image)

python <base_dir>/scripts/generate.py '{"prompt": "Add a Santa hat to the dog", "image_url": "/path/to/dog.png"}'

Multi-image fusion — pass a list:

python <base_dir>/scripts/generate.py '{"prompt": "Combine these characters into a group photo", "image_url": ["/path/a.png", "/path/b.png"]}'

Output

Prints JSON to stdout:

{
  "model": "doubao-seedream-5-0-260128",
  "images": [
    {"url": "/path/to/output.png"}
  ]
}

After success, display the image to the user. You can either embed it in markdown (![description](/path/to/output.png)) or use the send tool.

On error:

{
  "error": "error message"
}

Setup

The script needs at least one of these API keys (set via env_config or config.json):

OPENAI_API_KEY / GEMINI_API_KEY / ARK_API_KEY / DASHSCOPE_API_KEY / MINIMAX_API_KEY / LINKAI_API_KEY

Each also has an optional *_API_BASE for custom endpoints. The script automatically picks the first configured backend and falls back to the next if it fails — no need to specify a model.

Error Handling

If the script returns an error after trying all configured backends, do NOT retry with the same parameters — the failure is almost always a configuration issue (wrong API key, unsupported API base). Tell the user to fix it via env_config, then retry.

Notes

  • HTTP timeout is 300s — high-resolution generation can take over 200s.
  • Omit quality /
자주 묻는 질문

모델을 직접 골라야 하나요?

아니요. 이름을 지정하지 않으면 스킬은 설정된 기본 제공자를 사용합니다.

이미지는 어디에 저장되나요?

작업 공간의 images 폴더에 저장되므로 나중에 찾을 수 있습니다.

얼마나 걸리나요?

스킬에 따르면 제공자마다 이미지 생성에 30초에서 200초가 걸릴 수 있습니다.

상세 정보

작성자의 원본 설명

Generate or edit images from text prompts. Use when the user asks to create, draw, design, or edit an image, illustration, photo, icon, poster, or any visual content.

repo: zhayujie/CowAgent

인기도

GitHub 스타
48k
순위
#3615
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬