ad-creative-templates

Installation
SKILL.md

ad-creative-templates

Pixel-perfect, text-precise, on-brand ad creatives at scale by rendering HTML/CSS templates to PNG with a headless browser. One template + a row of data → dozens of on-brand versions, every character correct, every hex exact. This is the text/UI/logo-heavy half of ad creative; the photoreal-scene half is ad-creative-generation.

1. Template vs AI-gen — decide per creative

  • Template it when the creative is text-, UI-, logo-, or data-heavy: exact headlines, a real logo, star ratings, review cards, feature pills, iMessage/chat bubbles, dashboards, pricing tables, precise brand color, or 50 data-driven variants. The DOM renders these correctly, every time — an AI image model garbles them (see ad-creative-generation §4).
  • AI-gen it when the creative is a photoreal scene / lifestyle / product-in-context / mood backdrop with little or no exact text. See ad-creative-generation.
  • Combine when useful: AI-gen the photoreal backdrop, then lay the exact HTML text/logo/card on top (as a CSS background-image, composited before screenshot).

The test: does correctness of text, a logo, a rating, or UI matter? → template.

2. The pipeline

  1. One HTML/CSS template per style, parameterized by data (a headline, a quote, a name, a price, an image URL, brand tokens). Handlebars/JSX/plain template literals — anything that fills slots.
  2. A data source — a row per creative (CSV/JSON/sheet). N rows = N creatives, no design tool.
  3. Render headless — Playwright or Puppeteer loads the template at a fixed viewport, waits for fonts/images, screenshots the element (or full page) to PNG.
  4. Sizes as viewports, not resizes — render each size natively (§4).
  5. Name + store deterministically, same as any creative batch (style__size__vNN.png).
Installs
1
GitHub Stars
1
First Seen
Nov 15, 2026