msw-behaviourtree
БесплатноЗапускает вложенные скриптыНе проверенAuthors MSW `.behaviourtree` files end-to-end and maintains the project-specific authoring spec (`.behaviourDocs/bt-spec.md`). Scans every `.codeblock` whose…
от MSW-Git★ 38 звёзд на GitHubОб этом скилле
MSW BehaviourTree
End-to-end authoring skill for MSW .behaviourtree files — the default way to give an AIComponent a behaviour tree. Owns both the project-specific authoring spec (<ProjectRoot>/.behaviourDocs/bt-spec.md) and the tree generation itself. Fixed graph rules and skeletons live in this skill's references/; the per-project spec is (re)built by this skill's local scripts/build-spec.cjs.
🚦 Execution order (follow this sequence)
0. Build / refresh the project spec (bt-spec.md)
The spec is the source of truth for every project-specific data point: each custom action/decorator/composite node's definitionId, btNodeType, visible propertyKey names, and the serialized Type.type strings stamped to this project's CoreVersion.
When to (re)build:
- First time working on BT in a project (no
.behaviourDocs/bt-spec.mdyet). - After any change that affects BT node surface area:
- new / renamed / removed
.codeblockwhose paired.mluaextendsActionNode/DecoratorNode/CompositeNode - added / removed / renamed
propertylines in such a.mlua Environment/configCoreVersionbumped (the serialized type strings are version-tagged).
- new / renamed / removed
- The user says they recently added/changed a BT codeblock or a
.mluaproperty — stale UUIDs / missing properties silently produce broken trees. - The downstream validation (Step 7) flags a
definitionId,propertyKey, or version mismatch.
How to run — invoke this skill's local script:
node "scripts/build-spec.cjs" --projectRoot "<MSW project root>"
If the current working directory is already the MSW project root, --projectRoot can be omitted. Requires Node.js on PATH (no other dependencies — pure stdlib fs/path).
Optional overrides (long flags, case-insensitive):
| Flag | Default | Notes |
|---|---|---|
--projectRoot |
current working directory | MSW project root to scan |
--outputPath |
<ProjectRoot>/.behaviourDocs/bt-spec.md |
folder is created if missing |
--coreVersion |
read from <ProjectRoot>/Environment/config (CoreVersion field) |
required if the config is missing |
Example with overrides:
node "scripts/build-spec.cjs" --projectRoot "C:/path/to/project" --coreVersion <CoreVersion>
The script throws if Environment/config is absent and --coreVersion is not passed — there is no fallback default.
What the spec contains:
- Project metadata — project root,
CoreVersion, generated time, discovered node counts. - Composite nodes — built-in names with fixed
definitionId/btNodeType, plus discovered custom composites (.mluadeclaresextends CompositeNode). - Custom action nodes —
Name,definitionId,btNodeType, visible property names. - Custom decorator nodes — same shape as action nodes.
- Type map — mlua type to serialized
MODNativeType.typeplus BlackboardObjectValueshape.
UUIDs come from real .codeblock files in the project — the spec never invents them. @HideFromInspector properties are filtered out automatically. Fixed authoring rules, file skeletons, and validation checklists live in this skill's references/ rather than in the generated spec.
After (re)building, read the freshly written <ProjectRoot>/.behaviourDocs/bt-spec.md and continue with the steps below. The compact spec intentionally lists only property names; when constructing nodeProperties, resolve each property's mlua type/default from the paired .mlua file, then use the type map in bt-spec.md §4 for propertyType.type.
Also read references/skeleton-minimal.json for the smallest valid tree, references/skeleton-full.json for a Composite+Decorator+Action+Blackboard example with all optional fields populated, references/node-catalog.md for fixed graph rules, and any existing .behaviourtree in the project (**/*.behaviourtree) to mirror conventions. Replace {CORE_VERSION} in the skeletons with the CoreVersion from bt-spec.md — both at the top level and inside every MOD.Core.* type string in Blackboard variables and nodeProperties.
1. Collect input from the user
Confirm via context, or ask via AskUserQuestion if anything is ambiguous:
| Item | Description | Example |
|---|---|---|
name |
Display name for the tree | "PatrolAndChase" |
| Save path | .behaviourtree location (relative to project root) |
RootDesk/MyDesk/PatrolAndChase.behaviourtree |
| Tree shape | Intended node graph (root composite + children) | Sequence → [Chase, MoveTo] |
| Custom nodes | Action/decorator/composite codeblocks the tree references | Chase, MoveTo, Jump |
| Blackboard variables | Variable name + type + initial value | TargetEntity: Entity, MoveSpeed: number = 10.0 |
| Node properties | For each custom node, which property maps to which Blackboard variable | `Chas |
Установить msw-behaviourtree в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл msw-behaviourtree?
Authors MSW `.behaviourtree` files end-to-end and maintains the project-specific authoring spec (`.behaviourDocs/bt-spec.md`). Scans every `.codeblock` whose paired `.mlua` extends `ActionNode`/`DecoratorNode`/`CompositeNode` to build a compact catalog of custom action/decorator/composite UUIDs, propertyKey names, and version-stamped MODNativeType strings. Then generates the full tree: RootNode → Nodes graph, Blackboard variables, nodeProperties wiring, and self-validates parent/child consistency. Triggers: 'create behaviourtree', 'new BT', 'add a behaviour tree', 'BT node graph', '비헤이비어 트리 만들어', '.behaviourtree 생성', 'SequenceNode SelectorNode', 'Blackboard variable', 'definitionId codeblock', 'startNodeId', 'build BT spec', 'refresh bt-spec', 'generate behaviourtree catalog', 'BT 스펙 생성', 'bt-spec.md 만들어', 'rescan BT nodes'.
Как установить скилл msw-behaviourtree?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл msw-behaviourtree запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic