---
name: brand-studio
description: Create a brand identity with Brand Studio (Custom Arena) — logo concepts, brand guidelines with design tokens, a matching icon library and decorative patterns — and wire the results into the current codebase. Use when the user asks for a logo, branding, a brand book or style guide, brand colours/fonts/tokens, an icon set in their brand style, or decorative patterns, borders, dividers, stickers or email banners.
---

# Brand Studio

Brand Studio (https://icons.customarena.com) generates a complete brand kit:

1. **Logo** — several concepts from a short brief; pick one.
2. **Brand analysis** — a structured design specification read from the logo (and brand guidelines if uploaded).
3. **Icons** — an icon library drawn in that style (SVG + PNG, sprite).
4. **Patterns** — seamless tiles, letter borders, corner ornaments, dividers, stickers, email banners, backgrounds.
5. **Brand book** — story, values, voice, colours (HEX/RGB/CMYK, contrast), typography, logo rules + `tokens.json`, `brand.css`, `tailwind.brand.js`.

Any subset can run; later stages need the brand analysis (which needs a logo).

## Connect

Preferred: the MCP server (tools appear as `brand-studio` / `mcp__brand-studio__*`).

```bash
claude mcp add --transport http brand-studio https://icons.customarena.com/mcp --header "Authorization: Bearer $BRAND_STUDIO_API_KEY"
```

The user creates the key at https://icons.customarena.com → **API & MCP**. Never print, log or commit the key; read it from the environment.
If MCP is not configured, use the REST API with `curl` (see the bottom of this file).

## Workflow

1. **Ask only what you cannot infer**: brand name (exact spelling), what the business does, style and colour wishes, which icons the product needs (read them from the codebase — nav items, buttons, empty states — when possible).
2. **Fast path**: `run_pipeline` with `name`, `description`, `style`, `colors`, `icons` (one per line) and optional `stages` / `patterns`. It creates the project, picks the first logo concept and approves the icon preview automatically.
   **Careful path** (when the user wants to choose): `create_project` → `create_logo_concepts` → show the concept PNG URLs and let the user pick → `choose_logo` → `analyze_brand` → `generate_icon_preview` → `approve_preview` → `generate_icons` / `generate_patterns` / `generate_brand_book`.
   If the user already has a logo or guidelines: `upload_asset` (base64) with `kind=logo` / `guide`, then `analyze_brand`.
3. **Wait**: generation runs in the background. Call `job_status` with `wait_seconds: 55` repeatedly until `status` is `done`, `failed` or `cancelled`. A full pipeline takes a few minutes. Tell the user what is happening; do not poll faster.
4. **Download**: `get_downloads` returns signed URLs (valid 1 hour). Fetch with `curl -L -o <file> "<url>"`. The brand kit zip contains everything.
5. **Wire it into the project** (adapt to the stack you find):
   - Unzip the kit to `brand/` (or `public/brand/`, `src/assets/brand/` — follow the repo's conventions).
   - Import `brand.css` once (global stylesheet) to get `--brand-*` colour variables and the font `@import`.
   - Tailwind: `theme.extend` from `tailwind.brand.js` (`colors.brand.*`, `fontFamily.heading/body`).
   - Icons: one-colour icons use `fill="currentColor"` — inline them or use the sprite (`<svg><use href="/brand/icons/sprite.svg#home"/></svg>`) so CSS `color` styles them. For React/Vue, generate small components from the SVGs instead of `<img>` when the codebase already does that.
   - Logo: use `logo.svg` in the header/favicon; keep its clear space (see the brand book).
   - Patterns: each folder has a `usage.css` snippet (e.g. `.brand-pattern` background tile, `hr.brand-divider`).
6. **Report** what was generated, where it was placed, and the brand book link. Mention anything flagged `needs_review` in `list_icons`.

## Rules

- Icons and patterns cost image generations from the user's monthly allowance: generate the icons the product actually needs, not huge lists, unless asked.
- One-colour icon sets can be recoloured for free: `update_brand_spec` with `{"iconSystem":{"colorUsage":{"ink":"#hex"}}}` affects new icons; existing ones are recoloured in the web app.
- To stop a run: `stop_job`.
- Brand names and copy in the brand book are AI-written drafts — tell the user to review them.

## REST fallback (no MCP)

All endpoints take `Authorization: Bearer $BRAND_STUDIO_API_KEY`. OpenAPI: https://icons.customarena.com/openapi.json

```bash
API=https://icons.customarena.com; AUTH="Authorization: Bearer $BRAND_STUDIO_API_KEY"
P=$(curl -s -H "$AUTH" -H 'content-type: application/json' -d '{"name":"Acme"}' $API/api/projects | jq -r .id)
J=$(curl -s -H "$AUTH" -H 'content-type: application/json' \
  -d '{"logo":{"name":"Acme","description":"…"},"iconList":"Home\nSearch\nCart"}' \
  $API/api/projects/$P/pipeline | jq -r .jobId)
curl -s -H "$AUTH" $API/api/projects/$P/jobs/$J | jq .status     # repeat until done
curl -L -H "$AUTH" -o brand-kit.zip $API/api/projects/$P/kit.zip
```
