Agent skill

Dialogue System

by jame581 in jame581/GodotPrompter

A skill your agent uses when implementing dialogue — data structures for branching dialogue, conditions, and UI presentation

MITAuto-check passedGame Development

Install Dialogue System

skills CLI
$ npx skills add jame581/GodotPrompter --skill dialogue-system -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jame581/GodotPrompter dialogue-system --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jame581/GodotPrompter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dialogue-system .claude/skills/dialogue-system && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dialogue-system
GitHub stars
805
Token cost
~2.5k tokens
SKILL.md length
549 words
Files
6 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when implementing dialogue — data structures for branching dialogue, conditions, and UI presentation

  • Works in 9 steps: Architecture Overview → DialogueLine Resource → DialogueData Resource → …
  • Implementing dialogue — data structures for branching dialogue
  • SKILL.md covers 1. Architecture Overview, 2. DialogueLine Resource, 3. DialogueData Resource and 4. DialogueManager, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Dialogue System is an agent skill from jame581/GodotPrompter. Use when implementing dialogue — data structures for branching dialogue, conditions, and UI presentation

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/branching-and-conditions.md`, `references/dialogue-manager.md` and `references/external-formats.md`).

It sits in Game Development, covering Game development. It works with Godot. The repository describes itself as: Agentic skills framework for Godot 4.x. Domain-specific skills for AI coding agents (Claude Code, Copilot, Antigravity, Cursor). The licence is MIT.

When your agent uses it

  • Implementing dialogue — data structures for branching dialogue
  • UI presentation

Example prompts

  • “/dialogue-system”

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Architecture Overview
  2. DialogueLine Resource
  3. DialogueData Resource
  4. DialogueManager
  5. Branching and Conditions
  6. Dialogue UI
  7. External Formats
  8. Variable Interpolation
  9. Implementation Checklist

What it can do on your machine

Read from SKILL.md and the folder at commit 1e7d79d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are gdscript and csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dialogue System loads about 2.5k tokens when it runs, and up to ~9.5k if it reads all its reference files. Until then it costs about 30 tokens; SKILL.md has 549 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jame581/GodotPrompter at commit 1e7d79d, republished under its MIT licence (© jame581). 549 words, ~2,530 tokens.

Download SKILL.mdSave it as .claude/skills/dialogue-system/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
dialogue-system
description
Use when implementing dialogue — data structures for branching dialogue, conditions, and UI presentation

Dialogue Systems in Godot 4.3+

All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.

Related skills: resource-pattern for dialogue data as Resources, godot-ui for Control node layout, state-machine for dialogue flow management, save-load for dialogue state persistence, dialogue-manager for a full-featured dialogue addon, popochiu for adventure games.


1. Architecture Overview

┌─────────────────────────────────────────────────────────┐
│                        UI Layer                         │
│   DialogueUI (Control)                                  │
│     ├─ Label (speaker_name)                             │
│     ├─ TextureRect (portrait)                           │
│     ├─ RichTextLabel (dialogue_text, typewriter effect) │
│     └─ VBoxContainer (choice_container)                 │
│           └─ Button × N (choice buttons)                │
│                                                         │
│   Connects to: line_displayed, choice_presented signals │
└───────────────────────┬─────────────────────────────────┘
                        │ drives UI via signals
┌───────────────────────▼─────────────────────────────────┐
│              DialogueManager (Autoload / Node)           │
│   start_dialogue(dialogue_data)                         │
│   advance()  → next line or end                         │
│   choose(choice_index)                                  │
│   current_line: DialogueLine (read-only)                │
│                                                         │
│   signals: dialogue_started                             │
│             line_displayed(line)                        │
│             choice_presented(choices)                   │
│             dialogue_ended                              │
└───────────────────────┬─────────────────────────────────┘
                        │ reads
┌───────────────────────▼─────────────────────────────────┐
│                   Data Layer (Resources)                 │
│   DialogueData (Resource)                               │
│     lines: Dictionary  ← id → DialogueLine              │
│     start_line_id: String                               │
│                                                         │
│   DialogueLine (Resource)                               │
│     speaker, text, choices, next_line_id, condition     │
└─────────────────────────────────────────────────────────┘

2. DialogueLine Resource

DialogueLine holds all data for a single beat of dialogue. Choices is an Array[Dictionary] so each entry can carry a text, next_line_id, and optional condition without a separate class.

GDScript
gdscript
# dialogue_line.gd
class_name DialogueLine
extends Resource

## Display name shown in the UI speaker box.
@export var speaker: String = ""

## The body text. Supports BBCode and variable placeholders: {player_name}.
@export_multiline var text: String = ""

## When non-empty, overrides next_line_id. Each Dictionary must have:
##   "text"        : String   — label on the choice button
##   "next_line_id": String   — line to jump to when chosen
##   "condition"   : String   — (optional) expression; omit or "" to always show
@export var choices: Array = []

## ID of the next DialogueLine. Ignored when choices is non-empty.
@export var next_line_id: String = ""

## Optional condition expression evaluated before displaying this line.
## If the expression returns false the manager skips to next_line_id.
## Example: "GameState.has_item('key')"
@export var condition: String = ""
C#
csharp
// DialogueLine.cs
using Godot;
using Godot.Collections;

[GlobalClass]
public partial class DialogueLine : Resource
{
    /// <summary>Display name shown in the speaker box.</summary>
    [Export] public string Speaker     { get; set; } = "";

    /// <summary>Body text. Supports BBCode and {variable} placeholders.</summary>
    [Export(PropertyHint.MultilineText)]
    public string Text                 { get; set; } = "";

    /// <summary>
    /// When non-empty, overrides NextLineId. Each Dictionary entry must contain:
    ///   "text"         : string  — choice button label
    ///   "next_line_id" : string  — line to jump to
    ///   "condition"    : string  — (optional) expression; omit or "" to always show
    /// </summary>
    [Export] public Array Choices      { get; set; } = new();

    /// <summary>ID of the next DialogueLine. Ignored when Choices is non-empty.</summary>
    [Export] public string NextLineId  { get; set; } = "";

    /// <summary>
    /// Optional condition expression. Evaluated before displaying this line.
    /// Example: "GameState.HasItem(\"key\")"
    /// </summary>
    [Export] public string Condition   { get; set; } = "";
}

3. DialogueData Resource

DialogueData is a container Resource that holds a dictionary of all lines, keyed by their string ID. Creating it as a .tres file lets you assign it to NPCs in the Inspector.

GDScript
gdscript
# dialogue_data.gd
class_name DialogueData
extends Resource

## Dictionary mapping line ID strings to DialogueLine resources.
## Example: { "intro": <DialogueLine>, "ask_quest": <DialogueLine> }
@export var lines: Dictionary = {}

## ID of the first line to display when dialogue starts.
@export var start_line_id: String = ""


## Convenience accessor — returns null for unknown IDs.
func get_line(id: String) -> DialogueLine:
    return lines.get(id, null)
C#
csharp
// DialogueData.cs
using Godot;
using Godot.Collections;

[GlobalClass]
public partial class DialogueData : Resource
{
    /// <summary>Maps line ID strings to DialogueLine resources.</summary>
    [Export] public Dictionary Lines        { get; set; } = new();

    /// <summary>ID of the first line to display when dialogue starts.</summary>
    [Export] public string StartLineId      { get; set; } = "";

    /// <summary>Returns the DialogueLine for id, or null if not found.</summary>
    public DialogueLine GetLine(string id)
    {
        if (Lines.ContainsKey(id))
            return Lines[id].As<DialogueLine>();
        return null;
    }
}

Populate lines in the Inspector by adding Dictionary entries with string keys and DialogueLine resource values, or load them programmatically from JSON (see section 7).


4. DialogueManager

A singleton autoload owns the active DialogueData and tracks current line ID. start(data) sets the data and emits the first line; advance(choice_index) moves forward. Wires three signals: line_changed(line), choices_presented(choices), dialogue_ended().

See references/dialogue-manager.md for the full GDScript and C# manager (line traversal, choice handling, condition evaluation hooks, signals).


5. Branching and Conditions

Choices live on DialogueLine.choices (an Array of Dictionary). Each choice has text, next_line_id, optional condition. Conditions are GDScript expressions evaluated via the Expression class — passed a context object with project state (e.g. GameState).

See references/branching-and-conditions.md for the full choice-handling and condition-evaluator implementations (GDScript + C#), plus security notes on Expression input.


6. Dialogue UI

A CanvasLayer with a RichTextLabel for the line body (BBCode-enabled), a Label for speaker name, and a VBoxContainer for choice buttons. Typewriter effect via RichTextLabel.visible_characters driven by a Tween. UI subscribes to DialogueManager signals.

See references/ui-presentation.md for the scene-tree fragment, typewriter recipe, choice-button spawning, and full GDScript + C# wiring.


7. External Formats

Load dialogue from JSON for designer-friendly editing — map JSON keys to DialogueLine properties at load time. Or integrate the Dialogic addon for a node-graph editor (community standard).

See references/external-formats.md for the JSON loader recipe and Dialogic integration notes.


Show full SKILL.md (201 more words)Show less

8. Variable Interpolation

Dialogue text supports {player_name}-style placeholders. Resolve via a small templater: text.format(vars) (GDScript) or string.Format with named-tag preprocessing (C#).

See references/variable-interpolation.md for the GDScript and C# interpolation helpers.


9. Implementation Checklist

  • DialogueLine and DialogueData extend Resource and carry [GlobalClass] (C#) for Inspector integration
  • DialogueManager is registered as an Autoload so all scenes share a single instance
  • start_dialogue() asserts that dialogue_data is non-null before accessing it
  • advance() guards against being called when choices are pending
  • choose() operates on the filtered visible-choices list, not the raw choices array
  • Condition strings reference only stable autoload method names — avoid referencing scene-local nodes
  • _evaluate_condition() passes a known base instance (GameState) to Expression.execute() to resolve method calls
  • Typewriter timer uses visible_characters, not frame-by-frame string slicing, for BBCode compatibility
  • Pressing ui_accept mid-typewriter reveals full text; a second press advances the line
  • Choice buttons are freed (queue_free) before creating new ones — never accumulate stale children
  • JSON loader validates file open and parse steps separately, emitting clear error messages for each failure
  • Variable interpolation is centralised in one _interpolate() helper, not scattered across signal handlers
  • next_line_id = "" signals end-of-dialogue — no magic sentinel strings beyond the empty string
  • All push_error() messages include class name and method for easy log tracing

© jame581, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in skills/dialogue-system of jame581/GodotPrompter.

  • SKILL.md
  • references/branching-and-conditions.md
  • references/dialogue-manager.md
  • references/external-formats.md
  • references/ui-presentation.md
  • references/variable-interpolation.md

Open the folder on GitHubat commit 1e7d79d

Compare with similar skills

Dialogue System next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dialogue System compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dialogue System this skilljame581/GodotPrompter805—~2.5kAutomated safety check: PassMIT
Godot Gdscript Patterns925236118/AlphaAgent10310 repos~5kAutomated safety check: PassMIT
2D Map and Scene Generator0x0funky/agent-sprite-forge4.4k—~2.9kAutomated safety check: PassMIT
Godot UI Integrationzimo-xiao-zheng/godot-ui-integration285—~1.5kAutomated safety check: PassMIT
Godot Wechat Minigame Adaptergodothub/godot-minigame187—~1.5kAutomated safety check: PassMIT
AI Game Art Pipelineybuild-ai/ai-game-art-pipeline-skill297—~1.1kAutomated safety check: PassMIT

Similar skills

  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 10 repos~5k tokens
    Game DevelopmentAuto-check passed
  • 2D Map and Scene Generator

    0x0funky/agent-sprite-forge

    Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

    4.4k GitHub stars~2.9k tokensUpdated 3 days ago
    Game DevelopmentAuto-check passed
  • Godot UI Integration

    zimo-xiao-zheng/godot-ui-integration

    Build or revise Godot UI from an approved design, separated art, or a visual reference when scene structure, gameplay binding, and runtime visual verification all matter.

    285 GitHub stars~1.5k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Godot Wechat Minigame Adapter

    godothub/godot-minigame

    Apply the bundled self-contained Godot WeChat Mini Game adapter kit to an official Godot checkout.

    187 GitHub stars~1.5k tokensUpdated 24 days ago
    Game DevelopmentAuto-check passed
  • AI Game Art Pipeline

    ybuild-ai/ai-game-art-pipeline-skill

    Provider-neutral open-source skill for planning and producing game-runtime art assets and animation: static props/icons, canonical character sheets, combat sprites, 3D/video motion references…

    297 GitHub stars~1.1k tokensUpdated 3 mo ago
    Game DevelopmentAuto-check passed
  • MCP Driver

    RandallLiuXin/GodotMaker

    Runtime debugging and live project inspection via godot-mcp.

    550 GitHub starsUsed in 1 repo~1.1k tokens
    Game DevelopmentAuto-check passed

More from jame581/GodotPrompter

All 58 skills in this repo
  • Godot 2D Essentials

    jame581/GodotPrompter

    Covers Godot 4.3+ 2D systems with GDScript and C# examples: canvas layers, draw order, TileMaps, parallax, lights and shadows, particles and custom drawing.

    805 GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Godot 3D Essentials

    jame581/GodotPrompter

    Covers Godot 4.3+ 3D systems such as materials, lighting, shadows, environment, global illumination, fog, LOD, occlusion culling and decals, with GDScript first and C# second.

    805 GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Godot Ability System

    jame581/GodotPrompter

    Builds a data-driven ability system in Godot 4 from Resources and a component node, with cooldowns, buffs, stat modifiers, gameplay tags and HUD binding.

    805 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Godot Addon Development

    jame581/GodotPrompter

    Covers Godot 4.3+ editor plugins: plugin folders, @tool scripts, the EditorPlugin lifecycle, custom inspectors, dock panels and gizmos, in GDScript and C#.

    805 GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Godot AI Navigation

    jame581/GodotPrompter

    Covers pathfinding and enemy movement in Godot 4.3 and later: navigation regions, NavigationAgent nodes, steering, behavior trees and patrol routes.

    805 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Godot Animation System

    jame581/GodotPrompter

    Covers animation in Godot 4.3 and later: AnimationPlayer basics, AnimationTree blend trees and state machines, sprite animation, skeleton IK and code-driven motion.

    805 GitHub stars~3.8k tokensUpdated today
    Auto-check passed

Works with

Questions about Dialogue System

What does Dialogue System do?

A skill your agent uses when implementing dialogue — data structures for branching dialogue, conditions, and UI presentation. Dialogue System is an agent skill from jame581/GodotPrompter.

When should I use Dialogue System?

Dialogue System fits situations like: implementing dialogue — data structures for branching dialogue; UI presentation.

How do I install Dialogue System in Claude Code?

Run `npx skills add jame581/GodotPrompter --skill dialogue-system -a claude-code`. Or copy the skill folder (skills/dialogue-system in jame581/GodotPrompter) into .claude/skills/dialogue-system in your project. Claude Code loads it when a task matches its description.

How do I install Dialogue System in Codex?

Run `npx skills add jame581/GodotPrompter --skill dialogue-system -a codex`. Or copy the skill folder (skills/dialogue-system in jame581/GodotPrompter) into .agents/skills/dialogue-system in your project. Codex loads it when a task matches its description.

Can I use Dialogue System in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jame581/GodotPrompter --skill dialogue-system -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dialogue-system, .gemini/skills/dialogue-system, .github/skills/dialogue-system and .opencode/skills/dialogue-system in your project.

What does Dialogue System need to run?

SKILL.md names no scripts, command-line tools or credentials: Dialogue System is instructions for the agent only.

Does Dialogue System access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dialogue System safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dialogue System use?

Dialogue System is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dialogue System use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7k tokens, read only when the agent opens those files.

What are the alternatives to Dialogue System?

Skills that share tags, products or a category with Dialogue System: Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars), 2D Map and Scene Generator (0x0funky/agent-sprite-forge, 4.4k stars), Godot UI Integration (zimo-xiao-zheng/godot-ui-integration, 285 stars) and Godot Wechat Minigame Adapter (godothub/godot-minigame, 187 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dialogue System?

jame581 (a GitHub user) maintains it in jame581/GodotPrompter, which has 805 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 9, 2026.

Source: jame581/GodotPrompter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.