msw-behaviourtree-creator
Installation
SKILL.md
MSW BehaviourTree Creator
Authors .behaviourtree files. The project's discovered node catalog lives in .behaviourDocs/bt-spec.md; fixed graph rules and skeletons live in this skill's references/ folder.
🚦 Execution order (follow this sequence)
0. Locate / refresh the project spec
- Read
<ProjectRoot>/.behaviourDocs/bt-spec.md. It is the source of truth for project-specific data: every custom action / decorator node'sdefinitionId,btNodeType, visiblepropertyKeynames, and the serializedType.typestrings stamped to this project'sCoreVersion. - The compact spec intentionally lists only property names. When constructing
nodeProperties, resolve each property's mlua type/default from the paired.mluafile, then use the type map inbt-spec.md§4 forpropertyType.type. - If the file is missing, stop and invoke
msw-behaviourtree-spec-builderfirst. If running manually, execute that skill's localscripts/build-spec.cjswith--projectRootset to the MSW project root. - If the user says they recently added/changed a BT codeblock or a
.mlua property, refresh the spec (re-run the builder skill) before proceeding — stale UUIDs / missing properties silently produce broken trees. - Also read
references/skeleton-minimal.jsonfor the smallest valid tree,references/skeleton-full.jsonfor a Composite+Decorator+Action+Blackboard example with all optional fields populated,references/node-catalog.mdfor fixed graph rules, and any existing.behaviourtreein the project (**/*.behaviourtree) to mirror conventions. Replace{CORE_VERSION}in the skeletons with theCoreVersionfrombt-spec.md— both at the top level and inside everyMOD.Core.*type string in Blackboard variables andnodeProperties.
1. Collect input from the user
Confirm via context, or ask via AskUserQuestion if anything is ambiguous: