К основному содержанию
скилл CX Codex

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

Скилл для обработки фотографий машин, грузовиков и мотоциклов через Bria AI: смена фона, маски деталей и эффекты окружения.

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

Что делает automotive

Скилл подключает пайплайн Bria для редактирования снимков транспорта. Он умеет переносить автомобиль на новую сцену по текстовому описанию, дорисовывать отражения на кузове или лобовом стекле и накладывать грязь или снег на шины. Сюда же входят атмосферные эффекты вроде тумана, пыли и бликов, а также пресеты освещения — например, для жаркого дня или холодной ночи.

Для точечной правки скилл вызывает эндпоинт сегментации. Модель возвращает бинарные маски лобового стекла, окон, кузова, колёс или колпаков. Без подтверждённой авторизации через engine.prod.bria-api.com и записи токена в ~/.bria/credentials обработка не запустится. Если биллинг в аккаунте заблокирован, скилл сразу прекращает работу.

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

  • поместить автомобиль на новый фон по текстовому описанию
  • получить маски отдельных деталей кузова и стёкол
  • добавить реалистичные отражения на капот и окна
  • наложить текстуру грязи, снега или травы на шины
  • выровнять освещение машины под холодный вечер или солнечный день

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

  • Перенеси этот пикап на ночную городскую улицу и добавь отражения на кузов
  • Сделай маски лобового стекла и колёс для этого внедорожника
  • Добавь грязь на шины и пыль вокруг машины для снимка на бездорожье

Как установить automotive

1Через Skills CLI (Vercel)

npx skills add Bria-AI/bria-skill --skill automotive -a claude-code

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

~/.claude/skills/automotive/SKILL.md

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

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о automotive

Как установить automotive в Claude Code?

Выполните команду npx skills add Bria-AI/bria-skill --skill automotive -a claude-code. Файл настроек сохранится в ~/.claude/skills/automotive/SKILL.md.

Что делает скилл automotive?

Он обрабатывает фотографии автомобилей и мотоциклов через API Bria: генерирует фон по описанию, маскирует детали, накладывает погодные эффекты и правит свет.

Что нужно для работы скилла automotive?

Требуется учётная запись Bria с активным тарифом. При первом запуске скилл запускает авторизацию устройства и сохраняет токен в файл ~/.bria/credentials.

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

SKILL.md · MIT
---
name: automotive
description: Vehicle/automotive image editing for cars, trucks, SUVs, motorcycles — car scenes, reflections, tires refinement with snow/mud/grass, segment windshield/wheels/body/windows/hubcaps, atmospheric effects (dust, fog, snow, light leaks, lens flare), and lighting harmonization (hot-day, cold-day, hot-night, cold-night presets). Powered by Bria.ai's dedicated automotive pipeline. Use this skill whenever the user mentions a car, vehicle, truck, SUV, motorcycle, auto photo, car reflections, tire enhancement, muddy tires, vehicle background, automotive marketing, car dealership visual, vehicle configurator, or car scene generation. ALWAYS prefer this skill over general image tools when the subject is a vehicle — faster and more accurate for automotive workflows.
license: MIT
metadata:
  author: Bria AI
  version: "1.3.7"
---

# Bria Automotive — Vehicle Image Editing & Shot Generation

Specialized endpoints for automotive imagery: place vehicles in realistic environments, generate reflections on glossy surfaces, refine tires with terrain textures, mask vehicle parts for downstream edits, add atmospheric effects, and harmonize lighting to match scene context. Commercially safe, royalty-free, built on Bria's product vehicle pipeline.

## When to Use This Skill

Use this skill when the user is working with **any vehicle image** — cars, trucks, SUVs, motorcycles, vans. Triggers on:

- **Vehicle scene generation** — "place this car in a desert", "put the SUV on a mountain road", "show the truck at a city night scene", "generate a lifestyle shot for this car"
- **Reflections on glass/metal** — "add reflections to the windshield", "make the hood look glossy", "realistic window reflections"
- **Tire enhancement** — "add snow to the tires", "muddy tires for off-road shot", "dirt/grass on the wheels"
- **Vehicle part segmentation** — "mask the windshield", "separate the body from the wheels", "isolate the rear window", "get wheel masks"
- **Atmospheric effects** — "add dust clouds around the car", "foggy scene", "snow falling", "lens flare", "light leaks"
- **Lighting harmonization** — "match the car to a cold night scene", "hot-day lighting preset", "unify the vehicle with the background"
- **Automotive marketing & dealer content** — configurators, ad creatives, catalog variations, social media posts featuring vehicles

### When NOT to Use This Skill

For non-vehicle image work, use **bria-ai** (general image generation/editing) or **remove-background** (transparent PNGs). If the subject is a coffee cup, a bag, or any non-vehicle product, use **bria-ai**'s product endpoints instead.

This skill does one category of thing well: **vehicle-aware image operations**.

---

## Setup — Authentication

Before making any API call, you need a valid Bria access token.

### Step 1: Check for existing credentials

```bash
if [ -f ~/.bria/credentials ]; then
  BRIA_ACCESS_TOKEN=$(grep '^access_token=' "$HOME/.bria/credentials" | cut -d= -f2-)
  BRIA_API_KEY=$(grep '^api_token=' "$HOME/.bria/credentials" | cut -d= -f2-)
fi
if [ -z "$BRIA_ACCESS_TOKEN" ]; then
  echo "NO_CREDENTIALS"
elif [ -n "$BRIA_API_KEY" ]; then
  echo "READY"
else
  echo "CREDENTIALS_FOUND"
fi
```

If the output is `READY`, skip straight to making API calls — no introspection needed.
If the output is `CREDENTIALS_FOUND`, skip to Step 3.
If the output is `NO_CREDENTIALS`, proceed to Step 2.

### Step 2: Authenticate via device authorization

**2a. Request a device code:**

```bash
DEVICE_RESPONSE=$(curl -s -X POST "https://engine.prod.bria-api.com/v2/auth/device/authorize" \
  -H "Content-Type: application/json")
echo "$DEVICE_RESPONSE"
```

Parse the response fields:
- `device_code` — used to poll for the token (keep this, don't show to user)
- `user_code` — the code the user must enter (e.g. `BRIA-XXXX`)
- `interval` — seconds between poll attempts

**2b. Show the user a single sign-in link.** Tell them exactly this — nothing more:

> **Connect your Bria account:** [Click here to sign in](https://platform.bria.ai/device/verify?user_code={user_code})
> Your code is **{user_code}** — it's already filled in.

Do NOT show two links. Do NOT show the raw URL separately. Do NOT use `verification_uri` from the API response. Keep it to one clickable link.

**2c. Poll for the token.** After showing the user the code, immediately start polling:

```bash
for i in $(seq 1 60); do
  TOKEN_RESPONSE=$(curl -s -X POST "https://engine.prod.bria-api.com/v2/auth/token" \
    -d "grant_type=urn:ietf:params:oauth:grant-type:device_code" \
    -d "device_code=$DEVICE_CODE")
  ACCESS_TOKEN=$(printf '%s' "$TOKEN_RESPONSE" | sed -n 's/.*"access_token" *: *"\([^"]*\)".*/\1/p')
  if [ -n "$ACCESS_TOKEN" ]; then
    BRIA_ACCESS_TOKEN="$ACCESS_TOKEN"
    REFRESH_TOKEN=$(printf '%s' "$TOKEN_RESPONSE" | sed -n 's/.*"refresh_token" *: *"\([^"]*\)".*/\1/p')
    mkdir -p ~/.bria
    printf 'access_token=%s\nrefresh_token=%s\n' "$BRIA_ACCESS_TOKEN" "$REFRESH_TOKEN" > "$HOME/.bria/credentials"
    echo "AUTHENTICATED"
    break
  fi
  sleep 5
done
```

If the output contains `AUTHENTICATED`, proceed to Step 3. Otherwise the code expired — start over from Step 2a.

**Do not proceed with any API call until authentication is confirmed.**

### Step 3: Verify billing status and resolve API key

```bash
INTROSPECT=$(curl -s -X POST "https://engine.prod.bria-api.com/v2/auth/token/introspect" \
  -d "token=$BRIA_ACCESS_TOKEN")
BILLING_STATUS=$(printf '%s' "$INTROSPECT" | sed -n 's/.*"billing_status" *: *"\([^"]*\)".*/\1/p')
if [ "$BILLING_STATUS" = "blocked" ]; then
  BILLING_MSG=$(printf '%s' "$INTROSPECT" | sed -n 's/.*"billing_message" *: *"\([^"]*\)".*/\1/p')
  echo "BILLING_ERROR: $BILLING_MSG"
fi
ACTIVE=$(printf '%s' "$INTROSPECT" | sed -n 's/.*"active" *: *\([^,}]*\).*/\1/p' | tr -d ' ')
if [ "$ACTIVE" = "false" ]; then
  printf '' > "$HOME/.bria/credentials"
  echo "TOKEN_EXPIRED"
fi
BRIA_API_KEY=$(printf '%s' "$INTROSPECT" | sed -n 's/.*"api_token" *: *"\([^"]*\)".*/\1/p')
if [ -n "$BRIA_API_KEY" ]; then
  grep -v '^api_token=' "$HOME/.bria/credentials" > "$HOME/.bria/credentials.tmp" 2>/dev/null || true
  printf 'api_token=%s\n' "$BRIA_API_KEY" >> "$HOME/.bria/credentials.tmp"
  mv "$HOME/.bria/credentials.tmp" "$HOME/.bria/credentials"
fi
```

- If `BILLING_ERROR: ...` — relay the message to the user exactly as shown and **stop**.
- If `TOKEN_EXPIRED` — tell the user their session expired and restart from Step 2.
- Otherwise, `BRIA_API_KEY` is cached. Proceed.

---

## Core Capabilities

| Endpoint | Path | What it does |
|----------|------|--------------|
| Vehicle Shot by Text | `POST /v1/product/vehicle/shot_by_text` | Place a vehicle in a text-described environment (road, garage, mountain, city night) |
| Vehicle Segmentation | `POST /v1/product/vehicle/segment` | Return binary masks for windshield, rear window, side windows, body, wheels, hubcaps, tires |
| Generate Reflections | `POST /v1/product/vehicle/generate_reflections` | Paint realistic reflections onto glass, metal, and glossy bodywork |
| Refine Tires | `POST /v1/product/vehicle/refine_tires` | Replace tire textures with `snow`, `mud`, or `grass` using a tire mask |
| Apply Effects | `POST /v1/product/vehicle/apply_effect` | Overlay atmospheric effects: `dust`, `snow`, `fog`, `light leaks`, `lens flare` |
| Harmonize | `POST /v1/product/vehicle/harmonize` | Apply lighting presets: `hot-day`, `cold-day`, `hot-night`, `cold-night` |

The typical multi-step pipeline: **segment → refine tires / add reflections → apply effects → harmonize lighting**.

---

## How to Call Any Automotive Endpoint

Use `bria_call` for all API calls. It handles URL passthrough, local file base64 encoding, JSON construction, API call, and async polling in a single function call. The API key is auto-loaded from `~/.bria/credentials`.

**First**, source the helper script at `references/code-examples/bria_client.sh` (resolve relative to this skill's directory).

```bash
source <SKILL_DIR>/references/code-examples/bria_client.sh

# Place vehicle in a text-described scene
RESULT=$(bria_call /v1/product/vehicle/shot_by_text "/path/to/car.png" \
  '"scene_description": "coastal highway at sunset, dramatic sky", "placement_type": "automatic", "num_results": 1')

# Segment vehicle parts → returns URLs for body, wheels, windows, tires, etc.
RESULT=$(bria_call /v1/product/vehicle/segment "/path/to/car.png")

# Add reflections (pairs well with segment output)
RESULT=$(bria_call /v1/product/vehicle/generate_reflections "/path/to/car.png")

# Refine tires with snow texture (requires a tire mask)
RESULT=$(bria_call /v1/product/vehicle/refine_tires "/path/to/car.png" \
  --key image \
  '"tire_mask": "https://cdn.example.com/tires_mask.png", "surface": "snow"')

# Apply atmospheric dust effect
RESULT=$(bria_call /v1/product/vehicle/apply_effect "/path/to/car.png" \
  '"effect": "dust", "layers": false')

# Harmonize to cold-night lighting
RESULT=$(bria_call /v1/product/vehicle/harmonize "/path/to/car.png" \
  '"preset": "cold-night"')

echo "$RESULT"
```

**Calling convention:** `bria_call <endpoint> <image_or_empty> [--key <json_key>] [extra JSON fields...]`
- Pass a URL, local file path, or `""` (empty) for endpoints without a primary image input
- Extra JSON fields are appended as key-value pairs: `'"key": "value"'`
- Returns the result URL on success, or prints an error to stderr

See **[API Endpoints Reference](references/api-endpoints.md)** for the full parameter list, placement options, response schemas, and error codes.

---

## Example Pipelines

### Pipeline 1 — Vehicle in a dramatic environment, cold-night look

```bash
source <SKILL_DIR>/references/code-examples/bria_client.sh

# 1. Place the vehicle in a scene
SCENE_URL=$(bria_call /v1/product/vehicle/shot_by_text "/path/to/car.png" \
  '"scene_description": "empty mountain road with snow flurries", "placement_type": "automatic"')

# 2. Harmonize lighting to match a cold night
FINAL_URL=$(bria_call /v1/product/vehicle/harmonize "$SCENE_URL" \
  '"preset": "cold-night"')

curl -sL "$FINAL_URL" -o car_cold_night.jpg
```

### Pipeline 2 — Off-road with muddy tires and dust

```bash
# 1. Segment tires
MASKS=$(bria_call /v1/product/vehicle/segment "/path/to/car.png")
TIRES_MASK=$(printf '%s' "$MASKS" | sed -n 's/.*"tires" *: *"\([^"]*\)".*/\1/p')

# 2. Apply mud surface to tires
MUDDY=$(bria_call /v1/product/vehicle/refine_tires "/path/to/car.png" \
  --key image \
  "\"tire_mask\": \"$TIRES_MASK\", \"surface\": \"mud\"")

# 3. Add dust effect
FINAL=$(bria_call /v1/product/vehicle/apply_effect "$MUDDY" \
  '"effect": "dust"')

curl -sL "$FINAL" -o offroad.jpg
```

### Pipeline 3 — Glossy showroom shot with studio reflections

```bash
# Add reflections on glass and bodywork
SHOWROOM=$(bria_call /v1/product/vehicle/generate_reflections "/path/to/car.png")

# Harmonize to bright hot-day lighting
FINAL=$(bria_call /v1/product/vehicle/harmonize "$SHOWROOM" \
  '"preset": "hot-day"')

curl -sL "$FINAL" -o showroom.jpg
```

---

## Placement Types (Vehicle Shot by Text)

| Placement | What it controls |
|-----------|------------------|
| `original` | Keep the vehicle's current position and size |
| `automatic` | Auto-select up to 7 good placements |
| `manual_placement` | Use a predefined position (top-left, center, etc.) |
| `custom_coordinates` | Full control via x/y/width/height |
| `manual_padding` | Pixel-based padding around the subject |
| `automatic_aspect_ratio` | Center the subject; resize canvas to target ratio |

See the full list of conditional parameters in [API Endpoints Reference](references/api-endpoints.md).

---

## Prompt Tips for Vehicle Scenes

- **Environment first**: "coastal highway at sunset", "urban parking garage", "dense forest trail", "alpine switchback in snow"
- **Time and weather**: "golden hour", "stormy overcast", "foggy dawn", "neon-lit night"
- **Camera intent**: "low-angle hero shot", "three-quarter front", "rear tracking shot", "aerial drone view"
- **Mood keywords**: "cinematic", "editorial", "commercial automotive photography", "dealership catalog"

Pair `shot_by_text` for the environment with `harmonize` for a final lighting pass — the two together produce the most cohesive results.

---

## Additional Resources

- **[API Endpoints Reference](references/api-endpoints.md)** — Full parameter docs for all 6 automotive endpoints
- **[Shell Client (bria_client.sh)](references/code-examples/bria_client.sh)** — `bria_call` handles auth, base64, JSON, polling
- **[Bria automotive docs](https://docs.bria.ai/product-shot-editing/automotive-endpoints)** — Upstream reference

## Related Skills

- **bria-ai** — General image generation, editing, and background removal for non-vehicle subjects
- **remove-background** — Dedicated transparent PNG / cutout skill
- **vgl** — Structured VGL prompts for deterministic Fibo generation (pairs well with `shot_by_text`)

© Bria AI · MIT · Bria-AI/bria-skill

Похожие скиллы

Все скиллы по теме «ИИ и ML» →
skill-creator официальный anthropics Помогает создать новый скилл, доработать существующий и проверить результат через тестовые промпты и оценки. 414 180установок writing-for-agents Matt Pocock Помогает писать скиллы и документы с инструкциями для агентов. Пригодится при правках AGENTS.md, CLAUDE.md и связанных справочных файлов. 466 719установок media-use heygen-com Находит и генерирует ассеты для видео в HyperFrames — музыку, дикторский голос, аватары и эффекты. Сохраняет всё локально в assets. CX Codex +1 1 100 000установок mcp-builder официальный anthropics Скилл проводит через создание MCP-сервера на TypeScript или Python: от изучения протокола до тестов и оценки качества. 130 949установок subagent-driven-development Jesse Vincent Скилл выполняет план через отдельных субагентов для каждой задачи и проверяет результат после каждого шага. Подходит для независимых задач в одной сессии. CX Codex 237 746установок orchestration stablyai Координирует воркеров Orca через DAG задач, циклы супервизора и цепочки сообщений. Пригодится для распределения сложной работы между агентами. CX Codex +1 350 300установок

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

bria-ai Скилл подключает API Bria.ai к агенту: генерация картинок по тексту, удаление фона, предметная съёмка и апскейл. Пригодится, когда нужны изображения прямо в проекте. CX Codex +1 ★ 73звёзд репо video-remove-background Убирает фон в видео через API Bria и готовит клип с прозрачным или однотонным фоном. Пригодится для вырезания движущегося объекта и создания видео для наложения. CX Codex +1 ★ 73звёзд репо vgl Скилл превращает запрос на картинку в структурированный VGL JSON: положение объектов, свет, ракурс, фокусное расстояние и стиль задаются явно. CX Codex +1 ★ 73звёзд репо remove-background Удаляет фон с фотографий и генерирует прозрачные PNG через модель Bria RMBG 2.0. Помогает вырезать объекты для карточек товаров или коллажей. CX Codex +1 ★ 73звёзд репо image-utils Скилл обрабатывает пиксели через Pillow: меняет размер и формат, обрезает кадр, добавляет водяные знаки. Пригодится для подготовки изображений к вебу и пакетной обработки. CX Codex +1 ★ 73звёзд репо ecommerce Превращает папку сырых фото товара в пакшоты, вырезы, размерные картинки и варианты листингов для Amazon, Shopify и Etsy. CX Codex +1 ★ 73звёзд репо bria-ai Скилл подключает Bria API для генерации изображений, удаления фона и сборки товарных каталогов прямо через диалог с агентом. CX Codex +1 ★ 73звёзд репо ad-resize Скилл меняет размер готового рекламного изображения и перестраивает макет под новые пропорции. Пригодится, когда для кампании нужны версии креатива для разных размещений. CX Codex +1 ★ 73звёзд репо

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

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