/beehave
Use when using the Beehave addon — pure-GDScript behavior trees with composites, decorators, leaves, a blackboard, and a visual runtime debugger
$ npx -y skills add jame581/GodotPrompter --skill beehave --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/beehave
Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when using the Beehave addon — pure-GDScript behavior trees with composites, decorators, leaves, a blackboard, and a visual runtime debugger
SKILL.md
beehave.SKILL.mdname: beehave
description: Use when using the Beehave addon — pure-GDScript behavior trees with composites, decorators, leaves, a blackboard, and a visual runtime debugger
Beehave
> **Related skills:** **ai-navigation** for the movement leaves drive, **state-machine** for core-engine FSM, **limboai** for a heavier C++ BT+HSM alternative, **godot-brainstorming** for choosing an AI approach.
> **Addon:** Beehave · version `v2.9.2` · Godot 4.1+ · MIT · source: https://github.com/bitbrain/beehave · written in GDScript (no official C# API — this skill is GDScript-only by design).
---
1. When to use Beehave
| Approach | Best for | |---|---| | Core-engine FSM (`state-machine` skill) | Simple agents, < 5 states, no addon | | **Beehave** (GDScript addon) | Lightweight BT, GDScript-only projects, fast iteration | | **LimboAI** | BT **and** HSM together, visual editor, C++ performance, C# support (module build) |
Choose Beehave when your project is GDScript-only, you want a behavior tree without a custom engine build, and you value a simple node-in-scene-tree authoring workflow. Beehave trees live entirely in the scene tree — every composite, decorator, and leaf is a regular `Node` child. For a heavier C++/C# solution with HSM integration, use the `limboai` skill instead. For plain state machines without a BT, use the built-in `state-machine` skill.
**C# note:** Beehave has no official C# API (zero `.cs` files in `addons/beehave/`). From C# you can call the GDScript API via Godot cross-language interop (`GetNode<Node>(...).Call("tick", actor, blackboard)`), but Beehave provides no typed C# classes.
---
2. Install & enable
1. **Godot AssetLib** → search "Beehave" → Download → Reload project. Or copy the `addons/beehave/` folder from the [GitHub release](https://github.com/bitbrain/beehave/releases) into `res://addons/beehave/`. 2. Enable the plugin: **Project → Project Settings → Plugins** → tick **Beehave**. Two autoloads are registered: `BeehaveGlobalMetrics` and `BeehaveGlobalDebugger`. 3. Optional — copy `script_templates/` from the addon into the project root for leaf scaffolding templates.
---
3. Tree composition
A Beehave tree is built from three kinds of nodes, all placed as regular scene-tree children:
| Role | Node | Behavior | |---|---|---| | **Tree root** | `BeehaveTree` | Ticks the child every frame (or physics/manual); extends `Node` (not `BeehaveNode`) | | **Composites** | `SequenceComposite`, `SelectorComposite`, `SimpleParallelComposite`, … | Flow control — AND / OR / parallel logic | | **Decorators** | `InverterDecorator`, `CooldownDecorator`, `RepeaterDecorator`, … | Wrap one child to modify its result | | **Leaves** | `ActionLeaf`, `ConditionLeaf` subclasses | Your custom game logic |
Composite quick reference
| Class | Logic | |---|---| | `SequenceComposite` | AND — all children must succeed; fails on first failure | | `SequenceReactiveComposite` | AND — re-evaluates from first child every tick while running | | `SelectorComposite` | OR — succeeds on first success; fails if all fail | | `SelectorReactiveComposite` | OR — re-evaluates from first child every tick while running | | `SimpleParallelComposite` | Runs two children simultaneously; result follows primary (child 0) | | `SequenceRandomComposite` | Shuffled AND — executes children in random order | | `SelectorRandomComposite` | Shuffled OR — tries children in random order |
Decorator quick reference
| Class | Effect | |---|---| | `InverterDecorator` | Flips `SUCCESS` ↔ `FAILURE`; passes `RUNNING` through | | `AlwaysSucceedDecorator` | Forces `SUCCESS`; passes `RUNNING` through | | `AlwaysFailDecorator` | Forces `FAILURE`; passes `RUNNING` through | | `RepeaterDecorator` | Re-runs child until it succeeds `repetitions` times | | `LimiterDecorator` | Caps child to `max_count` running ticks, then `FAILURE` | | `CooldownDecorator` | Blocks re-execution for `wait_time` seconds after child finishes | | `TimeLimiterDecorator` | Gives child `wait_time` seconds; interrupts if still running | | `DelayDecorator` | Waits `wait_time` seconds before first executing child | | `UntilFailDecorator` | Loops child until it returns `FAILURE`, then returns `SUCCESS` |
Minimal scene-tree example
# Scene tree:
# Enemy (CharacterBody2D)
# BeehaveTree ← tick_rate = 1, process_thread = PHYSICS
# SelectorComposite
# SequenceComposite ← "attack if in range"
# IsInRangeCondition
# AttackAction
# PatrolAction ← fallback
# BeehaveTree exports:
# @export var enabled: bool = true
# @export var tick_rate: int = 1 (1 = every frame; 3 = every 3 frames)
# @export var process_thread: ProcessThread = PHYSICS
# @export var blackboard: Blackboard (auto-created if not set)
# @export_node_path var actor_node_path (defaults to parent node)
# Access the tree from code if you need manual control:
@onready var bt: BeehaveTree = $BeehaveTree
func _ready() -> void:
# Reduce tick cost: evaluate AI every 3 physics frames
bt.tick_rate = 3
# Default process_thread is PHYSICS — switch to IDLE if actor uses _process
bt.process_thread = BeehaveTree.ProcessThread.IDLE> **tick_rate note:** `tick_rate = 1` evaluates every frame; `tick_rate = 3` every 3 frames. Increase for distant/background NPCs to save CPU. Default process thread is `PHYSICS` — if the actor script uses `_process` instead of `_physics_process`, set `process_thread = IDLE` to keep them in sync.
---
4. The leaf contract
Leaves hold your game logic. Subclass `ActionLeaf` for multi-tick work or `ConditionLeaf` for single-frame checks, then override `tick(actor, blackboard)`.
# IsInRangeCondition.gd
class_name IsInRangeCondition
extends ConditionLeaf
@export var detection_range: float = 150.0
func tick(actor: Node, blackboard: Blackboard) -> int:
# Beehave types `actor` as Node; cast to your concrete type forRead more
name: beehave description: Use when using the Beehave addon — pure-GDScript behavior trees with composites, decorators, leaves, a blackboard, and a visual runtime debugger
Beehave
> **Related skills:** **ai-navigation** for the movement leaves drive, **state-machine** for core-engine FSM, **limboai** for a heavier C++ BT+HSM alternative, **godot-brainstorming** for choosing an AI approach.
> **Addon:** Beehave · version `v2.9.2` · Godot 4.1+ · MIT · source: https://github.com/bitbrain/beehave · written in GDScript (no official C# API — this skill is GDScript-only by design).
---
1. When to use Beehave
| Approach | Best for | |---|---| | Core-engine FSM (`state-machine` skill) | Simple agents, < 5 states, no addon | | **Beehave** (GDScript addon) | Lightweight BT, GDScript-only projects, fast iteration | | **LimboAI** | BT **and** HSM together, visual editor, C++ performance, C# support (module build) |
Choose Beehave when your project is GDScript-only, you want a behavior tree without a custom engine build, and you value a simple node-in-scene-tree authoring workflow. Beehave trees live entirely in the scene tree — every composite, decorator, and leaf is a regular `Node` child. For a heavier C++/C# solution with HSM integration, use the `limboai` skill instead. For plain state machines without a BT, use the built-in `state-machine` skill.
**C# note:** Beehave has no official C# API (zero `.cs` files in `addons/beehave/`). From C# you can call the GDScript API via Godot cross-language interop (`GetNode<Node>(...).Call("tick", actor, blackboard)`), but Beehave provides no typed C# classes.
---
2. Install & enable
1. **Godot AssetLib** → search "Beehave" → Download → Reload project. Or copy the `addons/beehave/` folder from the [GitHub release](https://github.com/bitbrain/beehave/releases) into `res://addons/beehave/`. 2. Enable the plugin: **Project → Project Settings → Plugins** → tick **Beehave**. Two autoloads are registered: `BeehaveGlobalMetrics` and `BeehaveGlobalDebugger`. 3. Optional — copy `script_templates/` from the addon into the project root for leaf scaffolding templates.
---
3. Tree composition
A Beehave tree is built from three kinds of nodes, all placed as regular scene-tree children:
| Role | Node | Behavior | |---|---|---| | **Tree root** | `BeehaveTree` | Ticks the child every frame (or physics/manual); extends `Node` (not `BeehaveNode`) | | **Composites** | `SequenceComposite`, `SelectorComposite`, `SimpleParallelComposite`, … | Flow control — AND / OR / parallel logic | | **Decorators** | `InverterDecorator`, `CooldownDecorator`, `RepeaterDecorator`, … | Wrap one child to modify its result | | **Leaves** | `ActionLeaf`, `ConditionLeaf` subclasses | Your custom game logic |
Composite quick reference
| Class | Logic | |---|---| | `SequenceComposite` | AND — all children must succeed; fails on first failure | | `SequenceReactiveComposite` | AND — re-evaluates from first child every tick while running | | `SelectorComposite` | OR — succeeds on first success; fails if all fail | | `SelectorReactiveComposite` | OR — re-evaluates from first child every tick while running | | `SimpleParallelComposite` | Runs two children simultaneously; result follows primary (child 0) | | `SequenceRandomComposite` | Shuffled AND — executes children in random order | | `SelectorRandomComposite` | Shuffled OR — tries children in random order |
Decorator quick reference
| Class | Effect | |---|---| | `InverterDecorator` | Flips `SUCCESS` ↔ `FAILURE`; passes `RUNNING` through | | `AlwaysSucceedDecorator` | Forces `SUCCESS`; passes `RUNNING` through | | `AlwaysFailDecorator` | Forces `FAILURE`; passes `RUNNING` through | | `RepeaterDecorator` | Re-runs child until it succeeds `repetitions` times | | `LimiterDecorator` | Caps child to `max_count` running ticks, then `FAILURE` | | `CooldownDecorator` | Blocks re-execution for `wait_time` seconds after child finishes | | `TimeLimiterDecorator` | Gives child `wait_time` seconds; interrupts if still running | | `DelayDecorator` | Waits `wait_time` seconds before first executing child | | `UntilFailDecorator` | Loops child until it returns `FAILURE`, then returns `SUCCESS` |
Minimal scene-tree example
# Scene tree:
# Enemy (CharacterBody2D)
# BeehaveTree ← tick_rate = 1, process_thread = PHYSICS
# SelectorComposite
# SequenceComposite ← "attack if in range"
# IsInRangeCondition
# AttackAction
# PatrolAction ← fallback
# BeehaveTree exports:
# @export var enabled: bool = true
# @export var tick_rate: int = 1 (1 = every frame; 3 = every 3 frames)
# @export var process_thread: ProcessThread = PHYSICS
# @export var blackboard: Blackboard (auto-created if not set)
# @export_node_path var actor_node_path (defaults to parent node)
# Access the tree from code if you need manual control:
@onready var bt: BeehaveTree = $BeehaveTree
func _ready() -> void:
# Reduce tick cost: evaluate AI every 3 physics frames
bt.tick_rate = 3
# Default process_thread is PHYSICS — switch to IDLE if actor uses _process
bt.process_thread = BeehaveTree.ProcessThread.IDLE> **tick_rate note:** `tick_rate = 1` evaluates every frame; `tick_rate = 3` every 3 frames. Increase for distant/background NPCs to save CPU. Default process thread is `PHYSICS` — if the actor script uses `_process` instead of `_physics_process`, set `process_thread = IDLE` to keep them in sync.
---
4. The leaf contract
Leaves hold your game logic. Subclass `ActionLeaf` for multi-tick work or `ConditionLeaf` for single-frame checks, then override `tick(actor, blackboard)`.
# IsInRangeCondition.gd
class_name IsInRangeCondition
extends ConditionLeaf
@export var detection_range: float = 150.0
func tick(actor: Node, blackboard: Blackboard) -> int:
# Beehave types `actor` as Node; cast to your concrete type forAgentic skills framework for Godot 4.x game development. Gives AI coding agents domain-specific expertise for GDScript and C# projects.
Other skills on godot-prompter.
- /authoring-godot-prompter-skills
Use when writing or editing a SKILL.md or an agent definition in this repo — required frontmatter, section ordering, and the GDScript-then-C# example convention.
Open skill - /releasing-godot-prompter
Use when cutting a GodotPrompter release or bumping its version — the version-bump sequence, tag-triggered workflow, and the marketplace manifests that must follow.
Open skill - /2d-essentials
Use when working with 2D-specific systems — TileMaps, parallax scrolling, 2D lights and shadows, canvas layers, particles 2D, custom drawing, and 2D meshes in Godot 4.3+
Open skill - /3d-essentials
Use when working with 3D-specific systems — materials, lighting, shadows, environment, global illumination, fog, LOD, occlusion culling, and decals in Godot 4.3+
Open skill - /ability-system
Use when building character abilities — Resource-based abilities with cost/cooldown/cast, buffs/debuffs, stat modifiers, gameplay tags, and HUD binding
Open skill - /addon-development
Use when creating Godot editor plugins — EditorPlugin, @tool scripts, custom inspectors, and dock panels
Open skill

