Przejdź do treści
Biblioteka skilli
AI i agenci · Budowanie i kod

image-generation

/image-generation

Generuje lub edytuje obrazy na podstawie opisu tekstowego, takie jak ilustracje, zdjęcia, ikony, plakaty i inne treści wizualne.

Repozytorium
CowAgent ↗
Licencja
MIT
Ostatnia zmiana repozytorium
10.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 10.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/generate.py

Co robi i kiedy

Generuje lub edytuje obrazy na podstawie opisu tekstowego, takie jak ilustracje, zdjęcia, ikony, plakaty i inne treści wizualne.

Oryginalny opis (EN)

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.

Jak działa

  1. Usage
Sekcje z nagłówków SKILL.md, w oryginale · 106 linii, 667 słów
Podgląd SKILL.md
---
name: image-generation
description: 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.
metadata:
  cowagent:
    requires:
      anyEnv:
        - OPENAI_API_KEY
        - GEMINI_API_KEY
        - ARK_API_KEY
        - DASHSCOPE_API_KEY
        - MINIMAX_API_KEY
        - LINKAI_API_KEY
---

# 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`, `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).

```bash
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.

### 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

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

With aspect ratio:

```bash
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)

```bash
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:

```bash
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:

```json
{
  "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:

```json
{
  "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` / `size` to let the model pick automatically (`auto`).
- Input images for editing are auto-compressed to ≤ 4MB / longest edge ≤ 4096px.
Pliki w paczce (2)
  • SKILL.md 5 KB
  • scripts/generate.py 48 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · xucaibao1979-hub/CowAgent100MIT
shaharsha/claude-skills100MIT
bytedance/deer-flow100MIT
onyx-dot-app/onyx100MIT
zts212653/clowder-ai100MIT
zhayujie/cowagent100MIT
letta-ai/letta-code100Apache-2.0
event4u-app/agent-config100MIT
shinpr/mcp-image100MIT

Migawka bazy z 13.11.2026 · wersja paczki 9c6294196690 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100generate-image
    Generuje, edytuje i przerysowuje obrazy nieruchome na Comfy Cloud, także z podanego zdjęcia lub tekstu.
  • 100generating-images
    Generuje lub edytuje obrazy przez OpenAI Image API (gpt-image-2): ikony, loga, makiety, ilustracje, obrazy OG, grafiki blogowe i zasoby marketingowe, także na podstawie obrazu referencyjnego.
  • 95generate-image
    Generuje obrazy przez AI (OpenAI GPT Image lub Stability AI) z opisu tekstowego: ilustracje i grafiki na zamówienie.
  • 100nanobanana
    Generuje, edytuje i odnawia obrazy i materiały wizualne: ilustracje, ikony, diagramy, wzory, miniatury, grafiki wyróżniające, tapety i tekstury, z użyciem nanobanana.
  • 90image-forge-create
    Generuje nowy obraz z opisu tekstowego przez serwer image-forge: ilustrację, zdjęcie, logo lub makietę.
  • 100meta-image
    Generuje obrazy z tekstu, edytuje zdjęcia i łączy kilka obrazów w jeden przez Muse Image, czyli model muse-image-1.0.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.