Skip to content
Back to skills

Enemy Ai

ASecurity

Use when an NPC needs explicit idle, alert, search, combat, retreat, or reset state transitions and those transitions are currently snapping, looping, or contradicting other AI systems.

  • 11 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 23, 2026
ai-agents

Security analysis

A100/100

Scanned October 23, 2026

npx -y skills add jammyfu/open-game-skills --skill enemy-ai --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Enemy Ai?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Enemy Ai
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jammyfu-enemy-ai/badge)](https://www.skillsdirectory.com/skills/jammyfu-enemy-ai)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: enemy-ai
description: Use when an NPC needs explicit idle, alert, search, combat, retreat, or reset state transitions and those transitions are currently snapping, looping, or contradicting other AI systems.
---

# Enemy AI

This skill owns the **brain state machine and transition policy**. It does not own sensing geometry, target scoring, attack warnings, or move balance.

## Modes

| Mode | State emphasis |
|---|---|
| leash-guard | guard area, pursue within published leash, then recover |
| patrol-hunt | patrol → investigate/search → combat → recover |
| ambush | hidden/idle → authored reveal → combat |
| duelist | combat spacing and state commitment for one primary opponent |
| swarm | simple local states coordinated by `group-tactics` |

`enemy-perception` owns sight/hearing/last-known evidence. `aggro-table` owns AI threat scoring. `enemy-kit-balance` owns move data. `attack-tell` owns readable startup.

## Transition contract

Publish state IDs and the event/evidence that can enter or leave each state. A transition records its reason (`saw_target`, `lost_target`, `leash_exceeded`, `scripted_phase`, and so on) so debug output can explain why the brain changed state.

Use one logical decision clock. Rendering rate and animation interpolation do not create extra state transitions. When several transition conditions become true on the same tick, use an authored priority or stable rule instead of container iteration order.

Reset/recovery behavior is project data: walk home, hold position, despawn, rejoin patrol, or remain engaged are all valid when explicitly chosen. Do not assume every game must visibly walk an NPC home.

## Acceptance

Replay the same perception/target event trace at different render rates and reversed entity iteration order. Brain states and transition reasons must match. Break and reacquire perception around the configured boundary, exceed the leash if one exists, and interrupt a scripted phase. Debug output must name the current state and the reason for the latest transition; animation alone is not evidence.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.