roblox-npc-ai

roblox-npc-ai is a skill for Claude Code, Codex from TabooHarmony/roblox-brain. It costs 38 tokens per session (662 once invoked), scanned A, original, MIT.

Guidance for creating Roblox characters or enemies that navigate the map and react to what they see.

In plain words
What is it for?
Use it for pathfinding, patrol and chase behavior, line-of-sight or field-of-view detection, enemy state machines, spawn systems, and AI update loops.
Why use it?
It provides the relevant patterns for movement, decision states, visibility checks, spawning, and repeated AI updates without requiring the developer to assemble them from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

not rated 42repo changed 5d ago A scan Socket: passSnyk: passSkillSpector: pass 38 tokens original MIT

Good fit Use it for pathfinding, patrol and chase behavior, line-of-sight or field-of-view detection, enemy state machines, spawn systems, and AI update loops.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tabooharmony/roblox-brain/roblox-npc-ai
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 TabooHarmony/roblox-brain --skill roblox-npc-ai
Clone the repo
git clone --depth 1 https://github.com/TabooHarmony/roblox-brain

Made for: Claude Code, Codex.

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 roblox-npc-ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/tabooharmony/roblox-brain/roblox-npc-ai/github.svg)](https://agentmods.dev/skills/tabooharmony/roblox-brain/roblox-npc-ai)
Your own site
<a href="https://agentmods.dev/skills/tabooharmony/roblox-brain/roblox-npc-ai"><img src="https://agentmods.dev/badge/skills/tabooharmony/roblox-brain/roblox-npc-ai/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 roblox-npc-ai

Your own site · 80×15
<a href="https://agentmods.dev/skills/tabooharmony/roblox-brain/roblox-npc-ai"><img src="https://agentmods.dev/badge/skills/tabooharmony/roblox-brain/roblox-npc-ai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 662 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. Third-party audits
  • Socket pass 6 Sept 2026
  • Snyk pass 6 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00038 $0.00662
Opus 5 $0.00019 $0.00331
Sonnet 5 $0.00008 $0.00132
Haiku 4.5 $0.00004 $0.00066

Measured 5d ago against content hash 1b2f9b31eb2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

roblox-npc-ai 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 5d 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/roblox-npc-ai/SKILL.md · 63 lines

How it starts

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

Roblox NPC & AI

When to Load

Load for NPCs/enemies: pathfinding, state machines, LOS/FOV detection, spawns, AI loops, or physics ownership.

Quick Reference

PathfindingService

local path = PathfindingService:CreatePath({
    AgentRadius = 2, AgentHeight = 5, AgentCanJump = true,
    Costs = { Water = 20, DangerZone = math.huge },
})
path:ComputeAsync(npcPos, targetPos)
if path.Status ~= Enum.PathStatus.Success then return end
for _, wp in path:GetWaypoints() do
    if wp.Action == Enum.PathWaypointAction.Jump then humanoid.Jump = true end
    humanoid:MoveTo(wp.Position)
    if not humanoid.MoveToFinished:Wait() then return end
end
  • Recompute on blocked with a bounded retry or cancellation policy.
  • In Studio, test Workspace.PathfindingUseImprovedSearch on representative maps before rollout; it is not scriptable.
  • Avoid long requests and repeated recomputation. Moving collidable geometry can trigger navigation-mesh work.
  • Region modifiers: anchored part + PathfindingModifier Label → Costs
  • PassThrough = true for doors; PathfindingLink for disconnected navmesh
  • math.huge cost = non-traversable

State Machine

idle → patrol → chase → attack → flee → dead

  • idle/patrol → chase (player detected) → attack (in range) → idle (lost)
  • any → flee (health low) → idle (safe); any → dead (health ≤ 0)
  • Transitions own movement changes, target cleanup, and cancellation

Detection (distance → FOV → LOS)

  1. Distance (a-b).Magnitude: cheapest, always first
  2. FOV forward:Dot(toTarget) cosine; use a configured cone for your game, not a universal angle
  3. LOS workspace:Raycast: expensive, last
  • If the design includes hearing or proximity detection, make it a separate configured signal rather than a universal FOV bypass.

Network Ownership

  • Classic projects may use SetNetworkOwner(nil) for physics-sensitive NPCs, but it is not complete security. In Server Authority projects, configure the authority model instead of treating network ownership as the security boundary.

Read the full file on GitHub · 63 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago Changed 1b2f9b31eb2c
  2. 12d ago First seen · 63 lines · 38 tokens per session scan A 9163a29ad83e

Subscribe to this mod's changes

roblox-npc-ai is a skill published in the GitHub repository TabooHarmony/roblox-brain (42 stars, last pushed 6d ago), licensed MIT. It adds 38 tokens to every session and 662 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.