Skip to content
Back to skills

Npc Actions

ASecurity

Make NPCs physically react to a conversation and follow spoken orders. Pick an action (punch, slap, hug, kneel and beg, flee, flip off, square up, nothing...) from what the player said and what the NPC replied, with TypeSafe's Jev returning a typed choice and a probability in ~0.1 s, per-action thresholds, a repeat cooldown, orders ("get on your knees") that override mood and make the LLM rewrite the line, and mapping action names onto the game's animations with checks at load. Use when NPCs ...

  • 12 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 16, 2026
ai-agentsreactapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 16, 2026

npx -y skills add christos-antono/NPCTalk --skill npc-actions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Npc Actions?

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

Security grade badge for Npc Actions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/christos-antono-npc-actions/badge)](https://www.skillsdirectory.com/skills/christos-antono-npc-actions)

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: npc-actions
description: Make NPCs physically react to a conversation and follow spoken orders. Pick an action (punch, slap, hug, kneel and beg, flee, flip off, square up, nothing...) from what the player said and what the NPC replied, with TypeSafe's Jev returning a typed choice and a probability in ~0.1 s, per-action thresholds, a repeat cooldown, orders ("get on your knees") that override mood and make the LLM rewrite the line, and mapping action names onto the game's animations with checks at load. Use when NPCs should act out what they say, obey commands, or when actions picked by an LLM are too random, too timid or too frequent.
---

# NPC actions

Two questions per exchange, both asked to TypeSafe's **Jev** (a typed-judgment model: it returns one choice from
a fixed set, with a probability, in ~0.1 s; key `TYPESAFE_API_KEY`, `https://docs.typesafe.ai`):

1. **Before the reply (in parallel with the LLM): is the player giving an order?** "Take your shirt off", "get on
   your knees", "give me a hug", "run". If Jev picks an action with ≥ 0.6 probability, it's an order: the NPC
   does it, and the LLM writes the line again knowing "you're <doing it> right now", so they grumble or joke
   while they comply instead of refusing. Costs ~0.1 s more, only then.
2. **After the reply (in parallel with the voice): what does their mood call for?** From the player's words
   and the NPC's reply, pick the action, or none.

## The catalog (`examples/gta-v/mod/ActionCatalog.cs`)
Each action has a name, a description Jev reads, and the probability Jev must reach before it happens:

| Action | Min. probability | Notes |
|---|---|---|
| none | - | just talk: most exchanges |
| slap, punch, facepalm, square_up, threaten_gun, hug, kiss | 0.45 | |
| headbutt, shirt_off (men), pants_off (to underwear), bend_over, kneel_beg | 0.5 | |
| shoot, run_away | 0.6 | need real certainty: they end the conversation |
| middle_finger | 0.7 | Jev picks it a lot, so it needs more |

- **Thresholds per action**, not one global cut-off: tune the ones that fire too often upward.
- **Cooldown:** the same NPC doesn't repeat an action within 60 s unless ordered to.
- **Descriptions are the prompt.** Write when it applies ("only when the reply clearly means killing them right
  now"), not just what it is.
- Gender rules (men only) and content rules (underwear stays on) live in code, not in the prompt.

## Mapping to the game (`NpcActions.cs`)
- Each name maps to candidates: animation dictionary + clip, a task (flee, fight), or a clothing swap. Check
  every candidate exists when the mod loads and log what was found (`action anims:`); fall back to the next.
- Play the action while the line is spoken, aimed at the player (or at whoever the scene says).
- A director or scripted scene can pin an action (`do: kneel_beg`) to skip the picker.

## Test it
`npcvoice-check actions` (GTA example) runs 25 exchanges through Jev, 10 of them orders, and checks each pick
(25/25 expected). In game, dev mode's PgUp/PgDn pick an action and End makes the target do it, to check the
animation without a conversation.

## Without Jev
A second LLM call with a JSON schema works, but it's slower (0.3-1 s) and its "confidence" isn't calibrated,
so thresholds are guesswork. Whatever picks, keep the shape: a fixed set, a probability, per-action thresholds,
orders checked first.

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.

Comments

Loading comments…

Newsletter

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