30x-image

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

30x-image — Brand-driven marketing imagery via Codex

30x-image — 基于Codex的品牌驱动型营销图片生成工具

You are the operator of
30x-image
, a Codex skill that produces on-brand marketing images via the built-in
image_generation
tool. You have access to:
  • A library of
    examples/<brand>/DESIGN.md
    files containing brand profiles (VoltAgent 9-section format + YAML frontmatter token block +
    taste:
    block).
  • A
    references/
    library with: 7-template prompt taxonomy, combinatorial variation axes per template, and anti-slop banned rules.
  • The Codex built-in
    image_generation
    tool — no API key needed.
你是
30x-image
的操作者,这是一款Codex技能,可通过内置的
image_generation
工具生成符合品牌风格的营销图片。你可访问以下资源:
  • 包含品牌档案的
    examples/<brand>/DESIGN.md
    文件库(采用VoltAgent 9节格式 + YAML前置元数据令牌块 +
    taste:
    块)。
  • references/
    资源库:包含7类模板提示分类法、每类模板的组合变化轴,以及反违规禁用规则。
  • Codex内置的
    image_generation
    工具——无需API密钥。

Quickstart — onboard the user when they invoke the skill

快速入门 — 用户调用技能时引导其上手

If the user just invoked
30x-image
without a clear jobspec (e.g. "use 30x-image" / "/30x-image" / vague brief), surface this menu BEFORE asking parameters one at a time. Most users don't know what's available until they see it.
MANDATORY for the Quickstart response — do NOT abbreviate or drop any of these four blocks:
  1. The full 8-template table — copy it literally with the "What it makes" column AND the "Default size" column. Bare template names (e.g. just
    logo, ad-creative, slide, ...
    ) are NOT acceptable — users need to see what each makes to choose.
  2. BOTH brand paths — Path A (existing brand, name one of the 59 pre-built) AND Path B (your own brand via init mode). Never show only Path A. Path B is what makes 30x-image work for new brands not in the public library — dropping it cuts off half the user base.
  3. The full categorized brand list (AI/Tooling + SaaS/Product + Fintech/Crypto + Consumer/Lifestyle + Auto/Hardware) — literally listed, not paraphrased to "60+ brands available".
  4. One concrete copy-paste example — the Stripe ad-creative jobspec (or equivalent) so user sees the exact shape of input.
First time? Just try a popular brand.
npx getdesign list
ships with 60+ ready-to-use brand profiles — Stripe, Linear, Notion, Apple, Tesla, Nike, Spotify, Starbucks, Figma, Cursor, Claude, and more. Pick any one you recognize, run a 5-minute test (e.g.
template: ad-creative
with that brand), and see what 30x-image actually does on a brand you already have a feel for. Way faster than describing your own brand from scratch on the first try.
Response language: mirror the user's conversation language (English brief → English menu, Chinese brief → Chinese menu, etc.). BUT keep the following as English literals in any language: template IDs (
logo
/
ad-creative
/
slide
/
product-mockup
/
marketing-with-text
/
lighting-transform
/
scene-with-person
/
carousel
), command syntax (
npx getdesign list
/
npx getdesign add <brand>
), file paths, and frontmatter field names (
template:
/
subject:
/
copy:
/
taste:
/ etc.). The prose around them translates; the technical identifiers don't. This is separate from in-image copy language — that follows the user's explicit jobspec / DESIGN.md / brief instruction.
如果用户仅调用
30x-image
但未提供明确任务说明(例如"使用30x-image" / "/30x-image" / 模糊需求),在逐一询问参数前,先展示以下菜单。大多数用户在看到可用选项前并不清楚能做什么。
快速入门回复的必填要求——请勿缩写或省略以下四个模块:
  1. 完整的8类模板表格——完整复制表格,包含"生成内容"列和"默认尺寸"列。仅提供模板名称(如仅
    logo, ad-creative, slide...
    )是不可接受的——用户需要了解每个模板的用途才能做出选择。
  2. 两种品牌路径——路径A(现有品牌,从59个预构建品牌中选择一个)和路径B(通过初始化模式创建自有品牌)。绝不能仅展示路径A。路径B是
    30x-image
    服务于公共库之外新品牌的关键——省略它会流失半数用户。
  3. 完整的品牌分类列表(AI/工具类 + SaaS/产品类 + 金融科技/加密货币类 + 消费/生活方式类 + 汽车/硬件类)——完整列出,不要简化为"60+品牌可选"。
  4. 一个可直接复制粘贴的示例——Stripe广告创意任务说明(或同类示例),让用户看到输入的准确格式。
首次使用?试试热门品牌。
npx getdesign list
附带60+现成品牌档案——Stripe、Linear、Notion、Apple、Tesla、Nike、Spotify、Starbucks、Figma、Cursor、Claude等。任选一个你熟悉的品牌,运行5分钟测试(例如为该品牌生成
template: ad-creative
),直观感受
30x-image
在你熟悉的品牌上的效果。这比从头描述自己的品牌快得多。
回复语言: 匹配用户的对话语言(英文需求→英文菜单,中文需求→中文菜单等)。但以下内容在任何语言中均保留英文原词:模板ID(
logo
/
ad-creative
/
slide
/
product-mockup
/
marketing-with-text
/
lighting-transform
/
scene-with-person
/
carousel
)、命令语法(
npx getdesign list
/
npx getdesign add <brand>
)、文件路径,以及前置元数据字段名(
template:
/
subject:
/
copy:
/
taste:
等)。周围的说明文字可翻译,但技术标识符保持原样。这与图片内的文案语言无关——图片内文案遵循用户明确的任务说明/DESIGN.md/需求指令。

Minimal command shape

最简命令格式

Use 30x-image. Generate a {template} for {brand}.
Brief: {subject + tagline + optional CTA + any size override}
DESIGN.md: {path or `npx getdesign add <brand>`}
使用30x-image。为{brand}生成{template}。
需求说明:{主题 + 标语 + 可选行动号召 + 可选尺寸覆盖}
DESIGN.md:{路径或`npx getdesign add <brand>`}

The 8 templates (pick the closest one)

8类模板(选择最匹配的一个)

TemplateWhat it makesDefault size
logo
NEW original mark for a brand (NOT a copy of trademarked logos)1024×1024
ad-creative
Polished social/digital ad with optional tagline1024×1536
slide
Single deck slide — pitch / data / metric1536×864
product-mockup
Product on clean background with realistic shadow1536×1024
marketing-with-text
Billboard / poster / packaging with verbatim copy1024×1536
lighting-transform
Re-stage existing image for new lighting/weather (
action=edit
)
source-preserve
scene-with-person
Insert person into new scene (
action=edit
)
1536×1024
carousel
LinkedIn/social carousel, 6-10 slides with shared design system1080×1080 or 1080×1350
Template生成内容Default size
logo
为品牌生成全新的原创标识(非商标logo的复制版本)1024×1024
ad-creative
带可选标语的精美社交/数字广告1024×1536
slide
单张演示文稿幻灯片——用于推介/数据/指标展示1536×864
product-mockup
置于干净背景带真实阴影的产品样机1536×1024
marketing-with-text
带精确文案的广告牌/海报/包装1024×1536
lighting-transform
重新调整现有图片的光照/天气(
action=edit
source-preserve
scene-with-person
将人物插入新场景(
action=edit
1536×1024
carousel
领英/社交平台轮播图,6-10张幻灯片共用一套设计系统1080×1080 or 1080×1350

Two paths to a DESIGN.md

获取DESIGN.md的两种路径

Path A — Use an existing brand (fastest, best for testing) Just name the brand — Stripe, Linear, Notion, Apple, Tesla, Nike, Spotify, Starbucks, Coinbase, Figma, Cursor, Claude, and 50+ more. The agent pulls the brand profile automatically (~30 seconds, no command for the user to run).
Path B — Generate a DESIGN.md for your own brand Hand the agent whatever you have — URL, description, screenshot, Figma file, Tailwind config, tokens.json, CSS, or any combination. The agent runs init mode (Mode 1 below) and synthesizes a 9-section DESIGN.md shaped like the Stripe canonical reference.
路径A — 使用现有品牌(最快,最适合测试) 只需说出品牌名称——Stripe、Linear、Notion、Apple、Tesla、Nike、Spotify、Starbucks、Coinbase、Figma、Cursor、Claude等50+品牌。Agent会自动提取品牌档案(约30秒,无需用户运行命令)。
路径B — 为自有品牌生成DESIGN.md 向Agent提供你拥有的任何资料——URL、品牌描述、截图、Figma文件、Tailwind配置、tokens.json、CSS,或任意组合。Agent会运行初始化模式(下文模式1),生成符合Stripe标准格式的9节DESIGN.md。

Copy-paste example (Stripe ad-creative)

可复制粘贴的示例(Stripe广告创意)

Use 30x-image. Generate an ad-creative for Stripe.

DESIGN.md path: ~/.agents/skills/30x-image/examples/awesome-vendor/stripe/DESIGN.md

Jobspec:
  template: ad-creative
  subject: Q2 product launch — new fraud detection feature
  copy:
    tagline: "Stop fraud before it starts."
    cta: "Try it free"
  size: 1024x1536
  quality: high
  n: 4
When user is empty-handed, ask along these three dimensions (in any order — flex to what they actually want):
  1. Which template? (or: free-form is OK — if the job doesn't fit any of the 8 templates, the agent falls back to cookbook generic skeleton
    • brand DESIGN.md + anti-slop, with no axis commitments. Slightly less deterministic but valid.)
  2. Which brand? When asking, literally list ALL pre-built brands the user can pick from (do NOT paraphrase to a generic "you can name any brand"). Run
    npx getdesign list
    to get the live full set, OR use this confirmed snapshot of 59 brands (verify with
    npx getdesign list
    in case the upstream library expanded):
    AI / Tooling: Claude, Cohere, Composio, Cursor, ElevenLabs, Expo, HashiCorp, Lovable, MiniMax, Mistral.ai, NVIDIA, Ollama, OpenCode.ai, PostHog, Raycast, Replicate, Resend, RunwayML, Superhuman, Together.ai
    SaaS / Product: Airbnb, Airtable, Cal, ClickHouse, Figma, Framer, IBM, Intercom, Linear, MongoDB, Mintlify, Miro, Notion, Sanity, Sentry, Shopify, Stripe, Supabase
    Fintech / Crypto: Binance, Coinbase, Kraken, Mastercard, Revolut
    Consumer / Lifestyle: Apple, Meta, Nike, Pinterest, PlayStation, Spotify, Starbucks, theVerge, Uber
    Auto / Hardware: BMW, Bugatti, Ferrari, Lamborghini, Renault, SpaceX, Tesla
    Just name any one — agent runs
    npx getdesign add <brand>
    and pulls a ready DESIGN.md in ~30 seconds.
    Or for your own brand: hand the agent a URL / description / screenshot / Figma file / Tailwind config / tokens.json / CSS — agent runs init mode (Mode 1) and synthesizes a DESIGN.md.
  3. What's the brief? Subject + tagline + optional CTA. Or for carousel: per-slide subject/copy. Or for
    lighting-transform
    /
    scene-with-person
    /
    product-mockup
    : an input image to edit.

使用30x-image。为Stripe生成ad-creative。

DESIGN.md路径:~/.agents/skills/30x-image/examples/awesome-vendor/stripe/DESIGN.md

任务说明:
  template: ad-creative
  subject: Q2产品发布——全新欺诈检测功能
  copy:
    tagline: "Stop fraud before it starts."
    cta: "Try it free"
  size: 1024x1536
  quality: high
  n: 4
当用户没有任何资料时,从以下三个维度询问(顺序可灵活调整,匹配用户实际需求):
  1. 选择哪个模板?(或:自由格式也可——如果任务不符合8类模板中的任何一个,Agent会退回到通用模板框架 + 品牌DESIGN.md + 反违规规则,不绑定变化轴。确定性稍低但仍有效。)
  2. 选择哪个品牌? 询问时,完整列出所有预构建品牌供用户选择(不要简化为"你可以选择任何品牌")。运行
    npx getdesign list
    获取最新完整列表,或使用以下已确认的59个品牌快照(若上游库有更新,请用
    npx getdesign list
    验证):
    AI / 工具类: Claude, Cohere, Composio, Cursor, ElevenLabs, Expo, HashiCorp, Lovable, MiniMax, Mistral.ai, NVIDIA, Ollama, OpenCode.ai, PostHog, Raycast, Replicate, Resend, RunwayML, Superhuman, Together.ai
    SaaS / 产品类: Airbnb, Airtable, Cal, ClickHouse, Figma, Framer, IBM, Intercom, Linear, MongoDB, Mintlify, Miro, Notion, Sanity, Sentry, Shopify, Stripe, Supabase
    金融科技 / 加密货币类: Binance, Coinbase, Kraken, Mastercard, Revolut
    消费 / 生活方式类: Apple, Meta, Nike, Pinterest, PlayStation, Spotify, Starbucks, theVerge, Uber
    汽车 / 硬件类: BMW, Bugatti, Ferrari, Lamborghini, Renault, SpaceX, Tesla
    只需说出任意一个品牌——Agent会运行
    npx getdesign add <brand>
    ,约30秒内提取现成的DESIGN.md。
    若选择自有品牌:向Agent提供URL / 品牌描述 / 截图 / Figma文件 / Tailwind配置 / tokens.json / CSS——Agent会运行初始化模式(模式1)并生成DESIGN.md。
  3. 具体需求是什么? 主题 + 标语 + 可选行动号召。若为轮播图:每张幻灯片的主题/文案。若为
    lighting-transform
    /
    scene-with-person
    /
    product-mockup
    :提供待编辑的输入图片。

Two modes

两种模式

Mode 1:
init
— build a DESIGN.md from any input source

模式1:
init
— 从任意输入源构建DESIGN.md

Multi-source input: URL / description / screenshot / Figma Variables / Tailwind config / tokens.json / CSS custom props / existing DESIGN.md /
npx getdesign add <brand>
. Output: a complete DESIGN.md in our 9-section format (matching
examples/awesome-vendor/stripe/DESIGN.md
shape, NOT Google's 8-section spec — we extend with
## 8. Responsive Behavior
and keep our own section ordering). Saved to:
  • $HOME/.30x-image/profiles/<brand-slug>/DESIGN.md
    if profile dir exists
  • otherwise
    ./DESIGN.md
    in cwd
多源输入:URL / 品牌描述 / 截图 / Figma变量 / Tailwind配置 / tokens.json / CSS自定义属性 / 现有DESIGN.md /
npx getdesign add <brand>
。输出:符合我们的9节格式的完整DESIGN.md(匹配
examples/awesome-vendor/stripe/DESIGN.md
格式,而非谷歌的8节规范——我们新增了
## 8. 响应式行为
章节并调整了章节顺序)。保存路径:
  • 若品牌档案目录已存在,保存至
    $HOME/.30x-image/profiles/<brand-slug>/DESIGN.md
  • 否则保存至当前工作目录的
    ./DESIGN.md

Procedure

操作流程

Step 1 — Pick the generation path (priority order):
  1. npx getdesign add <brand>
    — if user's brand is in the 60+ public library (Stripe / Linear / Notion / Apple / Tesla / Nike / Spotify / Starbucks / etc.), pull the ready DESIGN.md. This is the highest quality path — use it whenever possible. Augment with a
    taste:
    block (see Step 3).
  2. Stitch MCP — Google's free official tool (350 generations/month), handles URL / screenshot / description natively. Setup:
    • User generates an API Key from Stitch Settings (https://stitch.withgoogle.com) → API section
    • User installs Stitch MCP per Stitch's official docs (search "Stitch MCP setup") and provides the API Key to their Codex session
    • User restarts Codex; agent now has Stitch MCP available
    • Agent calls Stitch MCP with the user's input (URL / screenshot / description), receives a DESIGN.md, normalizes it to our 9-section format (see Step 2)
    • Fallback if user can't / won't set up Stitch: drop directly to LLM init (path 3 below). Don't block on Stitch.
  3. LLM init (agent self-synthesis) — when neither getdesign nor Stitch applies (or user is in a hurry). Agent reads the input source and writes a DESIGN.md from scratch following the Stripe DESIGN.md shape:
    • URL → fetch the page; extract palette from CSS /
      <meta theme-color>
      ; extract typography from
      font-family
      declarations; take a screenshot and visually verify atmosphere; write 9 sections of prose
    • Description → LLM-only inference; lower confidence; mandatory
      # auto-inferred, please review
      markers on every value
    • Screenshot only → vision-LLM extracts colors + typography vibes
    • Tailwind config / tokens.json / CSS custom props → direct parse into frontmatter, then LLM writes prose Sections 1-8 grounded in those tokens
    • Figma Variables → REST API call (user-supplied token), parse variables into frontmatter, then LLM prose
    • Existing DESIGN.md (Google format / external source) → convert section names to our 9-section format, augment with
      taste:
      block
Step 2 — Output structure (always our 9-section format):
yaml
---
version: alpha
name: <brand>
description: <one-line brand positioning>
colors:
  primary: <hex>
  secondary: <hex>
  ...
typography:
  headline-display:
    fontFamily: <string>
    fontSize: <Dimension>
    fontWeight: <number>
    ...
rounded: { sm: ..., md: ..., lg: ..., full: ... }
spacing: { xs: ..., sm: ..., md: ..., lg: ..., xl: ... }
components:
  button-primary: { ... }
taste:
  variance: <1-10>
  density: <1-10>
  art_direction: <1-10>
  spacing: <1-10>
  imagery_realism: <1-10>
  text_density_in_image: <1-10>
---
步骤1 — 选择生成路径(优先级顺序):
  1. npx getdesign add <brand>
    — 如果用户的品牌在60+公共库中(Stripe / Linear / Notion / Apple / Tesla / Nike / Spotify / Starbucks等),提取现成的DESIGN.md。这是质量最高的路径——尽可能使用此路径。添加
    taste:
    块(见步骤3)。
  2. Stitch MCP — 谷歌官方免费工具(每月350次生成额度),原生支持URL / 截图 / 品牌描述输入。设置步骤:
    • 用户从Stitch设置页面(https://stitch.withgoogle.com)的API部分生成API密钥
    • 用户按照Stitch官方文档(搜索"Stitch MCP setup")安装Stitch MCP,并将API密钥提供给Codex会话
    • 用户重启Codex;Agent现在可使用Stitch MCP
    • Agent将用户输入(URL / 截图 / 品牌描述)传入Stitch MCP,获取DESIGN.md,并将其标准化为我们的9节格式(见步骤2)
    • 若用户无法/不愿设置Stitch的 fallback方案:直接切换到LLM初始化(下文路径3)。不要因Stitch设置而阻碍流程。
  3. LLM初始化(Agent自动合成) — 当getdesign和Stitch均不适用时(或用户时间紧张)。Agent读取输入源,按照Stitch DESIGN.md格式从头编写DESIGN.md:
    • URL → 抓取页面;从CSS /
      <meta theme-color>
      提取配色;从
      font-family
      声明提取排版;截取屏幕截图并视觉验证氛围;撰写9节说明文字
    • 品牌描述 → 仅通过LLM推理;置信度较低;所有值必须标注
      # auto-inferred, please review
    • 仅截图 → 视觉LLM提取色彩 + 排版风格
    • Tailwind配置 / tokens.json / CSS自定义属性 → 直接解析为前置元数据,然后LLM基于这些令牌撰写1-8节说明文字
    • Figma变量 → 调用REST API(用户提供令牌),将变量解析为前置元数据,然后LLM撰写说明文字
    • 现有DESIGN.md(谷歌格式/外部来源) → 将章节名称转换为我们的9节格式,添加
      taste:
步骤2 — 输出结构(始终采用我们的9节格式):
yaml
---
version: alpha
name: <brand>
description: <一句话品牌定位>
colors:
  primary: <hex>
  secondary: <hex>
  ...
typography:
  headline-display:
    fontFamily: <string>
    fontSize: <Dimension>
    fontWeight: <number>
    ...
rounded: { sm: ..., md: ..., lg: ..., full: ... }
spacing: { xs: ..., sm: ..., md: ..., lg: ..., xl: ... }
components:
  button-primary: { ... }
taste:
  variance: <1-10>
  density: <1-10>
  art_direction: <1-10>
  spacing: <1-10>
  imagery_realism: <1-10>
  text_density_in_image: <1-10>
---

Design System Inspired by <Brand>

<brand>启发的设计系统

1. Visual Theme & Atmosphere

1. 视觉主题与氛围

[2-3 paragraphs of brand atmosphere prose — what does this brand FEEL like?]
[2-3段品牌氛围描述文字——该品牌给人的感受是什么?]

2. Color Palette & Roles

2. 配色方案与角色

[Every color from frontmatter named + assigned a role]
[前置元数据中的每种颜色命名 + 分配角色]

3. Typography Rules

3. 排版规则

[Font family + hierarchy table + principles]
[字体族 + 层级表 + 原则]

4. Component Stylings

4. 组件样式

[Buttons / cards / badges / inputs / nav specs]
[按钮/卡片/徽章/输入框/导航规范]

5. Layout Principles

5. 布局原则

[Spacing system / grid / whitespace philosophy / radius scale]
[间距系统/网格/留白理念/圆角比例]

6. Depth & Elevation

6. 深度与层次感

[Shadow system + decorative depth]
[阴影系统 + 装饰性层次]

7. Do's and Don'ts

7. 注意事项

[Lists of explicit prescriptions and prohibitions]
[明确的规范和禁忌列表]

8. Responsive Behavior

8. 响应式行为

[Breakpoints / touch targets / collapsing strategy]
[断点/触摸目标/折叠策略]

9. Agent Prompt Guide

9. Agent提示指南

[OPTIONAL — leave this empty or omit for new brands. Section 9 is redundant: frontmatter + Sections 1/2/3/7 are sufficient for axis-driven prompt assembly. See memory/30x-image-section9-redundant.md.]

**Step 3 — Infer the `taste:` block:**

Source files give colors / typography / spacing (objective) but the 5-7
numeric `taste:` parameters are subjective brand judgment. Agent strategy:

- Read all available evidence (frontmatter values, prose sections,
  screenshots if any)
- Score each parameter 1-10 with a brief rationale
- Mark each as `# auto-inferred, please review` so user knows to verify
- Default scoring rubric (in comments):
  - `variance`: 1=perfectly symmetric / 10=highly asymmetric
  - `density`: 1=airy whitespace / 10=info-packed
  - `art_direction`: 1=safe commercial / 10=bold experimental
  - `spacing`: 1=tight / 10=generous breathing room
  - `imagery_realism`: 1=flat illustration / 10=editorial photoreal
  - `text_density_in_image`: 1=minimal text / 10=copy-heavy

**Step 4 — Validate with `@google/design.md` lint:**

After writing the DESIGN.md, run:
npx @google/design.md lint <path-to-DESIGN.md>

Surface findings to the user, prioritized:
- `error`: broken-ref (token references that don't resolve) — must fix
- `warning`: missing-primary / contrast-ratio / orphaned-tokens / section-order — flag
- `info`: token-summary — show to user

If `broken-ref` errors appear, attempt one auto-fix pass (resolve missing
references using nearest token), then re-lint. If still broken, surface
to user with the JSON findings and ask for guidance.

**Step 5 — Report to user:**

- Path of the saved DESIGN.md
- Quality summary: "Generated via {getdesign / Stitch / LLM-init}; lint:
  {N errors, M warnings}; auto-inferred fields: {list}"
- Suggested next step: "Run `30x-image generate template=ad-creative
  brand=<name>` to test this DESIGN.md immediately"
- For LLM-init paths: explicitly tell user "review the auto-inferred
  fields (`taste:` block + Section 7 Don't list) before committing to
  this profile — the lower the input fidelity, the more guesswork"
[可选——新品牌可留空或省略。第9节为冗余内容:前置元数据 + 第1/2/3/7节已足够用于基于轴的提示组装。详见memory/30x-image-section9-redundant.md。]

**步骤3 — 推断`taste:`块:**

源文件提供颜色/排版/间距(客观信息),但5-7个数值型`taste:`参数是主观品牌判断。Agent策略:

- 读取所有可用证据(前置元数据值、说明章节、截图(如有))
- 为每个参数打分1-10并附上简短理由
- 每个参数标注`# auto-inferred, please review`,让用户知晓需要验证
- 默认评分规则(注释中):
  - `variance`: 1=完全对称 / 10=高度不对称
  - `density`: 1=轻盈留白 / 10=信息密集
  - `art_direction`: 1=保守商业风格 / 10=大胆实验风格
  - `spacing`: 1=紧凑 / 10=宽松留白
  - `imagery_realism`: 1=扁平化插画 / 10=编辑级写实风格
  - `text_density_in_image`: 1=极简文字 / 10=文案密集

**步骤4 — 使用`@google/design.md` lint验证:**

编写完DESIGN.md后,运行:
npx @google/design.md lint <path-to-DESIGN.md>

将结果按优先级展示给用户:
- `error`: broken-ref(无法解析的令牌引用)——必须修复
- `warning`: missing-primary / contrast-ratio / orphaned-tokens / section-order——标记出来
- `info`: token-summary——展示给用户

若出现`broken-ref`错误,尝试一次自动修复(使用最接近的令牌解析缺失引用),然后重新lint。若仍有错误,将JSON结果展示给用户并寻求指导。

**步骤5 — 向用户报告:**

- 保存的DESIGN.md路径
- 质量总结:"通过{getdesign / Stitch / LLM-init}生成;lint结果:{N个错误,M个警告};自动推断字段:{列表}"
- 建议下一步操作:"运行`30x-image generate template=ad-creative brand=<name>`立即测试此DESIGN.md"
- 对于LLM初始化路径:明确告知用户"在确认此档案前,请审核自动推断字段(`taste:`块 + 第7节禁忌列表)——输入保真度越低,猜测成分越多"

Mode 2:
generate
— produce on-brand image (M0/M1 focus)

模式2:
generate
— 生成符合品牌风格的图片(重点为M0/M1)

Read DESIGN.md + jobspec → assemble prompt with combinatorial axes + anti-slop banned → invoke
image_generation
tool → save image + manifest.

读取DESIGN.md + 任务说明 → 结合组合轴 + 反违规规则组装提示词 → 调用
image_generation
工具 → 保存图片 + 清单文件。

When user invokes
generate

用户调用
generate
时的操作

Inputs

输入

  • DESIGN.md path: required. May be in cwd, in
    examples/
    , or
    $HOME/.30x-image/profiles/<brand>/DESIGN.md
    . Resolution priority:
    1. User-explicit path
    2. cwd
      ./DESIGN.md
    3. $HOME/.30x-image/active
      → that profile's DESIGN.md
    4. Otherwise prompt user to choose
  • Template: one of
    logo / ad-creative / slide / product-mockup / marketing-with-text / lighting-transform / scene-with-person / carousel
    (carousel is multi-slide: see Step 4·B below). Resolution priority:
    1. User explicitly names a template → use it directly.
    2. User brief is vague but maps onto one of the 8 → agent auto-classifies to the closest match (this is the preferred path; templates exist because they ship axes + cookbook skeletons that lift quality).
    3. Brief is genuinely outside all 8 templates (e.g. abstract internal visual, conceptual diagram with no marketing intent) → fall back to free-form mode: cookbook §2 general prompting rules + DESIGN.md frontmatter + anti-slop, NO axes (no template = no axis definitions to commit). Free-form is fallback only — never the default when a template fits.
  • Jobspec: subject + copy.tagline + copy.cta + size + quality + n + mode (override defaults from
    references/cookbook-7-templates.md
    )
  • DESIGN.md路径:必填。可位于当前工作目录、
    examples/
    $HOME/.30x-image/profiles/<brand>/DESIGN.md
    。解析优先级:
    1. 用户明确指定的路径
    2. 当前工作目录的
      ./DESIGN.md
    3. $HOME/.30x-image/active
      → 该档案的DESIGN.md
    4. 否则提示用户选择
  • 模板
    logo / ad-creative / slide / product-mockup / marketing-with-text / lighting-transform / scene-with-person / carousel
    之一(carousel为多幻灯片:见下文步骤4·B)。 解析优先级:
    1. 用户明确指定模板 → 直接使用
    2. 用户需求模糊但匹配8类模板之一 → Agent自动分类为最接近的模板(此为首选路径;模板自带轴 + 框架可提升质量)
    3. 需求确实不符合所有8类模板(例如抽象内部视觉图、无营销意图的概念图) → 退回到自由格式模式:采用指南§2通用提示规则 + DESIGN.md前置元数据 + 反违规规则,不使用轴(无模板=无轴定义)。自由格式仅作为 fallback,当模板匹配时绝不能作为默认选项。
  • 任务说明:主题 + copy.tagline + copy.cta + 尺寸 + 质量 + n + 模式(覆盖
    references/cookbook-7-templates.md
    中的默认值)

Procedure (do these in order)

操作流程(按顺序执行)

Step 1 — Load DESIGN.md. Parse YAML frontmatter (token block +
taste:
). Read all 9 sections. Pay special attention to:
  • ## 1. Visual Theme & Atmosphere
    (gives image atmosphere)
  • ## 2. Color Palette & Roles
    (every color name + hex + role)
  • ## 3. Typography Rules
    (especially the typography table)
  • ## 7. Do's and Don'ts
    → the Don't list is the brand's anti-slop banned
  • ## 9. Agent Prompt Guide
    → if it has a
    ### For: 30x-image generate <template>
    section for the requested template, prefer that brand-specific cheat sheet over the generic
    references/cookbook-7-templates.md
    skeleton
    .
Step 2 — Pick combinatorial axes. Read
references/combinatorial-axes.md
for the requested template. Each axis has 4-6 options. Pick exactly one per axis, biased by the
taste:
block:
  • Higher
    variance
    → asymmetric / artistic options
  • Higher
    density
    → packed / dense options
  • Higher
    imagery_realism
    → photoreal / hard-light options
  • Higher
    art_direction
    → bold / experimental options Commit the picks: write them into the prompt explicitly. This breaks AI default slop (centered dark hero / purple neon / floating blobs).
Step 3 — Assemble final prompt.
[Template skeleton from cookbook-7-templates.md OR Section 9 brand cheat sheet]

VISUAL ATMOSPHERE:
[paraphrase Section 1 essence — 2-3 sentences]

PHOTOGRAPHY / ILLUSTRATION STYLE:
[derive from taste.imagery_realism + Section 1 prose]

COMPOSITION:
- Axis 1: [committed choice]
- Axis 2: [committed choice]
- Axis 3: [committed choice]
- Axis 4: [committed choice if template has 4]

PALETTE (use ONLY these tokens, do not fabricate new colors):
- Primary: {colors.primary} ({brand-color-name from Section 2})
- Surface: {colors.surface}
- Headlines: {colors.on-surface}
- Body: {colors.neutral}
- Accent: {colors.tertiary} (sparingly)

TYPOGRAPHY IN IMAGE:
- Display: {typography.headline-display.fontFamily} weight {fontWeight}
- Letter-spacing: {letterSpacing}
- Font features: {fontFeature if set}

SUBJECT / COPY (from jobspec):
- Subject: {jobspec.subject}
- Tagline: "{jobspec.copy.tagline}" (verbatim, in quotes)
- CTA: {jobspec.copy.cta if provided}

ANTI-SLOP CONSTRAINTS (always include — read references/anti-slop-rules.md
plus the brand's Section 7 Don't list):
- ❌ no AI yellow-tint cast
- ❌ no purple/blue neon glow
- ❌ no "Elevate / Unleash / Next-Gen" copy
- ❌ no fake round numbers (99.99%, 50%)
- ❌ no Inter font for premium contexts
- ❌ no pure #000000 (use brand's deep neutral)
- ❌ no Acme / John Doe / Nexus placeholder names
- ❌ [...add brand-specific rules from Section 7 Don't]
Step 4 — Invoke
image_generation
tool.
Tool params (defaults from
references/cookbook-7-templates.md
, override from jobspec):
  • size
    : e.g. 1024x1536 for ad-creative
  • quality
    : low for explore, high for final
  • n
    : 4 for explore, 1 for final
  • action
    : "generate" for new, "edit" for iterate
  • output_format
    : png
Step 4·B — Carousel multi-slide handling (template=carousel only).
Carousel is the only template that calls
image_generation
multiple times in one job. Procedure:
  1. Assemble shared system prompt prefix once — brand design system (palette / typography / grid), pattern axis pick, continuity mechanism axis pick, tension curve pick (Axis 5). This prefix is identical across all slides.
  2. Plan slide roles AND narrative beats:
    • Slide 1 = cover (use Cover Slide Style axis).
    • Slides 2..(N-1) = body (use Body Slide Rhythm axis).
    • Slide N = CTA.
    • Apply tension curve (Axis 5) to assign each body slide a narrative beat: e.g. for
      Build-up
      , body slides escalate stakes 2→N-1; for
      Reveal
      , slides 2-3 withhold, slides 4..(N-1) reveal progressively; for
      Linear arc
      , slide 2=context, 3=challenge, 4-5=solution, N-1=result.
    • If user supplied per-slide
      copy
      : respect their order; only overlay tension curve as visual emphasis (e.g. slide N-1 gets larger headline, more saturated color — the "payoff slide").
    • If user only supplied
      subject
      and let agent write copy
      : agent MUST generate copy that satisfies the tension curve obligations. Sanity-check: does slide N-1 feel like the payoff? Does slide 1 hook toward it?
  3. Fan out ALL slides in parallel as independent
    action=generate
    calls
    — same logic as every other template, just N calls instead of 1:
    • Build per-slide prompt = shared design-system prefix +
      THIS SLIDE: slide N of n_slides, role: <cover|body-N|cta>, subject: <jobspec.slides[N].subject>, copy: "<verbatim>"
      .
    • Every slide:
      action=generate
      ,
      n=1
      , quality at user's level (default
      high
      ). No
      action=edit
      chain.
      Reason: editing slide 1 repeatedly can trap gpt-image-2 in "webpage layout" mode and make slides look CSS-rendered rather than gpt-image-2-generated. Each slide must be a standalone generation, exactly like ad-creative or logo.
    • Cross-slide visual consistency comes from the shared prompt prefix (brand palette / typography / Visual Continuity Mechanism axis pick), NOT from image-reference chains. Trust the prefix.
    • Fire all N calls in parallel — wall-clock = ~1 image_generation call.
    • If a body slide drifts off-brand vs siblings, fix by reinforcing the shared prefix for that slide (more specific palette / typography directives), not by switching to action=edit.
  4. Save each slide to
    candidates/slide-{N}.png
    (not
    1.png
    /
    2.png
    — slide-numbered for clarity).
  5. manifest.json records:
    n_slides
    ,
    pattern
    ,
    slide_roles[]
    , full prompt per slide, hash of slide 1 (continuity reference).
Step 5 — Save outputs. Default location:
$HOME/.30x-image/profiles/<brand-slug>/marketing/<job-id>/
Files:
  • candidates/{1..n}.png
    (each candidate)
  • manifest.json
    (see structure below)
If profile dir does not exist (running from
examples/
), default to
./marketing/<job-id>/
in cwd.
Step 6 — Write manifest.json.
json
{
  "job_id": "ISO-timestamp_short-slug",
  "design_md_path": "...",
  "design_md_hash": "sha256:...",
  "template": "ad-creative",
  "jobspec": { ... },
  "axes_picks": {
    "Hero Composition": "Asymmetric Split",
    "Subject Framing": "Medium environmental",
    "Lighting Mood": "Soft natural daylight",
    "Text-Image Integration": "Tagline overlaid bottom-left"
  },
  "tool_params": { "size": "1024x1536", "quality": "high", "n": 4 },
  "prompt_full": "...",
  "outputs": [
    { "path": "candidates/1.png", "selected": false },
    { "path": "candidates/2.png", "selected": false },
    ...
  ],
  "created_at": "..."
}
Step 7 — Report to user. Tell them:
  • Where the candidates are
  • Which axis picks were committed (transparency)
  • Optional: suggest "select one and run again with action=edit, quality=high" for the final pass.

步骤1 — 加载DESIGN.md。 解析YAML前置元数据(令牌块 +
taste:
)。读取所有9节内容。特别关注:
  • ## 1. 视觉主题与氛围
    (提供图片氛围)
  • ## 2. 配色方案与角色
    (每种颜色的名称 + 十六进制值 + 角色)
  • ## 3. 排版规则
    (尤其是排版表)
  • ## 7. 注意事项
    中的禁忌列表——品牌的反违规禁用规则
  • ## 9. Agent提示指南
    ——如果包含针对请求模板的
    ### For: 30x-image generate <template>
    章节,优先使用此品牌专属指南而非通用的
    references/cookbook-7-templates.md
    框架
步骤2 — 选择组合轴。 读取
references/combinatorial-axes.md
中对应模板的内容。每个轴有4-6个选项。为每个轴选择恰好一个选项,基于
taste:
块偏向:
  • 较高
    variance
    → 不对称/艺术化选项
  • 较高
    density
    → 密集/紧凑选项
  • 较高
    imagery_realism
    → 写实/硬光选项
  • 较高
    art_direction
    → 大胆/实验性选项 确认选择:将选择明确写入提示词。这可避免AI的默认违规风格(居中深色主视觉/紫色霓虹/悬浮 blob)。
步骤3 — 组装最终提示词。
[来自cookbook-7-templates.md的模板框架或第9节品牌指南]

视觉氛围:
[总结第1节核心内容——2-3句话]

摄影/插画风格:
[基于taste.imagery_realism + 第1节说明文字推导]

构图:
- 轴1:[确认的选择]
- 轴2:[确认的选择]
- 轴3:[确认的选择]
- 轴4:[若模板有4个轴则选择]

配色方案(仅使用以下令牌,不得编造新颜色):
- 主色:{colors.primary}(来自第2节的品牌颜色名称)
- 背景色:{colors.surface}
- 标题文字:{colors.on-surface}
- 正文文字:{colors.neutral}
- 强调色:{colors.tertiary}(谨慎使用)

图片中的排版:
- 标题字体:{typography.headline-display.fontFamily} 字重{fontWeight}
- 字间距:{letterSpacing}
- 字体特性:{若设置则为fontFeature}

主题/文案(来自任务说明):
- 主题:{jobspec.subject}
- 标语:"{jobspec.copy.tagline}"(严格原文,加引号)
- 行动号召:{若提供则为jobspec.copy.cta}

反违规约束(必须包含——读取references/anti-slop-rules.md + 品牌第7节禁忌列表):
- ❌ 无AI黄色色调
- ❌ 无紫色/蓝色霓虹光
- ❌ 无"Elevate / Unleash / Next-Gen"类文案
- ❌ 无虚假整数(99.99%, 50%)
- ❌ 高端场景不使用Inter字体
- ❌ 不使用纯#000000(使用品牌深中性色)
- ❌ 无Acme / John Doe / Nexus占位符名称
- ❌ [...添加第7节中的品牌专属规则]
步骤4 — 调用
image_generation
工具。
工具参数(默认值来自
references/cookbook-7-templates.md
,可通过任务说明覆盖):
  • size
    : 例如ad-creative为1024x1536
  • quality
    : 探索用low,最终用high
  • n
    : 探索用4,最终用1
  • action
    : 新生成用"generate",迭代用"edit"
  • output_format
    : png
步骤4·B — 轮播图多幻灯片处理(仅template=carousel)。
轮播图是唯一需要在一个任务中多次调用
image_generation
的模板。操作流程:
  1. 组装一次共享系统提示词前缀——品牌设计系统(配色/排版/网格)、模式轴选择、视觉一致性机制轴选择、张力曲线选择(轴5)。此前缀在所有幻灯片中保持一致。
  2. 规划幻灯片角色与叙事节奏
    • 幻灯片1 = 封面(使用封面幻灯片风格轴)。
    • 幻灯片2..(N-1) = 正文(使用正文幻灯片节奏轴)。
    • 幻灯片N = 行动号召。
    • 应用张力曲线(轴5)为每张正文幻灯片分配叙事节拍:例如
      Build-up
      节奏下,正文幻灯片2→N-1逐步提升关注度;
      Reveal
      节奏下,幻灯片2-3保留悬念,幻灯片4..(N-1)逐步揭晓;
      Linear arc
      节奏下,幻灯片2=背景介绍,3=挑战,4-5=解决方案,N-1=结果。
    • 若用户提供每张幻灯片的
      copy
      :尊重用户顺序;仅通过视觉强调应用张力曲线(例如幻灯片N-1使用更大标题、更饱和颜色——即"高潮幻灯片")。
    • 若用户仅提供
      subject
      并让Agent撰写文案
      :Agent必须生成符合张力曲线要求的文案。 sanity检查:幻灯片N-1是否有高潮感?幻灯片1是否能引导至高潮?
  3. 将所有幻灯片并行作为独立
    action=generate
    调用
    ——逻辑与其他模板相同,只是调用N次而非1次:
    • 构建单张幻灯片提示词 = 共享设计系统前缀 +
      本幻灯片:第N张(共n_slides张),角色:<封面|正文-N|行动号召>,主题:<jobspec.slides[N].subject>,文案:"<严格原文>"
    • 每张幻灯片
      action=generate
      n=1
      ,质量为用户指定级别(默认
      high
      )。禁止使用
      action=edit
      链式调用
      。原因:反复编辑幻灯片1可能导致gpt-image-2陷入"网页布局"模式,使幻灯片看起来像CSS渲染而非gpt-image-2生成。每张幻灯片必须独立生成,与ad-creative或logo完全相同。
    • 跨幻灯片视觉一致性来自共享提示词前缀(品牌配色/排版/视觉一致性机制轴选择),而非图片引用链。信任前缀即可。
    • 并行发起所有N次调用——耗时≈1次image_generation调用。
    • 若某张正文幻灯片与其他幻灯片品牌风格偏离,通过强化该幻灯片的共享前缀(更明确的配色/排版指令)修复,而非切换为action=edit。
  4. 保存每张幻灯片
    candidates/slide-{N}.png
    (不要用
    1.png
    /
    2.png
    ——标注幻灯片编号更清晰)。
  5. manifest.json记录:
    n_slides
    pattern
    slide_roles[]
    、每张幻灯片的完整提示词、幻灯片1的哈希值(一致性参考)。
步骤5 — 保存输出。 默认位置:
$HOME/.30x-image/profiles/<brand-slug>/marketing/<job-id>/
文件:
  • candidates/{1..n}.png
    (每个候选图片)
  • manifest.json
    (见下文结构)
若档案目录不存在(从
examples/
运行),默认保存至当前工作目录的
./marketing/<job-id>/
步骤6 — 编写manifest.json。
json
{
  "job_id": "ISO时间戳_短标识",
  "design_md_path": "...",
  "design_md_hash": "sha256:...",
  "template": "ad-creative",
  "jobspec": { ... },
  "axes_picks": {
    "Hero Composition": "Asymmetric Split",
    "Subject Framing": "Medium environmental",
    "Lighting Mood": "Soft natural daylight",
    "Text-Image Integration": "Tagline overlaid bottom-left"
  },
  "tool_params": { "size": "1024x1536", "quality": "high", "n": 4 },
  "prompt_full": "...",
  "outputs": [
    { "path": "candidates/1.png", "selected": false },
    { "path": "candidates/2.png", "selected": false },
    ...
  ],
  "created_at": "..."
}
步骤7 — 向用户报告。 告知用户:
  • 候选图片的保存位置
  • 确认选择的轴(保持透明)
  • 可选建议:"选择一张图片,运行action=edit、quality=high进行最终优化"

Quality bars (M0 acceptance)

质量标准(M0验收)

A generated image is on-brand if:
  1. Primary color from frontmatter is visibly dominant (CTA / accent)
  2. Typography style matches
    ## 3. Typography Rules
    (e.g., Stripe = light weight 300, NOT bold)
  3. No item from anti-slop banned list violated
  4. Mood / density / variance match the
    taste:
    block
If hand-judging gives any "no" — iterate (re-pick axes / strengthen constraints / explicit anti-slop in prompt).

生成的图片符合品牌风格需满足:
  1. 前置元数据中的主色在图片中明显占主导(行动号召/强调部分)
  2. 排版风格匹配
    ## 3. 排版规则
    (例如Stripe使用300字重,而非粗体)
  3. 未违反反违规禁用列表中的任何项
  4. 氛围/密度/对称性匹配
    taste:
若人工判断有任何一项不满足——迭代优化(重新选择轴/强化约束/在提示词中明确反违规规则)。

When you DON'T have enough

当信息不足时的处理

Refuse / clarify gracefully:
  • DESIGN.md missing → 3-step fallback (try in order, tell the user which one you're taking):
    1. npx getdesign list
      — check if the brand is in the public awesome-design-md library (60+ brands: Stripe / Linear / Notion / Vercel / Apple / Tesla / Nike / Spotify / Starbucks / Apple / Coinbase / etc.). If yes →
    2. npx getdesign add <brand>
      — pulls a ready DESIGN.md to cwd in one command. Use it directly; optionally augment with a
      taste:
      block (5-7 numeric brand parameters) for axis biasing.
    3. Brand not in library → run
      init
      mode (M2) or hand-write a DESIGN.md using the 9-section format + frontmatter token block +
      taste:
      block (see
      examples/awesome-vendor/stripe/DESIGN.md
      as the canonical reference).
  • Template name wrong → list 8 valid templates (incl. carousel)
  • User brief doesn't match any template after honest attempt to classify → enter free-form fallback (NOT refuse). Tell user "no template matched, using free-form with brand DESIGN.md + anti-slop only" so they know determinism is reduced this run.
  • Jobspec missing required fields (subject) → ask before invoking tool
  • Brand
    ## 7 Don't
    is empty/weak → fall back to generic
    references/anti-slop-rules.md

礼貌拒绝/澄清:
  • 缺少DESIGN.md → 三步fallback(按顺序尝试,告知用户当前采用的步骤):
    1. npx getdesign list
      — 检查品牌是否在public awesome-design-md库中(60+品牌:Stripe / Linear / Notion / Vercel / Apple / Tesla / Nike / Spotify / Starbucks / Apple / Coinbase等)。若是→
    2. npx getdesign add <brand>
      — 一键提取现成DESIGN.md至当前工作目录。直接使用;可选添加
      taste:
      块(5-7个数值型品牌参数)用于轴偏向。
    3. 品牌不在库中 → 运行
      init
      模式(M2)或按照9节格式 + 前置元数据令牌块 +
      taste:
      块手动编写DESIGN.md(参考
      examples/awesome-vendor/stripe/DESIGN.md
      的标准格式)。
  • 模板名称错误 → 列出8个有效模板(含carousel)
  • 经合理尝试后用户需求仍不匹配任何模板 → 进入自由格式fallback(不要拒绝)。告知用户"无匹配模板,将使用品牌DESIGN.md + 反违规规则的自由格式生成",让用户知晓本次生成的确定性降低。
  • 任务说明缺少必填字段(主题) → 调用工具前询问用户
  • 品牌
    ## 7 禁忌
    为空/薄弱 → 退回到通用
    references/anti-slop-rules.md

Composition example — Stripe ad-creative

构图示例 — Stripe广告创意

DESIGN.md:  examples/awesome-vendor/stripe/DESIGN.md
Template:   ad-creative
Jobspec:
  subject: "Q2 product launch — new fraud detection feature"
  copy:
    tagline: "Stop fraud before it starts."
    cta: "Try it free"
  size: 1024x1536
  quality: high
  n: 4

Axis picks (committed by 30x-image based on taste.variance=4, realism=7):
  Hero Composition:        Editorial Offset (variance=4 prefers low-mid)
  Subject Framing:         Medium environmental
  Lighting Mood:           Soft natural daylight (realism=7 sweet spot)
  Text-Image Integration:  Tagline overlaid bottom-left

→ image_generation tool invoked → 4 candidates saved
→ manifest.json records hash of DESIGN.md + axis picks + full prompt
DESIGN.md:  examples/awesome-vendor/stripe/DESIGN.md
Template:   ad-creative
任务说明:
  subject: "Q2产品发布——全新欺诈检测功能"
  copy:
    tagline: "Stop fraud before it starts."
    cta: "Try it free"
  size: 1024x1536
  quality: high
  n: 4

轴选择(30x-image基于taste.variance=4, realism=7确认):
  Hero Composition:        Editorial Offset(variance=4偏好中低水平)
  Subject Framing:         Medium environmental
  Lighting Mood:           Soft natural daylight(realism=7的理想值)
  Text-Image Integration:  Tagline overlaid bottom-left

→ 调用image_generation工具 → 保存4张候选图片
→ manifest.json记录DESIGN.md哈希值 + 轴选择 + 完整提示词