skills/ue-behavior-tree-validator/SKILL.md
Validate Behavior Tree assets for common issues including infinite loops, missing decorators, orphan branches, and performance problems. Use when reviewing AI behavior, debugging BT issues, or validating enemy AI. Triggers on "behavior tree", "BT validation", "AI validation", "behavior tree review", "BT issues", "AI debugging".
npx skillsauth add sipherxyz/universal-ue-skills ue-behavior-tree-validatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Lint and validate Behavior Tree assets for correctness, performance, and best practices.
| Issue | Detection | Impact | |-------|-----------|--------| | Infinite Loop | Sequence with no failure condition | Game freeze | | Orphan Branch | Subtree never executed | Dead code | | Missing Root | No valid root node | BT won't run | | Circular Reference | BT references itself | Stack overflow |
| Issue | Detection | Impact | |-------|-----------|--------| | Unreachable Node | Decorator always fails | Logic never executes | | Race Condition | Parallel with shared blackboard keys | Unpredictable behavior | | Missing Abort | No AbortSelf/AbortBoth on time-sensitive decorators | Stuck AI | | Duplicate Conditions | Same check in sequence | Redundant processing |
| Issue | Detection | Impact | |-------|-----------|--------| | Expensive Service | Service tick interval < 0.1s | CPU overhead | | Heavy Task in Parallel | Complex task under Parallel node | Thread contention | | No Cooldown | Action can spam without delay | Performance spike | | Missing Blackboard Cache | GetActorOfClass in Task | O(n) every tick |
| Issue | Detection | Impact | |-------|-----------|--------| | Missing Comments | Complex branch without description | Maintainability | | Hardcoded Values | Magic numbers in decorators | Tuning difficulty | | Inconsistent Naming | Task names don't match function | Confusion |
Extract from .uasset:
## Behavior Tree Validation: {BTName}
### Summary
- **Status**: {PASS/WARNING/FAIL}
- **Critical Issues**: {N}
- **Warnings**: {N}
- **Suggestions**: {N}
### Node Statistics
| Type | Count |
|------|-------|
| Selectors | {N} |
| Sequences | {N} |
| Parallels | {N} |
| Tasks | {N} |
| Decorators | {N} |
| Services | {N} |
### Blackboard Usage
| Key | Type | Read By | Written By |
|-----|------|---------|------------|
| {Key} | {Type} | {Nodes} | {Nodes} |
### Critical Issues
#### 1. Infinite Loop Detected
**Location**: Sequence_Combat → Attack_Loop
**Problem**: Sequence has no failure path - all children always succeed
**Fix**: Add decorator with failure condition or timeout
**Current Structure**:
Sequence_Combat ├── BTTask_FaceTarget (Always Succeed) ├── BTTask_Attack (Always Succeed) └── BTDecorator_Loop (Infinite)
**Recommended Fix**:
Sequence_Combat ├── BTDecorator_Blackboard (TargetActor IsSet) ├── BTTask_FaceTarget ├── BTTask_Attack └── BTDecorator_Cooldown (0.5s)
---
#### 2. Orphan Branch
**Location**: Selector_Root → Sequence_Unused
**Problem**: Branch has decorator that always evaluates false
**Fix**: Remove branch or fix decorator condition
Selector_Root
├── Sequence_Combat [BTDecorator_HasCombatTicket]
│ ├── BTService_UpdateTarget (0.2s)
│ ├── BTTask_SipherMoveTo (Target)
│ ├── BTTask_SipherAttack
│ └── BTDecorator_Cooldown (AttackCooldown)
├── Sequence_Patrol [BTDecorator_Not HasTarget]
│ ├── BTTask_SipherMoveToPatrol
│ └── BTDecorator_Wait (PatrolWait)
└── BTTask_Idle [Fallback]
Sequence
├── BTDecorator_Blackboard (TargetActor IsSet) [AbortBoth]
├── BTDecorator_IsInRange (AttackRange) [AbortSelf]
├── BTDecorator_Cooldown (0.5s)
└── BTTask_Attack
| Scenario | Abort Mode | Reason | |----------|------------|--------| | Target validation | AbortBoth | Re-evaluate if target changes | | Range check | AbortSelf | Exit if out of range | | Cooldown | None | Timer-based, not condition | | Health threshold | AbortBoth | Immediate reaction to damage |
| Service Type | Recommended Interval | Reason | |--------------|---------------------|--------| | Target selection | 0.2-0.5s | Balance responsiveness/cost | | Threat update | 0.3-0.5s | Threat changes gradually | | Path validity | 0.5-1.0s | Path rarely invalidates | | Blackboard cleanup | 1.0s+ | Housekeeping only |
Check for:
# BT Validation Report: BT_{EnemyName}
## Executive Summary
- **Overall Status**: {PASS/FAIL}
- **Estimated Tick Cost**: {N}ms per AI
- **Scalability**: {Good for 50+ AI / Needs optimization}
## Issues by Priority
### P0 - Critical (Must Fix)
1. {Issue}
### P1 - High (Should Fix)
1. {Issue}
### P2 - Medium (Consider Fixing)
1. {Issue}
## Optimization Opportunities
1. {Opportunity with expected improvement}
## Sipher Standards Compliance
- [ ] Uses SipherBTTask_ base classes
- [ ] Combat ticket system integrated
- [ ] Coordinator group support
- [ ] Threat action validation
development
This skill should be used when implementing features in isolation using git worktrees. Triggers on "create worktree", "isolated workspace", "parallel development", or when starting implementation that should not affect main workspace.
testing
Manage VFX team issues on GitHub Projects - timeline scheduling, status updates, member commit checks, bulk assign. Use when managing VFX team project board, adding issues to timeline, checking member progress, or bulk-updating issue fields.
tools
Generate C++ validation rules from JSON definitions. Use when team updates ValidationRules.json or asks to add/modify validation rules.
development
Check codebase for Microsoft Xbox XR (Xbox Requirements) compliance issues. Scans for account picker, cloud saves, achievements, Quick Resume, and Xbox certification requirements. Use before console submission or when preparing for Microsoft certification. Triggers on "XR", "Xbox certification", "Microsoft compliance", "Xbox cert", "Xbox requirements", "GDK compliance".