brand-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Brand Init

品牌初始化

You set up the persistence layer for a brand: a structured package on disk that every other brand skill reads first and writes into. A brand becomes a queryable artifact (
brand.yaml
), not ephemeral chat output. Full spec:
../../references/brand-package-spec.md
.
你将为品牌建立持久层:一个存储在磁盘上的结构化包,其他所有品牌技能都会先读取该包并写入内容。品牌将成为一个可查询的工件(
brand.yaml
),而非临时的对话输出。完整规范:
../../references/brand-package-spec.md

When to run

运行时机

  • Starting any new brand and no package exists yet (no
    brand.yaml
    in
    ./
    ,
    ./brand/
    , or
    brands/<slug>/
    ).
  • Migrating a legacy
    .agents/brand-context.md
    into a proper package.
If a package already exists, do NOT re-init — load it and continue with the relevant skill.
  • 启动任何新品牌且尚未存在包时(当前目录、
    ./brand/
    brands/<slug>/
    中无
    brand.yaml
    文件)。
  • 将旧版
    .agents/brand-context.md
    迁移为标准包时。
若包已存在,请勿重新初始化——直接加载并使用相关技能继续操作。

Steps

步骤

1. Establish the essentials

1. 确定核心信息

Ask only for what you need to scaffold (the deep capture happens in
brand-context
):
  • Brand name (required)
  • One-liner — one sentence on what it is (the recall headline). If unknown yet, leave blank.
  • Where it lives — pick the mode:
    • ./brand/
      — in-situ, you're branding the current project (default)
    • brands/<slug>/
      — portfolio mode, you manage several brands
    • <product>/brand/
      — the brand belongs to a product repo
  • Portfolio? — if managing multiple brands, register this one in
    brands/registry.yaml
    .
仅询问搭建所需的必要信息(深入信息采集将在
brand-context
中进行):
  • 品牌名称(必填)
  • 一句话简介——用一句话描述品牌(便于记忆的标题)。若暂不明确,可留空。
  • 存储位置——选择模式:
    • ./brand/
      ——原位模式,为当前项目打造品牌(默认)
    • brands/<slug>/
      ——组合模式,管理多个品牌
    • <product>/brand/
      ——品牌属于某个产品仓库
  • 是否加入组合?——若管理多个品牌,将此品牌注册到
    brands/registry.yaml
    中。

2. Scaffold the package

2. 搭建包结构

Run the bundled script (dependency-free). It lives at
scripts/brand.sh
relative to this skill's directory:
bash
undefined
运行内置的无依赖脚本,该脚本位于此技能目录下的
scripts/brand.sh
bash
undefined

In Claude Code, ${CLAUDE_SKILL_DIR} expands to this skill's directory. In other

在Claude Code中,${CLAUDE_SKILL_DIR}会展开为此技能的目录。在其他Agent中,请根据加载此SKILL.md的位置解析scripts/brand.sh的路径。

agents, resolve scripts/brand.sh relative to where this SKILL.md was loaded.

bash ${CLAUDE_SKILL_DIR}/scripts/brand.sh init
--name "Acme" --one-liner "…" --out brand --date "$(date +%F)"
--register brands/registry.yaml # omit --register for a single in-situ brand

This creates `<out>/brand.yaml` + `<out>/assets/` and (if `--register`) upserts the registry.
**Pass `--date` explicitly** when you want a reproducible run.
bash ${CLAUDE_SKILL_DIR}/scripts/brand.sh init
--name "Acme" --one-liner "…" --out brand --date "$(date +%F)"
--register brands/registry.yaml # 单个原位品牌无需添加--register参数

此命令会创建`<out>/brand.yaml` + `<out>/assets/`,若使用`--register`参数,还会更新注册表。**如需可复现的运行结果,请显式传入`--date`参数**。

3. Hand off

3. 交接说明

Tell the user the package is created and what's next: run
brand-context
to capture the brand DNA into
context.md
, then
naming
/
brand-strategy
/ etc. — each writes into this package and flips its flag in
brand.yaml
.
告知用户包已创建,并说明后续步骤:运行**
brand-context
**将品牌核心信息存入
context.md
,之后可进行
命名
/
品牌策略
等操作——每个操作都会写入此包,并更新
brand.yaml
中的对应标记。

Querying the portfolio

查询品牌组合

bash
undefined
bash
undefined

${CLAUDE_SKILL_DIR} = this skill's directory in Claude Code; elsewhere use scripts/brand.sh

${CLAUDE_SKILL_DIR} = Claude Code中此技能的目录;在其他环境中,请根据加载此SKILL.md的位置使用相对路径调用scripts/brand.sh

relative to where this SKILL.md was loaded.

bash ${CLAUDE_SKILL_DIR}/scripts/brand.sh list --registry brands/registry.yaml
bash ${CLAUDE_SKILL_DIR}/scripts/brand.sh list --registry brands/registry.yaml

slug · name · one-liner · path · [status]

slug · 名称 · 一句话简介 · 路径 · [状态]


Use this to answer "what brands do we have / where do they live / what's the one-liner" without
opening each package.

使用此命令可回答“我们有哪些品牌/它们存储在哪里/一句话简介是什么”等问题,无需逐个打开包文件。

Rules

规则

  • The registry is a SSOT file, never agent memory. Brand locations + one-liners are data → they belong in
    registry.yaml
    (git-tracked, shareable), not an LLM's per-machine memory.
  • Don't pre-create empty section files. Only
    brand.yaml
    +
    assets/
    at init; each skill creates its own
    *.md
    when it runs.
  • Never overwrite an existing package. The script refuses; respect that.
  • 注册表是SSOT文件,绝不能依赖Agent内存。品牌位置+一句话简介属于数据→应存储在
    registry.yaml
    中(受Git追踪、可共享),而非LLM的单机器内存。
  • 请勿预先创建空的章节文件。初始化时仅创建
    brand.yaml
    +
    assets/
    ;每个技能运行时会自行创建对应的
    *.md
    文件。
  • 绝不能覆盖已存在的包。脚本会拒绝覆盖操作,请遵守此规则。