build-data
Build a feature's data/ layer — values, components, resources, entities. The first, foundational phase.
来源信息
- 仓库
- adobe/data
- 最近来源活动
- 2026年11月6日 20:26
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 13
- Forks
- 8
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- build-data
- description
- Build a feature's data/ layer — values, components, resources, entities. The first, foundational phase.
- input
- feature
- output
- feature
Legacy feature (has `data/state/` or `services/main-service/`)? Extend it in place per the legacy rules; don't migrate unless asked.
Create the feature's `data/` layer: pure Data declarations, depending only on
`@adobe/data` and the `data/` of features this one builds on.
- `values/<type>/` — one TypeSpace per Data type: a hand-written type, a schema pinned
to it (`type _Pin = Assert<Equal<Schema.ToType<typeof schema>, <Type>>>`) when
something needs one, and pure helpers, each with a test.
- `components/<name>.ts` — one schema per file, scope spread from `Scope`, plus an
`index.ts` barrel. Include implementation-only columns (tags, drag offsets).
- `resources/<name>.ts` — one schema per file, `satisfies ResourceSchema`, plus a barrel.
- `entities/<entity>.ts` — the spec-visible entity as a component-name tuple, with its
type derived by `Database.EntityType`, plus a barrel.
Create only the folders the feature needs. Gate: it compiles and the helper tests
pass.
The how is in the auto-loading `features/data/` rules and `global/typespace.md`.
在 GitHub 查看