julianjica

DnD — AI skill for Claude Code

AI community

An AI Dungeon Master for solo D&D 5e, run locally in your browser.

How to install DnD

This entry records only its repository, not the path inside it, so there is no exact command to give. Open julianjica/DnD and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What DnD does

An AI Dungeon Master for solo D&D 5e, run locally in your browser. The DM runs on Claude Code, Codex or an API key and changes the game only through code-enforced tools. Battle maps, SRD 5.1 rules, grid combat.

Alternatives in AI

  • Cursor Tools — by eastlondoner - Creates a versatile AI command interface supporting multiple providers and models with flexi 4.7k ★
  • Ff Ruyijs — This is a lightweight, headless browser purpose-built for AI agents (such as Codex or Claude Code) to perform 865 ★
  • Theia IDE — The Theia IDE: an open-source, AI-native IDE for desktop and browser, built on the Theia Platform and Theia AI 619 ★

README

DungeonHarness

An AI Dungeon Master for **solo D&D 5e**, served locally in your browser. The DM runs on **Claude Code** or **Codex** (billed to your signed-in Claude / ChatGPT plan) or on an **API key** (Anthropic, OpenAI, OpenRouter, Google, … via pi-ai). Personal use only.

  • Code is authoritative. The AI changes the game only through ~45 game tools: dice, checks and saves, HP, inventory, XP, maps, combat, NPCs, quests and the journal. It cannot fudge rolls or forget your gold.
  • Full 5e SRD 5.1 (CC-BY-4.0): the data covers 334 monsters, 319 spells, the classes and subclasses, levels 1–20 and multiclassing.
  • Visuals:
    • Procedural tactical battle maps (14 kinds) with lighting and fog of war.
    • A parchment world map.
    • Illustrated scenes, procedural portraits and 3D physics dice.
    • Ambient music and SFX (CC0).
  • Combat: grid combat with initiative, an action economy, opportunity attacks, cover, area templates, concentration and death saves. You click to move and attack, and the DM plays the monsters.
  • Setup wizard: world and tone (including lines and veils), campaign structure, full character creation, and DM style and engine. Everything stays editable mid-game.
  • Saving: autosave, save slots, a journal, a quest log and an NPC codex.

Run it

npm install
npm run dev            # http://localhost:4242 (PORT=xxxx npm run dev to change)

Requirements:

  • Node 20 or newer.
  • At least one engine:
    • Claude Code: install it, run claude and /login.
    • Codex: install it and run codex login.
    • API key: add it in Settings → API keys.

Data (campaigns, sessions, keys) lives in `./data/`, which is git-ignored. Override it with `DH_DATA_DIR`.

Engine options (environment variables)

Variable Effect
DH_CLAUDE_CODE_PATH / DH_CODEX_PATH Use this executable
DH_CLAUDE_CODE=0|1 / DH_CODEX=0|1 Hide or force-show the engine
DH_CLAUDE_CODE_USE_API_KEY=1 /