<< All versions

Skill v1.0.0

currentAutomated scan100/100
focus-creative-games/luban/luban-schema-design
──Details
PublishedOctober 16, 2026 at 03:31 PM
Content Hashsha256:01211394e0dd05c3...
Git SHA661cc9d71d21
──Files
Files (1 file, 1.2 KB)
SKILL.md1.2 KBactive
SKILL.md · 41 lines · 1.2 KB

version: "1.0.0" name: luban-schema-design description: Designs Luban schema (beans, enums, polymorphism, collections, groups). Use when modeling config structures, inheritance, nested beans, or choosing Excel vs XML schema.


Luban: Schema 设计

原则

  • 程序维护 Schema;策划填 Data。
  • 复杂 GamePlay(技能/行为树)优先 OOP 继承/多态,而不是塞字符串。
  • 客户端敏感字段用 s group,不要泄漏到 c。

选型

需求建议
扁平行表Excel + read_schema_from_file
多模块/复用 beanXML Defines/*.xml 或 __beans__
多态配置抽象 bean + 子类;Excel 填类型名/别名
一对多嵌套list,Bean / 多行 / sep 紧凑格式

类型要点

  • 容器:list,T / map,K,V;元素不可写 `list,int?`
  • 可空:T?;多态非空必须给具体子类
  • 引用:int#ref=module.TbX
  • 字段名建议 snake_case,生成时按语言转风格

检查清单

  1. 主键与 mode(map/list/one)是否匹配
  2. group 是否覆盖 client/server 需求
  3. 多态子类是否都已定义且可区分
  4. 用 -c schema-json 或 MCP GetSchema 复核结构

参考

  • 类型系统、XML Schema、多态、分组 targets
All versions