brand-init
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrand 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 (), not
ephemeral chat output. Full spec: .
brand.yaml../../references/brand-package-spec.md你将为品牌建立持久层:一个存储在磁盘上的结构化包,其他所有品牌技能都会先读取该包并写入内容。品牌将成为一个可查询的工件(),而非临时的对话输出。完整规范:。
brand.yaml../../references/brand-package-spec.mdWhen to run
运行时机
- Starting any new brand and no package exists yet (no in
brand.yaml,./, or./brand/).brands/<slug>/ - Migrating a legacy into a proper package.
.agents/brand-context.md
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:
- — in-situ, you're branding the current project (default)
./brand/ - — portfolio mode, you manage several brands
brands/<slug>/ - — the brand belongs to a product repo
<product>/brand/
- 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 relative to
this skill's directory:
scripts/brand.shbash
undefined运行内置的无依赖脚本,该脚本位于此技能目录下的:
scripts/brand.shbash
undefinedIn 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
--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参数
--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 to capture the brand
DNA into , then / / etc. — each writes into this package and
flips its flag in .
brand-contextcontext.mdnamingbrand-strategybrand.yaml告知用户包已创建,并说明后续步骤:运行****将品牌核心信息存入,之后可进行/等操作——每个操作都会写入此包,并更新中的对应标记。
brand-contextcontext.md命名品牌策略brand.yamlQuerying the portfolio
查询品牌组合
bash
undefinedbash
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 (git-tracked, shareable), not an LLM's per-machine memory.
registry.yaml - Don't pre-create empty section files. Only +
brand.yamlat init; each skill creates its ownassets/when it runs.*.md - Never overwrite an existing package. The script refuses; respect that.
- 注册表是SSOT文件,绝不能依赖Agent内存。品牌位置+一句话简介属于数据→应存储在中(受Git追踪、可共享),而非LLM的单机器内存。
registry.yaml - 请勿预先创建空的章节文件。初始化时仅创建+
brand.yaml;每个技能运行时会自行创建对应的assets/文件。*.md - 绝不能覆盖已存在的包。脚本会拒绝覆盖操作,请遵守此规则。