enemy-ai
Skill12 starsChanged 23 days agoMITView on GitHub
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.
In this repository194 other files it gives its agents.
- llms.txtllms.txt
- hd-sprite-sequenceSkill
- pixel-animationSkill
- skin-weightsSkill
- spine-skeletalSkill
- sprite-atlasSkill
- sprite-catalogSkill
- sprite-skinSkill
- art-bibleSkill
- asset-pack-intakeSkill
- character-rigSkill
- materialsSkill
- model-pipelineSkill
- open-asset-fixtureSkill
- vfx-generateSkill
- a11y-controlsSkill
- ability-gateSkill
- action-feelSkill
- ad-breakSkill
- adventure-toolSkill
- aggro-tableSkill
- aim-assistSkill
- ammo-reloadSkill
- analytics-funnelSkill
- animation-blendSkill
- animation-graphSkill
- asset-runtimeSkill
- attack-tellSkill
- audio-busesSkill
- audio-feelSkill
- avatar-createSkill
- balance-designSkill
- boss-designSkill
- browser-inputSkill
- camera-anti-clipSkill
- camera-modestySkill
- camera-shotsSkill
- cert-handoffSkill
- chemistry-verbsSkill
- climb-vaultSkill
- cloud-saveSkill
- collision-layersSkill
- combo-designSkill
- cover-shooterSkill
- cover-spaceSkill
- crafting-loopSkill
- currency-dualSkill
- cutscene-handoffSkill
- day-nightSkill
- death-carrySkill
- debug-slateSkill
- deck-buildSkill
- dialogue-beatSkill
- dialogue-flagsSkill
- difficulty-designSkill
- dodge-iframeSkill
- durability-economySkill
- encounter-designSkill
- enemy-fireSkill
- enemy-kit-balanceSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Use one logical decision clock.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

