К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

image-generation — скилл для Claude Code: что делает и как установить

Формирует структурированные JSON-промпты для генерации изображений и запускает готовый Python-скрипт с поддержкой референсов. Пригодится для отрисовки персонажей и сюжетных сцен.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add bytedance/deer-flow --skill image-generation -a claude-code
Открыть на GitHub

Что делает image-generation

Скилл переводит текстовый запрос пользователя в структурированный JSON-файл в папке /mnt/user-data/workspace/. В этот конфиг агент раскладывает параметры объекта, стилистику и негативный промпт. При необходимости к запросу подключаются пути к нескольким картинкам-референсам.

После подготовки конфига агент вызывает утилиту /mnt/skills/public/image-generation/scripts/generate.py. Скрипт принимает обязательные флаги --prompt-file и --output-file, а также необязательный параметр --aspect-ratio со значением 16:9 по умолчанию. Читать исходный код этого Python-файла агенту запрещено инструкцией — разрешено только передавать аргументы.

Такая схема жёстко завязана на пути внутри /mnt/, поэтому за пределами целевого окружения раннера скрипт сразу упрётся в ошибки файловой системы.

Какие задачи решает

  • составить структурированный JSON-промпт для генерации арт-ассетов
  • передать несколько референсных картинок в пайплайн генерации
  • сгенерировать кадр с нужным соотношением сторон через скрипт
  • описать персонажа с деталями одежды и черт лица

Примеры запросов агенту

  • Сгенерируй изображение женщины в токийском уличном стиле 1990-х годов
  • Создай концепт-арт персонажа на основе референса /mnt/user-data/uploads/character-ref.jpg с соотношением сторон 2:3
  • Сделай визуализацию сцены на улице чужой планеты с двумя референсными картинками

Как установить image-generation

1Через Skills CLI (Vercel)

npx skills add bytedance/deer-flow --skill image-generation -a claude-code

2Вручную: положить файлы

~/.claude/skills/image-generation/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/image-generation/

Из того же набора11

Весь набор →
ppt-generation bytedance Генерирует слайды для презентаций в формате PPTX через создание картинок к каждому экрану. Пригодится, когда нужно быстро собрать визуальный доклад с единым оформлением. Claude Code CX Codex Cursor +1 5 200установок video-generation bytedance Скилл создаёт видеоролики через структурированные JSON-промпты и модели Gemini Veo или MiniMax по текстовому запросу или опорному кадру. Claude Code CX Codex Cursor +1 3 000установок consulting-analysis bytedance Скилл помогает подготовить план исследования, а затем собрать данные в структурированный аналитический отчёт. Подойдёт для анализа рынка, финансов или конкурентов. Claude Code CX Codex Cursor +1 3 000установок deep-research bytedance Скилл для глубокого веб-исследования с методикой многоугольного анализа. Используй его вместо обычного поиска, когда нужно понять тему со всех сторон перед тем, как писать контент или отвечать на сложный вопрос. Claude Code CX Codex Cursor +1 2 800установок academic-paper-review bytedance Скилл для автоматической рецензии научных работ по стандартам топовых конференций. Анализирует методологию, оценивает новизну, ищет слабые места и даёт обоснованную критику. Claude Code CX Codex Cursor +1 2 700установок systematic-literature-review bytedance Скилл для автоматического поиска и синтеза множества статей по теме из arXiv. Собирает исследования, извлекает ключевые находки и выдаёт отчёт в формате APA, IEEE или BibTeX. Claude Code CX Codex Cursor +1 2 500установок surprise-me bytedance Скилл подбирает другие доступные скиллы и соединяет их в один неожиданный результат. Запустите его, когда хочется идеи или творческого эксперимента. Claude Code CX Codex Cursor +1 2 300установок code-documentation bytedance Скилл автоматически создаёт README, API-референс, архитектурную документацию и гайды разработчика прямо из кода. Пригодится, если нужно документировать проект, библиотеку или API без ручной писанины. Claude Code CX Codex Cursor +1 1 900установок

Похожие

agent-platform-alert-configuration официальный google Скилл создаёт Terraform-конфигурации для алертов AI-агентов по OTel-метрикам. Подойдёт для контроля задержки, ошибок, расхода токенов и качества. Claude Code Gemini CLI CX Codex 6 857установок gke-inference официальный google Готовит Kubernetes-манифесты для AI/ML-инференса на GKE и помогает выбрать модельный профиль и ускоритель для нового сервинга. Claude Code Gemini CLI CX Codex 6 791установок plannotator-compound backnotprop Разбирает архив планов Plannotator, вытаскивает причины отказов и собирает из них HTML-отчёт с графикой и выводами. Claude Code CX Codex Cursor +1 11 400установок h3-prompt-writing MiniMax-AI Преобразует мультимодальные запросы в структурированные промпты для видеомодели MiniMax H3. Помогает настроить хронометраж, свести ключевые кадры и оформить аудиодорожки. Claude Code CX Codex Cursor +1 11 500установок scroll-world oso95 Скилл собирает лендинг, где скролл управляет камерой: она влетает внутрь сцены и без склеек переходит к следующей. Claude Code CX Codex Cursor +1 4 800установок google-agents-cli-onboarding официальный google Скилл подключает рабочий цикл agents-cli для создания, проверки, развёртывания и публикации AI-агентов. Нужен при работе с ADK. Claude Code Gemini CLI CX Codex 6 434установок skill-creator официальный anthropics Помогает создать новый скилл, доработать существующий и проверить результат через тестовые промпты и оценки. Claude Code Claude.ai 414 180установок writing-for-agents Matt Pocock Помогает писать скиллы и документы с инструкциями для агентов. Пригодится при правках AGENTS.md, CLAUDE.md и связанных справочных файлов. Claude Code 466 719установок

Вопросы о image-generation

Как установить image-generation в Claude Code?

Выполните команду npx skills add bytedance/deer-flow --skill image-generation -a claude-code в терминале.

Что делает скилл image-generation?

Он преобразует пожелания к картинке в JSON-конфигурацию и запускает внутренний Python-скрипт для генерации итогового файла.

Какое соотношение сторон задаётся по умолчанию?

По умолчанию скрипт использует значение 16:9 для параметра --aspect-ratio, но его можно переопределить при вызове.

Исходный текст

SKILL.md · MIT
---
name: image-generation
description: Use this skill when the user requests to generate, create, imagine, or visualize images including characters, scenes, products, or any visual content. Supports structured prompts and reference images for guided generation.
---

# Image Generation Skill

## Overview

This skill generates high-quality images using structured prompts and a Python script. The workflow includes creating JSON-formatted prompts and executing image generation with optional reference images.

## Core Capabilities

- Create structured JSON prompts for AIGC image generation
- Support multiple reference images for style/composition guidance
- Generate images through automated Python script execution
- Handle various image generation scenarios (character design, scenes, products, etc.)

## Workflow

### Step 1: Understand Requirements

When a user requests image generation, identify:

- Subject/content: What should be in the image
- Style preferences: Art style, mood, color palette
- Technical specs: Aspect ratio, composition, lighting
- Reference images: Any images to guide generation
- You don't need to check the folder under `/mnt/user-data`

### Step 2: Create Structured Prompt

Generate a structured JSON file in `/mnt/user-data/workspace/` with naming pattern: `{descriptive-name}.json`

### Step 3: Execute Generation

Call the Python script:
```bash
python /mnt/skills/public/image-generation/scripts/generate.py \
  --prompt-file /mnt/user-data/workspace/prompt-file.json \
  --reference-images /path/to/ref1.jpg /path/to/ref2.png \
  --output-file /mnt/user-data/outputs/generated-image.jpg
  --aspect-ratio 16:9
```

Parameters:

- `--prompt-file`: Absolute path to JSON prompt file (required)
- `--reference-images`: Absolute paths to reference images (optional, space-separated)
- `--output-file`: Absolute path to output image file (required)
- `--aspect-ratio`: Aspect ratio of the generated image (optional, default: 16:9)

[!NOTE]
Do NOT read the python file, just call it with the parameters.

## Character Generation Example

User request: "Create a Tokyo street style woman character in 1990s"

Create prompt file: `/mnt/user-data/workspace/asian-woman.json`
```json
{
  "characters": [{
    "gender": "female",
    "age": "mid-20s",
    "ethnicity": "Japanese",
    "body_type": "slender, elegant",
    "facial_features": "delicate features, expressive eyes, subtle makeup with emphasis on lips, long dark hair partially wet from rain",
    "clothing": "stylish trench coat, designer handbag, high heels, contemporary Tokyo street fashion",
    "accessories": "minimal jewelry, statement earrings, leather handbag",
    "era": "1990s"
  }],
  "negative_prompt": "blurry face, deformed, low quality, overly sharp digital look, oversaturated colors, artificial lighting, studio setting, posed, selfie angle",
  "style": "Leica M11 street photography aesthetic, film-like rendering, natural color palette with slight warmth, bokeh background blur, analog photography feel",
  "composition": "medium shot, rule of thirds, subject slightly off-center, environmental context of Tokyo street visible, shallow depth of field isolating subject",
  "lighting": "neon lights from signs and storefronts, wet pavement reflections, soft ambient city glow, natural street lighting, rim lighting from background neons",
  "color_palette": "muted naturalistic tones, warm skin tones, cool blue and magenta neon accents, desaturated compared to digital photography, film grain texture"
}
```

Execute generation:
```bash
python /mnt/skills/public/image-generation/scripts/generate.py \
  --prompt-file /mnt/user-data/workspace/cyberpunk-hacker.json \
  --output-file /mnt/user-data/outputs/cyberpunk-hacker-01.jpg \
  --aspect-ratio 2:3
```

With reference images:
```json
{
  "characters": [{
    "gender": "based on [Image 1]",
    "age": "based on [Image 1]",
    "ethnicity": "human from [Image 1] adapted to Star Wars universe",
    "body_type": "based on [Image 1]",
    "facial_features": "matching [Image 1] with slight weathered look from space travel",
    "clothing": "Star Wars style outfit - worn leather jacket with utility vest, cargo pants with tactical pouches, scuffed boots, belt with holster",
    "accessories": "blaster pistol on hip, comlink device on wrist, goggles pushed up on forehead, satchel with supplies, personal vehicle based on [Image 2]",
    "era": "Star Wars universe, post-Empire era"
  }],
  "prompt": "Character inspired by [Image 1] standing next to a vehicle inspired by [Image 2] on a bustling alien planet street in Star Wars universe aesthetic. Character wearing worn leather jacket with utility vest, cargo pants with tactical pouches, scuffed boots, belt with blaster holster. The vehicle adapted to Star Wars aesthetic with weathered metal panels, repulsor engines, desert dust covering, parked on the street. Exotic alien marketplace street with multi-level architecture, weathered metal structures, hanging market stalls with colorful awnings, alien species walking by as background characters. Twin suns casting warm golden light, atmospheric dust particles in air, moisture vaporators visible in distance. Gritty lived-in Star Wars aesthetic, practical effects look, film grain texture, cinematic composition.",
  "negative_prompt": "clean futuristic look, sterile environment, overly CGI appearance, fantasy medieval elements, Earth architecture, modern city",
  "style": "Star Wars original trilogy aesthetic, lived-in universe, practical effects inspired, cinematic film look, slightly desaturated with warm tones",
  "composition": "medium wide shot, character in foreground with alien street extending into background, environmental storytelling, rule of thirds",
  "lighting": "warm golden hour lighting from twin suns, rim lighting on character, atmospheric haze, practical light sources from market stalls",
  "color_palette": "warm sandy tones, ochre and sienna, dusty blues, weathered metals, muted earth colors with pops of alien market colors",
  "technical": {
    "aspect_ratio": "9:16",
    "quality": "high",
    "detail_level": "highly detailed with film-like texture"
  }
}
```
```bash
python /mnt/skills/public/image-generation/scripts/generate.py \
  --prompt-file /mnt/user-data/workspace/star-wars-scene.json \
  --reference-images /mnt/user-data/uploads/character-ref.jpg /mnt/user-data/uploads/vehicle-ref.jpg \
  --output-file /mnt/user-data/outputs/star-wars-scene-01.jpg \
  --aspect-ratio 16:9
```

## Common Scenarios

Use different JSON schemas for different scenarios.

**Character Design**:
- Physical attributes (gender, age, ethnicity, body type)
- Facial features and expressions
- Clothing and accessories
- Historical era or setting
- Pose and context

**Scene Generation**:
- Environment description
- Time of day, weather
- Mood and atmosphere
- Focal points and composition

**Product Visualization**:
- Product details and materials
- Lighting setup
- Background and context
- Presentation angle

## Specific Templates

Read the following template file only when matching the user request.

- [Doraemon Comic](templates/doraemon.md)

## Output Handling

After generation:

- Images are typically saved in `/mnt/user-data/outputs/`
- Share generated images with user using present_files tool
- Provide brief description of the generation result
- Offer to iterate if adjustments needed

## Tips: Enhancing Generation with Reference Images

For scenarios where visual accuracy is critical, **use the `image_search` tool first** to find reference images before generation.

**Recommended scenarios for using image_search tool:**
- **Character/Portrait Generation**: Search for similar poses, expressions, or styles to guide facial features and body proportions
- **Specific Objects or Products**: Find reference images of real objects to ensure accurate representation
- **Architectural or Environmental Scenes**: Search for location references to capture authentic details
- **Fashion and Clothing**: Find style references to ensure accurate garment details and styling

**Example workflow:**
1. Call the `image_search` tool to find suitable reference images:
   ```
   image_search(query="Japanese woman street photography 1990s", size="Large")
   ```
2. Download the returned image URLs to local files
3. Use the downloaded images as `--reference-images` parameter in the generation script

This approach significantly improves generation quality by providing the model with concrete visual guidance rather than relying solely on text descriptions.

## Providers (Gemini / MiniMax / OpenAI-compatible)

This skill auto-selects the provider by environment variables (no CLI change):

- `GEMINI_API_KEY` set → use Gemini (default, unchanged).
- Otherwise, `MINIMAX_API_KEY` set → use MiniMax (`/v1/image_generation`, model `image-01`).
- Otherwise, `IMAGE_GENERATION_API_KEY` set → use an OpenAI-compatible Images API.
- Force one explicitly with `IMAGE_GENERATION_PROVIDER=gemini|minimax|openai`.
  `openai-compatible` is also accepted as an alias for `openai`.

OpenAI-compatible settings:

- `IMAGE_GENERATION_API_KEY` (required)
- `IMAGE_GENERATION_BASE_URL` (default `https://api.openai.com/v1`)
- `IMAGE_GENERATION_MODEL` (default `gpt-image-2.5-flare`)
- `IMAGE_GENERATION_SIZE` (optional fixed size override)

Text-to-image calls use `POST {base_url}/images/generations`. Reference-image calls
use multipart `POST {base_url}/images/edits`; a relay may support generation without
supporting edits. Responses may contain base64 image data, a data URL, or a downloadable
URL. Aspect ratios map to `1024x1024`, `1536x1024`, or `1024x1536` unless
`IMAGE_GENERATION_SIZE` is set. The output extension selects the API `output_format`:
`.jpg`/`.jpeg` uses `jpeg`, `.webp` uses `webp`, and all other extensions use `png`.
When `dall-e-2` or `dall-e-3` is configured instead, the request uses the model's
supported dimensions and `response_format=b64_json`; DALL-E output files must use a
`.png` extension. Reference-image editing with DALL-E models is not supported by this
skill; use the default GPT Image model for edits.

MiniMax optional overrides: `MINIMAX_API_HOST` (default `https://api.minimaxi.com`),
`MINIMAX_IMAGE_MODEL` (default `image-01`). Reference images are sent as the MiniMax
`subject_reference` character image. The CLI and `--prompt-file` / `--reference-images`
/ `--output-file` / `--aspect-ratio` arguments are identical for both providers.

**MiniMax prompt handling (provider-internal).** Authoring is provider-agnostic — write
the same structured JSON regardless of which provider is active. MiniMax `image-01`
consumes a single text string, so the MiniMax path itself sends only the JSON `prompt`
field (the other fields such as `style` / `composition` / `negative_prompt` apply to the
Gemini path) and enables `prompt_optimizer` so MiniMax expands it server-side. MiniMax
caps that prompt at 1500 characters; if the `prompt` field is longer, the script returns
an error instead of calling the API. The Gemini path receives the full structured JSON.

## Notes

- Always use English for prompts regardless of user's language
- JSON format ensures structured, parsable prompts
- Reference images enhance generation quality significantly
- Iterative refinement is normal for optimal results
- For character generation, include the detailed character object plus a consolidated prompt field

© bytedance · MIT · bytedance/deer-flow

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой