Npc Dialogue logo

Npc Dialogue

Community
christos-antono
npc-dialogue

Write what NPCs say with an LLM so they sound like themselves and like the game. Covers persona files, a fresh random sample of the character's own lines in every prompt, scene facts (place, time, weather, what the player holds or drives, danger), per-NPC conversation history, short spoken output with one delivery tag for the voice model, doing what the player tells them, fast models with reasoning off, and cleaning the output (refusals, name prefixes, length, slur rules). Use when NPC replies sound generic, robotic, too long, preachy or out of character, refuse, break the game's tone, or come back too slowly, or when adding a new character's persona.

Overview

Publisherchristos-antono
RepositoryNPCTalk
Skill namenpc-dialogue
Stars
201
Forks
17
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by christos-antono on GitHub. Read the source before you install it.

Installation

Install the Npc Dialogue AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/christos-antono/NPCTalk/tree/main/.agents/skills/npc-dialogue
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/christos-antono/NPCTalk.git /tmp/NPCTalk
mkdir -p .claude/skills
cp -r /tmp/NPCTalk/.agents/skills/npc-dialogue .claude/skills/npc-dialogue
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Npc Dialogue in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Npc Dialogue on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Npc Dialogue is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

NPC dialogue

The voice can be perfect and the NPC still sounds like a chatbot. What fixes it is in the prompt: who they are, how they really talk, where they are, and hard rules about the shape of a spoken line.

The prompt (what examples/gta-v/mod/Dialogue.cs sends)

system:  RULES (shared by everyone; the game's tone and the shape of a line)
         You are <Name>. <persona>
         Lines you've actually said (situation|line): <30 random lines from their own list, fresh every call>
         Examples of how you talk: <8 written examples, optional>
         Right now: <scene facts>
history: the last exchanges with this NPC (per NPC, so each one remembers you)
user:    what the player said
  • The sample of real lines is what makes them sound like themselves. A fresh random 30 each call stops them repeating catchphrases. Use lines you have the rights to: written by you in the character's style (examples/gta-v/sample-lines/franklin.txt), or the game's own lines kept locally if the user extracts them for a private build (NpcVoice/lines/<Voice>.txt, never committed).
  • Scene facts are short and concrete: "Grove Street, Davis, 9pm, foggy. Franklin is holding a pistol and is wanted by the police (2 stars)." NPCs react to the gun, the weather, the car; that's what makes it feel like the game and not a chat window.
  • Personas are a few lines each: who they are, how they talk (slang, catchphrases, what they swear like), who they love and hate. File format (NpcVoice/characters/<Key>.txt):
    name: Lamar Davis
    voice: LamarDavis                 folder in voices/ (default: the file name)
    models: ...                       other model names that are this character
    slurs: no                         yes only if the source character uses them (see Content)
    ---
    Franklin's loud, cocky best friend ... calls Franklin "busta", says "homie", "dog" ...
    _npc.txt is the persona for everyone without a file.

Rules that shape a spoken line (keep these in any game)

  • Only the words said out loud: no narration, asterisks, quotes, name prefix, emoji.
  • Short: usually one or two sentences, 5-25 words; cap it (45 words) and cut at the last full sentence.
  • At most one delivery tag, at the very start ([angry], [laughing], [whispering]...): the voice model acts it, and the game can pick a mood voice folder from it.
  • React to what was said and to the scene; don't echo the player, don't end every line with a question.
  • Stay in character; never mention being an AI or a game.
  • Do what you're told. If the player tells them to do something physical, they do it and say what their character would say while doing it. With actions on, ask the action picker first whether it's an order; if it is, write the line again knowing "you're right now" (skill npc-actions).

The tone rules are per game. GTA V's are M-rated: foul-mouthed, hostile, roasting the player back harder. A cozy farming game wants the opposite. Write them for the game, in the game's register.

Clean the output (never trust it raw)

Dialogue.Clean drops refusals (an empty reply, so an NPC never reads out a safety lecture), strips quotes, *actions* and a Name: or [Name] prefix wherever the model put it, applies the content rules, and cuts to 45 words at the last full sentence.

Content

  • Racial slurs are replaced by default, from everyone. slurs: yes in a persona allows them only for a character who uses them in the source material, the way they do; every persona in this repo has it off.
  • Insults about race (including "ape"/"monkey" jabs) and anti-gay slurs are blocked for everyone.
  • Swearing follows the game's tone; profanity isn't a problem in an M-rated game.

Speed

  • Use a fast model and turn reasoning off: Cerebras qwen-3.8-27b answers in ~0.3 s (DisableReasoning = true). Reasoning models add 1-5 s, and the player hears every millisecond.
  • MaxTokens = 160, Temperature = 0.9.
  • Run the action picker in parallel with the LLM, not after it.
  • Log the LLM's time per exchange; it occasionally spikes to 5-8 s. If that matters, fire a second request after ~2 s and take whichever answers first.

Test without the game

npcvoice-check talk <Character> "<what the player says>" (GTA example) builds exactly the prompt the mod sends and runs the LLM and the action picker; npcvoice-check talk runs a set of exchanges for several characters. Read ten replies per character before tuning anything.

Frequently asked questions

What does the Npc Dialogue AI skill do?

Write what NPCs say with an LLM so they sound like themselves and like the game. Covers persona files, a fresh random sample of the character's own lines in every prompt, scene facts (place, time, weather, what the player holds or drives, danger), per-NPC conversation history, short spoken output with one delivery tag for the voice model, doing what the player tells them, fast models with reasoning off, and cleaning the output (refusals, name prefixes, length, slur rules). Use when NPC replies sound generic, robotic, too long, preachy or out of character, refuse, break the game's tone, or c...

Why use Npc Dialogue on TypingMind?

Because you install it once and use it with any model. Npc Dialogue is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Npc Dialogue in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/christos-antono/NPCTalk/tree/main/.agents/skills/npc-dialogue. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Npc Dialogue?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Npc Dialogue?

As many as you like. As long as a model supports skills, you can use Npc Dialogue with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Npc Dialogue AI skill free?

Yes. It is published on GitHub by christos-antono under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇