unity-ai-behavior

Guidance for building game characters controlled by software in Unity, a game-development engine. It covers state machines, behavior trees, GOAP, navigation, sensing, and movement patterns.

In plain words
What is it for?
Use it when implementing patrol, chase, attack, idle, detection, navigation, or animation behavior for Unity NPCs.
Why use it?
It helps choose a suitable way to organize NPC decisions and avoid tangled or inefficient AI code.

Skill for Claude CodeCodex

Part of the hades plugin — 22 skills, 6 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/thearcforge/hades/unity-ai-behavior
Any agent
npx skills add TheArcForge/Hades --skill unity-ai-behavior
Clone the repo
git clone --depth 1 https://github.com/TheArcForge/Hades

Made for: Claude Code, Codex.

Or install hades, the plugin that ships this one along with the rest of its 22 skills, 6 commands.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,174 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.08174
Opus 5 $0.00016 $0.04087
Sonnet 5 $0.00006 $0.01635
Haiku 4.5 $0.00003 $0.00817

Measured 3d ago against content hash 5bb43cdf0751, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

unity-ai-behavior scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ClaudeCodePlugin/skills/unity-ai-behavior/SKILL.md · 1,111 lines

How it starts

The opening of the file, as written. The whole thing — 1,111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Unity AI Behavior

Guidance for designing and implementing NPC and AI systems in Unity 6+: choosing the right architecture for the complexity of the agent, wiring NavMesh navigation, building detection and sensing pipelines, and avoiding common performance and design traps.

When to Apply

Activate when the conversation involves:

  • Choosing an AI architecture (state machine vs behavior tree vs GOAP vs utility AI)
  • Implementing NPC patrol, chase, attack, or idle behaviors
  • Setting up NavMeshAgent navigation, obstacles, or off-mesh links
  • Building sensing systems (sight, hearing, trigger-based awareness)
  • Designing steering or movement behaviors (seek, flee, flocking)
  • Reviewing AI code that has grown large, tangled, or hard to extend
  • Animating NPCs whose animation state is driven by AI state

Do NOT activate for purely cosmetic NPC animation, dialogue systems, or cutscene scripting — those go to hades:animation-workflow or the scene-authoring skill.

Project Context Check

Before making recommendations:

  1. Check existing patterns in the graph:

    • Call graph_query(edgeKind: "references", edgeTargetNamePattern: "NavMeshAgent", edgeTargetKind: "Class") — reveals whether NavMesh navigation is already used and how agents are configured
    • Call search_by_name("*AI*") or search_by_name("*State*") — discovers existing AI scripts and naming conventions
    • Call graph_query(edgeKind: "references", edgeTargetNamePattern: "Animator", edgeTargetKind: "Class") — AI and animation state are often coupled; understand the existing linkage before recommending a new architecture
    • Call search_by_name("*BehaviorTree*") or search_by_name("*GOAP*") — detects whether a third-party AI framework is already in use
  2. Check team decisions in memory:

    • Call recall_memory("AI behavior state machine") to find documented AI patterns or previously chosen architecture
    • Call recall_memory("NavMesh navigation patrol") to find navigation conventions
    • Check validation status — if a recalled decision shows warning, surface the conflict before proceeding

Read the full file on GitHub · 1,111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 1,111 lines · 32 tokens per session scan A 5bb43cdf0751

Subscribe to this mod's changes

unity-ai-behavior is a skill published in the GitHub repository TheArcForge/Hades (27 stars, last pushed 7d ago), licensed MIT. It adds 32 tokens to every session and 8,174 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories