Agent skill

Unity Behavior

by Besty0728 in Besty0728/Unity-Skills

Drive Unity Behavior behavior graphs and blackboard variables

MITAuto-check passedGame Development

Install Unity Behavior

skills CLI
$ npx skills add Besty0728/Unity-Skills --skill unity-behavior -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Besty0728/Unity-Skills unity-behavior --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Besty0728/Unity-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'SkillsForUnity/unity-skills~/skills/behavior' .claude/skills/unity-behavior && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
unity-behavior
GitHub stars
1.8k
Token cost
~3k tokens
SKILL.md length
1,437 words
Files
1
Skills in repo
82
Repo updated
First seen
Licence
MIT

At a glance

Drive Unity Behavior behavior graphs and blackboard variables

  • Works in 8 steps: behavior_status — confirm the package is… → behavior_graph_list — locate the graph,… → Author the node graph in the Behavior… → …
  • Game Development work in your project
  • SKILL.md covers Triggers, Operating Mode, Prerequisites and The two asset types (read this…, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Unity Behavior is an agent skill from Besty0728/Unity-Skills. Drive Unity Behavior behavior graphs and blackboard variables

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development. The repository describes itself as: AI automation skills specifically designed for Unity. The licence is MIT.

When your agent uses it

  • Game Development work in your project

Example prompts

  • “/unity-behavior”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. behavior_status — confirm the package is installed.
  2. behavior_graph_list — locate the graph, or behavior_graph_create to make a new one.
  3. Author the node graph in the Behavior editor window (node editing is not scriptable — see Limitations).
  4. behavior_graph_info — confirm the node topology and read the blackboard contract.
  5. behavior_agent_add with graphAssetPath — attach and bind in one call.
  6. behavior_blackboard_list — read the exact variable names and declared types.
  7. behavior_blackboard_set — per-agent overrides, or graph-wide defaults via graphAssetPath.
  8. behavior_agent_list — verify the whole scene's agent wiring.

What it can do on your machine

Read from SKILL.md and the folder at commit 12a40e4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Unity Behavior loads about 3k tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 1,437 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Besty0728/Unity-Skills at commit 12a40e4, republished under its MIT licence (© Besty0728). 1,437 words, ~2,973 tokens.

Download SKILL.mdSave it as .claude/skills/unity-behavior/SKILL.md (or your agent's skills folder).
name
unity-behavior
description
Drive Unity Behavior behavior graphs and blackboard variables

Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.

Triggers

  • Wiring NPC/AI decision logic
  • Working with behavior trees/graphs
  • Reading/writing blackboard variables
  • 搭建 NPC/AI 决策逻辑、使用行为树/行为图、读写黑板变量

Behavior Skills

Unity Behavior (com.unity.behavior, validated against 1.0.16) graph asset discovery, agent wiring, and blackboard variable access.

The package is optional and is not a declared dependency of UnitySkills. Every skill in this module reaches it through reflection; when it is absent each skill returns the same structured PACKAGE_NOT_INSTALLED response pointing at package_install.

Operating Mode

  • Query skills (behavior_status, behavior_graph_list, behavior_graph_info, behavior_agent_get, behavior_agent_list, behavior_blackboard_list) are SkillMode.SemiAuto — they run in all three modes without a grant.
  • Mutators (behavior_graph_create, behavior_agent_add, behavior_agent_set_graph, behavior_blackboard_set) are SkillMode.FullAuto — under Approval they need a user grant; under Auto / Bypass they execute directly.
  • No skill in this module carries SkillOperation.Delete, so none is auto-forbidden in Approval / Auto mode.

Prerequisites

Install the package first if behavior_status reports installed: false:

package_install  packageName="com.unity.behavior"

Installation triggers a Domain Reload; wait for it to finish, then call behavior_status again before using any other skill in this module.

The two asset types (read this before binding graphs)

A "Behavior Graph" .asset file contains two objects, and mixing them up is the most common failure:

ObjectRoleWhere it lives
BehaviorAuthoringGraphEditing representation — nodes, blackboard, story. Main asset.The .asset file itself
BehaviorGraphBaked runtime graph. What BehaviorGraphAgent.Graph actually requires.Sub-asset nested inside the same file

Skills in this module always take the file path (graphAssetPath / assetPath) and resolve the correct object internally — you never address the sub-asset directly. behavior_agent_set_graph finds the nested BehaviorGraph for you and refuses the bind with RUNTIME_GRAPH_MISSING when the graph has never been compiled.

Guardrails

Routing:

  • Behavior graphs / blackboards / BehaviorGraphAgent: this module
  • Animator state machines: use animator_*
  • Generic component attach on a GameObject: component_add works, but behavior_agent_add additionally binds the graph and validates it

Runtime-first rules:

  • Always call behavior_blackboard_list before behavior_blackboard_set — the variable name is case-sensitive and the declared CLR type decides which value shapes are accepted.
  • Never invent a graphAssetPath from memory; get it from behavior_graph_list.
  • If a skill returns errorCode: "API_MISMATCH", the installed package version has a different member layout than this integration expects. Do not retry with different arguments — report the version mismatch and fall back to the Behavior editor window or direct .asset text editing.
  • A graph created by behavior_graph_create is empty apart from the auto-inserted Start root. Adding actual behavior nodes requires the Behavior editor window (see Limitations).

Skills

behavior_status

Report package availability: installed, version, which core types resolved, project graph asset count, and scene agent count. Safe to call when the package is missing — this is the one skill that answers instead of erroring.

behavior_graph_list

List behavior graph assets with path, guid, nodeCount, variableCount, and hasRuntimeGraph. Optional filter (substring on path), folder, limit.

behavior_graph_info

Structure summary for one graph asset: node count with a per-type breakdown, individual nodes (id / type / position, capped by maxNodes), root count, the full blackboard variable list with types and default values, subgraph dependencies, and runtime graph state.

behavior_graph_create

Create an empty BehaviorAuthoringGraph at savePath and force a reimport so Unity bakes the blackboard, the runtime BehaviorGraph sub-asset, the debug info sub-asset, and the mandatory Start root. Returns hasRuntimeGraph; a warning is returned when baking did not happen and the graph must be opened once in the editor window.

behavior_agent_add

Add a BehaviorGraphAgent to a GameObject (name / instanceId / path), optionally binding graphAssetPath in the same call. The graph is resolved and validated before the component is added, so a bad path never leaves a half-configured agent. Idempotent — an existing agent is reused and reported via componentAdded: false.

behavior_agent_get

Read one agent: bound graph name and asset path, isInitialised / isStarted / isRunning, the graph's blackboard variables, and the agent-level overrides.

behavior_agent_set_graph

Bind graphAssetPath to an existing agent. Resolves the nested runtime graph and rejects uncompiled graphs.

behavior_agent_list

Every BehaviorGraphAgent in the loaded scenes with hierarchy path, bound graph, active/enabled flags, and run state. Optional graphFilter, includeInactive, limit.

behavior_blackboard_list

List blackboard variables. Pass graphAssetPath to read the asset's authoring defaults (source: "asset"), or a GameObject locator to read an agent's graph variables plus its overrides (source: "agent"). One of the two is required.

behavior_blackboard_set

Set one variable value.

ParameterMeaning
variableVariable name, case-sensitive. Required.
valueNew value. Accepted shapes depend on the declared type (see below).
name / instanceId / pathGameObject locator — writes the agent-level override.
graphAssetPathWrites the graph asset default and rebakes the runtime blackboard; if a rebake step fails the response carries warning.

Provide either the GameObject locator or graphAssetPath; the GameObject wins if both are given.

Returns: target ("agent" or "asset"), variable, type, the normalized value, and a note explaining where the write landed.

Supported value types and accepted input shapes:

Declared typeAccepted value
int / float / double / bool / stringJSON scalar, or a parseable string
enumMember name (case-insensitive)
Vector2 / Vector3 / Vector4 / Quaternion[1,2,3], {"x":1,"y":2,"z":3}, or "1,2,3"
Color{"r":1,"g":0,"b":0,"a":1}, [1,0,0,1], or "#FF0000"
Vector2Int / Vector3IntSame as the float vectors, truncated
GameObject / ComponentAssets/... prefab path, scene hierarchy path, or scene object name
Other UnityEngine.ObjectAssets/... or Packages/... asset path

Setting an unknown variable returns the available names in availableVariables.

Show full SKILL.md (554 more words)Show less

Edit mode vs Play mode

BehaviorGraphAgent instantiates a private copy of its graph on Init(), which only happens in Play mode. This changes what reads and writes mean:

  • Edit mode — behavior_blackboard_set with a GameObject writes an agent-level override (exactly what the Inspector shows). Reads of the graph variables return the shared asset defaults, not per-agent values; the per-agent values are in the overrides array.
  • Play mode — writes go to the running graph instance, so they take effect immediately on that agent only.

This is why behavior_blackboard_list reports both variables and overrides for an agent.

Workflow

  1. behavior_status — confirm the package is installed.
  2. behavior_graph_list — locate the graph, or behavior_graph_create to make a new one.
  3. Author the node graph in the Behavior editor window (node editing is not scriptable — see Limitations).
  4. behavior_graph_info — confirm the node topology and read the blackboard contract.
  5. behavior_agent_add with graphAssetPath — attach and bind in one call.
  6. behavior_blackboard_list — read the exact variable names and declared types.
  7. behavior_blackboard_set — per-agent overrides, or graph-wide defaults via graphAssetPath.
  8. behavior_agent_list — verify the whole scene's agent wiring.

Limitations

Node-level graph editing is not supported. There is no skill to add, remove, connect, or reconfigure nodes inside a behavior graph. This is a deliberate exclusion, not an oversight:

  • The authoring node graph is stored as a [SerializeReference] polymorphic List<NodeModel> with PortModel cross-references, an embedded SerializableCommandBuffer, and a version-stamped NodeModelInfo cache. Writing it correctly means reproducing the package's command/dispatcher pipeline, not just setting fields.
  • Every edit must be followed by a consistent rebake of three sub-assets (runtime graph, runtime blackboard, debug info) plus VersionTimestamp synchronization, or the asset silently desyncs from its baked runtime graph.
  • The serialization schema is explicitly versioned (kLatestSerializationVersion, currently 3) and has changed within the 1.0.x line. Reflection-driven topology writes would break on a patch release.

Alternatives when you need node-level changes:

  1. Preferred — author the graph in the Behavior editor window (Window > AI > Behavior, or double-click the asset), then use this module to inspect and wire it up.
  2. Duplicate a known-good graph with asset_duplicate and rebind it, instead of building topology from nothing.
  3. For mechanical, repetitive edits to an existing graph, edit the .asset YAML directly — load the yaml-editing advisory first for the managed-reference and fileID rules, and re-verify with behavior_graph_info afterwards.

Other limitations:

  • behavior_graph_create produces an empty graph. Node authoring still requires the editor window.
  • Blackboard variables cannot be created, renamed, retyped, or deleted — only existing variables can be assigned. Add variables in the Behavior editor's Blackboard panel.
  • Event channels, subgraph dynamic linking, and runtime serialization (Serialize / Deserialize) are not exposed.
  • behavior_blackboard_set against graphAssetPath changes the shared default for every agent that has no override for that variable.
  • Agent lifecycle control (Init / Start / End / Restart) is not exposed; those are Play-mode runtime concerns better handled from game code.

Version Sensitivity

Type and member names were taken from com.unity.behavior 1.0.16 sources and cross-checked against the published Scripting API. Public surface (BehaviorGraphAgent, BehaviorGraph, BlackboardReference, Blackboard, BlackboardVariable, VariableModel) is documented and stable. Authoring surface (BehaviorAuthoringGraph, GraphAsset, BlackboardAsset, BehaviorBlackboardAuthoringAsset) is internal to the package and reached by name — a package upgrade can move it. Every such lookup is null-checked and reports API_MISMATCH rather than throwing; behavior_status shows exactly which types resolved.


Exact Signatures

Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.

© Besty0728, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in SkillsForUnity/unity-skills~/skills/behavior of Besty0728/Unity-Skills.

Open the folder on GitHubat commit 12a40e4

Compare with similar skills

Unity Behavior next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Unity Behavior compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unity Behavior this skillBesty0728/Unity-Skills1.8k—~3kAutomated safety check: PassMIT
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k1 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.4k—~2.2kAutomated safety check: PassMIT
Game Asset Generatorhtdt/godogen7.1k—~2.8kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 1 repo~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.4k GitHub stars~2.2k tokensUpdated 9 days ago
    Game DevelopmentAuto-check passed
  • Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.

    7.1k GitHub stars~2.8k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Uloop Execute Dynamic Code

    CyberAgentGameEntertainment/NovaShader

    Execute C with Unity APIs when existing uloop tools cannot inspect or edit enough.

    1.6k GitHub starsUsed in 1 repo~1.9k tokens
    Game DevelopmentAuto-check passed

More from Besty0728/Unity-Skills

All 82 skills in this repo
  • Unity Skills

    Besty0728/Unity-Skills

    Automate the Unity Editor through a local REST API — scripts, scenes, prefabs, assets, materials, lighting, tests and hundreds of other Editor operations.

    1.8k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Unity Animator

    Besty0728/Unity-Skills

    Edit Unity Animator Controllers and drive runtime parameters

    1.8k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Unity Architecture

    Besty0728/Unity-Skills

    Advise on Unity gameplay and system architecture. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Unity Batch

    Besty0728/Unity-Skills

    Unified batch and async-job orchestration. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Unity Console

    Besty0728/Unity-Skills

    Capture and query the Unity Editor console. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Unity Dotween

    Besty0728/Unity-Skills

    Automate DOTween Free/Pro at editor time. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed

Questions about Unity Behavior

What does Unity Behavior do?

Drive Unity Behavior behavior graphs and blackboard variables. Unity Behavior is an agent skill from Besty0728/Unity-Skills.

When should I use Unity Behavior?

Unity Behavior fits situations like: game Development work in your project.

How do I install Unity Behavior in Claude Code?

Run `npx skills add Besty0728/Unity-Skills --skill unity-behavior -a claude-code`. Or copy the skill folder (SkillsForUnity/unity-skills~/skills/behavior in Besty0728/Unity-Skills) into .claude/skills/unity-behavior in your project. Claude Code loads it when a task matches its description.

How do I install Unity Behavior in Codex?

Run `npx skills add Besty0728/Unity-Skills --skill unity-behavior -a codex`. Or copy the skill folder (SkillsForUnity/unity-skills~/skills/behavior in Besty0728/Unity-Skills) into .agents/skills/unity-behavior in your project. Codex loads it when a task matches its description.

Can I use Unity Behavior in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Besty0728/Unity-Skills --skill unity-behavior -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unity-behavior, .gemini/skills/unity-behavior, .github/skills/unity-behavior and .opencode/skills/unity-behavior in your project.

What does Unity Behavior need to run?

SKILL.md names no scripts, command-line tools or credentials: Unity Behavior is instructions for the agent only.

Does Unity Behavior access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Unity Behavior safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Unity Behavior use?

Unity Behavior is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Unity Behavior use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Unity Behavior?

Skills that share tags, products or a category with Unity Behavior: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.4k stars) and Game Asset Generator (htdt/godogen, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unity Behavior?

Besty0728 (a GitHub user) maintains it in Besty0728/Unity-Skills, which has 1,814 GitHub stars. The repository holds 82 skills in this directory. The repository was last updated on October 6, 2026.

Source: Besty0728/Unity-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.