AI Agent Hub
Back to skills
Markdown-Driven LLM Text Adventure Engine icon

Markdown-Driven LLM Text Adventure Engine

AI Agent Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_b591212e/md-game by following https://skillhub.cn/install/skillhub.md.

About this skill

Problem

In chat-only text adventures, an LLM can treat “state changed” as real even when the stat, location, NPC affinity, item, or check result only existed in the previous narration. Later turns drift, contradict earlier facts, and become hard to audit, compress, or roll back. This skill pins narrative state into Markdown files and engine commands, giving each turn an inspectable source of truth.

How It Works

It begins by asking for the world and character, then builds the skeleton with init and setup, requiring at least one NPC through setup --npcs. Each turn follows a fixed order: read state.md with read --hot, narrate from the current state, resolve checks using attributes, difficulty, and the check table, then write changes with turn. The final reply separates narrative, NPC dynamics, suggestions, state deltas, and scene context. turn accepts only changed fields and automatically advances turn count, energy, time, weather, and compression hints. State changes are valid only when written by commands, not asserted in prose.

Boundaries

This fits Markdown-based text adventures that need durable state, rule-based checks, logs, and multi-turn progression. It is not ideal for one-off chat, lightweight roleplay without state persistence, or fully freeform narration that should not be constrained by state.md validation.

Use Cases

  • Persist multi-turn adventure facts in state.md and update energy, location, and NPC affinity with turn.
  • Seed the opening with setup --npcs, then advance the story through fixed read, narration, and turn steps.
  • Resolve checks using attributes, difficulty, and check tables, then fold results into narration and logs.
  • Use compress/rollback to repair state drift or long logs while keeping game.md sections aligned with state.md.

Best For

  • Indie developers who want durable state and turn validation for LLM adventure chat.
  • Agent prompt engineers who need to move game state from freeform prose into Markdown files.
  • Writers building interactive fiction experiences that are auditable and rollback-capable.
  • Narrative designers who prefer rule-based checks over model-asserted results.