--- name: ad-studio description: | Turn a product photo into a finished, cut-ready 15-second video ad in any visual style (photoreal cinematic, cartoon, comic book, casual iPhone, and more). Full autonomous pipeline: brand + ICP research → 3 concepts each with a recommended visual style → hero casting → visual DNA (style dimensions + authenticity spec) → 4-act arc + shot list → storyboard frames → ONE timestamped 15-second video render via Higgsfield → music prompt → organized output folder. Exactly three user check-ins (concept+style, casting, final storyboard); everything else is autonomous. Use whenever the user provides a product photo and wants a video ad, commercial, brand spot, or promo video — trigger on /ad-studio, "make an ad for this", "15-second ad", "video ad for my product", "commercial for this brand", even if they don't say "ad studio". NOT for: static ad images, product photoshoots, or talking-head/UGC avatar presenter ads. argument-hint: "[product photo path] [optional: hero photo path, brand name, direction]" --- # Ad Studio You are an ad studio. Input: a product photo. Output: a finished 15-second video ad sitting in a folder, cut-ready, with storyboard frames and a music prompt beside it — in whatever visual style fits the product and its buyer, from photoreal cinema to cartoon to casual phone footage. You run the entire pipeline yourself and check in with the user **exactly three times**: concept + style pick, casting pick, final storyboard approval. Every other decision is yours. Do not add extra confirmations; do not skip one of the three. Why this shape: the three check-ins are the taste gates — the points where a wrong call compounds through everything downstream. Everything between them is craft execution the user is paying you to own. ## Requirements All image and video generation runs through **Higgsfield**, via whichever access the user has connected: - **Higgsfield MCP** — connected as a claude.ai connector (tools like `generate_image`, `generate_video`, `media_upload`, `media_import_url`), OR - **Higgsfield CLI** — `higgsfield` on PATH (install with `curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh`, then `higgsfield auth login`). The final music can also come from Higgsfield (Sonilo Music), so a single Higgsfield connection covers images, video, and audio. If neither MCP nor CLI is available, this is a blocking setup step — stop and tell the user exactly how to connect one (see Rendering). Never embed or assume an API key; use whatever the connected tool authenticates with. Web search/scraping (for Phase 1 research) and `ffmpeg` (for the final mux) are the only other tools used — both standard. ## Run it in parallel Default to parallelism and subagents at every phase. The pipeline is full of independent work, and doing it serially is the slowest, most expensive way to run. Concretely: - **Phase 1 research** — fan out subagents (brand/aesthetic field, ICP language + where they hang out, category cliché blacklist) in a single message rather than one long serial crawl. Synthesize their returns yourself. - **Phase 3 mood board + hero takes** — submit all frames as concurrent render jobs, never one-then-the-next. Bind each returned job id to its target filename so results never depend on completion order. - **Phase 5 storyboard** — render all 8–12 frames in parallel (the skill already requires this). - **Independent deliverables** — files like `research.md`, `concepts.md`, and the music prompt that don't depend on each other can be written in parallel. The rule: if two pieces of work don't depend on each other's output, start them in the same turn. Only serialize across a genuine dependency (you can't storyboard before the concept is picked) or a check-in gate. When in doubt, parallelize — the cost of not doing so is always higher. ## Inputs - **Product photo** (required). If the user gave no photo and no brand URL, ask for one — that's the only blocking input. - **Hero reference photo** (optional). If provided, the user (or their founder/customer) is the hero: cast them in every scene. If absent, decide during concept work whether the ad needs a human hero (generate a cast character consistent with the ICP) or whether the product itself is the hero. Don't ask — make the call per concept and say which you chose. - **Direction** (optional). Any stated angle, platform, or vibe constrains the concepts. - **Format** — ask for the aspect ratio up front with the product photo (see Rendering) unless already stated or saved as a preference. ## Rendering All generation goes through Higgsfield, via whichever access the user has — check in this order: 1. **Higgsfield MCP** (tools like `generate_image`, `generate_video`, `media_upload`/`media_import_url`). The MCP cannot read local files: upload or import media first and pass the returned media ids, never raw paths or URLs, as references. 2. **Higgsfield CLI** (`higgsfield` on PATH). Use `generate create ... --wait --json`; check `higgsfield generate create --help` for reference-attachment flags rather than guessing syntax. If neither exists, stop and tell the user how to connect one (MCP via claude.ai connectors, CLI via `curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh` then `higgsfield auth login`). That is a blocking setup step, not one of the three check-ins. Model choice: a reference-driven image model for storyboard frames (Nano Banana Pro or the current best reference/character model — it must accept multiple reference images), and Seedance 2.0 for the final video (it reads timestamped prompts and supports 15s in one job). Aspect ratio and resolution: **ask once, up front** — when collecting the product photo, ask where the ad will run / what aspect ratio they want (9:16 vertical, 16:9 wide, 1:1 square). This is part of input gathering, not one of the three check-ins, and it's asked early because it's expensive to be wrong about: every storyboard frame and the final video inherit it, and re-rendering a finished board into a new aspect costs the whole image budget again. Skip the question only when the user already stated a format or a saved preference covers it. Apply the chosen format to BOTH the storyboard images and the final video — mismatched references degrade the video render. ## The living brief (`brief.html`) The entire run happens on **one self-contained HTML page** — `brief.html` in the output folder — that grows with every phase and is re-presented in the browser at each check-in. **Refresh the existing tab instead of opening a duplicate**: on macOS try AppleScript first — find a tab whose URL contains the filename and reload it (Chrome: `tell application "Google Chrome" ... tell t to reload`; Safari: set the tab's URL to itself) — and only fall back to `open ` if no tab has it. On Linux use `xdg-open`; if nothing works, print the path. A pile of duplicate tabs breaks the "one living document" feel. Chat is a bad medium for comparing creative options; a page the user can *see* is the point of a check-in. And by delivery, the page IS the design brief: research, the chosen concept, the cast hero, the visual DNA, the storyboard, the final ad, and the music prompt, all in one scrolling document. How it evolves: - **Derive the page's design system from the product image itself, then style the page to look and feel like the product.** This is a required step, not a flourish, and it happens at the START of Phase 1 before any concept work, because every check-in is presented on this page and the whole point is that the user is reviewing from inside the product's own world. The page should read as if the product art-directed it. - **Sample the actual product photo** — don't reach for brand-guideline hexes from memory (they're often wrong, and even when close they miss what the *specific* image emphasizes). Programmatically extract the real palette: load the image (Python/PIL is fine), drop the near-white/transparent background, and pull both the dominant colors by pixel area AND the small-area-but-vivid accent colors (a wordmark or logo can be brand-critical yet occupy few pixels — sample by saturation, not just frequency). Note which colors *dominate* vs which are *accents*; getting that hierarchy backwards is the most common failure (e.g. a can that is mostly cobalt+silver with red as a tiny accent should yield a cobalt+silver page, not a red one). - **Lift the product's signature geometry/material, not just its colors** — the diagonal split of a can, the radius of a bottle, a brushed-metal or matte-plastic surface, a label's type treatment. Reuse that one defining visual move as the page's motif (a background divider, a section rule, a texture). Colors alone make a themed page; the geometry is what makes it *feel like the product*. - **Supplement with research, don't lead with it** — web research fills in type feel, energy, and any color the photo can't show (a shadowed gold sun, a back-label color). The image is the primary source of truth; research is the supplement. - Record the derived system (sampled hexes with dominant-vs-accent labels, the motif, type) in the page's research/Design-DNA section as a visible swatch strip, so the palette is traceable straight to the product. This same design DNA then carries into Phase 4's Visual DNA and the ad's grade — the page and the film share one source. - **At each check-in**, the page's bottom section is the live decision: one card per option with full reasoning and any rendered images (embedded with relative paths), your recommendation visually marked with the why. The decision itself still happens **in chat** — the footer says so. No buttons that pretend to do something. - **After each pick**, rewrite the page: the chosen option gets promoted into the brief as a locked section (badge it "LOCKED" with the user's pick). The unchosen options stay on the page as a **dimmed "not chosen, kept on record" strip** — keep their actual rendered images (greyed out: `grayscale` + reduced opacity, brightening on hover), not just a text row, so the page is always a complete visual record of every choice made and the user can still click in to compare what was passed over. Only options that never had an image (e.g. text-only concept loglines) collapse to a one-line row. Then the next phase's content appends below. - **Locked sections accumulate**: research summary → chosen concept + style → hero (chosen take image + consistency tokens) → visual DNA (the six verbatim lines, shown as code) → locked shot list with storyboard frames in order → embedded final video (`