ai-behavior-patterns

ai-behavior-patterns is a skill for Claude Code from MRCalderon3D/everything-game-dev-code. It costs 25 tokens per session (339 once invoked), scanned A, original, MIT.

A design guide for structuring game AI, the software that controls non-player characters such as enemies and other simulated actors. It covers decision-making, movement, combat, system interactions, tuning, and failure handling.

In plain words
What is it for?
Use it to define AI states or decision models, separate behavior responsibilities, add tuning and debug information, plan fallback behavior, and identify performance risks.
Why use it?
Unstructured AI can become difficult to change, test, or debug, especially when many characters act at once. This guide makes the flow from sensing to decisions to actions easier to follow.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the everything-game-dev-code plugin — 74 skills, 67 commands, 42 agents, 3 hooks, 6 MCP servers shipped together

Good fit Use it to define AI states or decision models, separate behavior responsibilities, add tuning and debug information, plan fallback behavior, and identify performance risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mrcalderon3d/everything-game-dev-code/ai-behavior-patterns
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.

Any agent
npx skills add MRCalderon3D/everything-game-dev-code --skill ai-behavior-patterns
Clone the repo
git clone --depth 1 https://github.com/MRCalderon3D/everything-game-dev-code

Made for: Claude Code.

Or install everything-game-dev-code, the plugin that ships this one along with the rest of its 74 skills, 67 commands, 42 agents, 3 hooks, 6 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-behavior-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/mrcalderon3d/everything-game-dev-code/ai-behavior-patterns/github.svg)](https://agentmods.dev/skills/mrcalderon3d/everything-game-dev-code/ai-behavior-patterns)
Your own site
<a href="https://agentmods.dev/skills/mrcalderon3d/everything-game-dev-code/ai-behavior-patterns"><img src="https://agentmods.dev/badge/skills/mrcalderon3d/everything-game-dev-code/ai-behavior-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-behavior-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/mrcalderon3d/everything-game-dev-code/ai-behavior-patterns"><img src="https://agentmods.dev/badge/skills/mrcalderon3d/everything-game-dev-code/ai-behavior-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 339 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00025 $0.00339
Opus 5.5 $0.00010 $0.00136
Sonnet 5.5 $0.00005 $0.00068
Haiku 4.5 $0.00003 $0.00034

Measured 10d ago against content hash 29ec45e9540b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ai-behavior-patterns 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 10d 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.

skills/engineering-common/ai-behavior-patterns/SKILL.md · 60 lines

What it actually says

Ai Behavior Patterns

Purpose

Design maintainable AI behavior structures for decision-making, navigation, combat, and systemic interaction.

Use When

  • NPC behavior needs structure
  • AI tuning is opaque
  • behavior authoring is hard to debug

Inputs

  • enemy or NPC roles
  • world rules
  • combat or systemic constraints
  • performance targets

Process

  1. define behavior goals and state or decision model
  2. separate sensing, decision, and action execution
  3. create tuning hooks and readable debug outputs
  4. handle fail states, navigation issues, and fallback behavior
  5. profile high-density scenarios early

Outputs

  • AI behavior model
  • tuning hooks
  • debugging checklist
  • performance risk notes

Quality Bar

  • makes ownership, state flow, and failure behavior explicit
  • improves maintainability without over-abstracting
  • supports testing, debugging, and safe iteration

Common Failure Modes

  • coupling systems through hidden globals or timing assumptions
  • writing logic that is hard to test or debug
  • optimizing the wrong layer before measuring
  • ai-programmer
  • combat-designer
  • performance-reviewer
  • tech-design
  • verify
  • playtest-report

Notes

  • Keep this skill aligned with the relevant rules layer and current project documentation.
  • If engine-specific constraints materially change the workflow, hand off to the matching engine skill or engine-specific reviewer.
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. 10d ago First seen · 60 lines · 25 tokens per session scan A 29ec45e9540b

Subscribe to this mod's changes

ai-behavior-patterns is a skill published in the GitHub repository MRCalderon3D/everything-game-dev-code (96 stars, last pushed 11d ago), licensed MIT. It adds 25 tokens to every session and 339 once invoked, about $0.0001 per session on Opus 5.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-10-10.

Related

Other skills, from other repositories

asset-audit

Audits game assets for compliance with naming conventions, file size budgets, format standards, and pipeline requirements. Identifies orphaned assets, missing references, and standard violations.

striderZA/OpenCodeGameStudios · 38 tokens

hotfix

Emergency fix workflow that bypasses normal sprint processes with a full audit trail. Creates hotfix branch, tracks approvals, and ensures the fix is backported correctly.

striderZA/OpenCodeGameStudios · 35 tokens

cgs-bug-report

Use for bug report tasks that capture a reproducible bug with environment, steps, expected/actual behavior, severity, evidence, and owner; produce verification evidence, changed or proposed files, and handoff boundaries.

merlinhu1/codex-game-studio · 48 tokens

cgs-bug-triage

Use for bug triage tasks that classify bugs by severity, priority, reproduction confidence, owner role, risk, and release impact; produce verification evidence, changed or proposed files, and handoff boundaries.

merlinhu1/codex-game-studio · 48 tokens

cgs-bugfix

Use for bugfix tasks that fix a bounded bug with reproduction evidence, minimal change, regression coverage, and handoff notes; produce verification evidence, changed or proposed files, and handoff boundaries.

merlinhu1/codex-game-studio · 45 tokens

cgs-dev-story

Use for dev story tasks that turn a design or bug into an implementation-ready story with owner, files, acceptance tests, and dependencies; produce verification evidence, changed or proposed files, and handoff boundaries.

merlinhu1/codex-game-studio · 46 tokens