Drop any book into it. Play inside the story. Got a favorite fantasy novel? A classic adventure module? A weird obscure sci-fi book from the 70s? Drop the PDF in, and DM Claude extracts every character, location, item, and plot thread, then drops you into that world as whoever you want to be.
Add this skill
npx mdskills install Sstobo/claude-code-game-masterFull-featured D&D engine with RAG-powered book import, comprehensive bash tools, and specialist agent system
1# DM Claude23**Drop any book into it. Play inside the story.**45Got a favorite fantasy novel? A classic adventure module? A weird obscure sci-fi book from the 70s? Drop the PDF in, and DM Claude extracts every character, location, item, and plot thread, then drops you into that world as whoever you want to be.67Be a character from the book, someone original, or just yourself walking into the story. Every round, the AI queries the actual source material — NPCs talk like they do in the book, locations look like the author described them, and plot points unfold the way they should... until your choices change things.89The [Internet Archive](https://archive.org/) is a goldmine for this. Thousands of free books, adventure modules, and old pulp novels. Jump into *IT* and help the bad guys. Drop into *Lord of the Rings* and play from Gollum's perspective. It's your call.1011D&D 5e rules aren't really the point — they're just there to give the story stakes and consequences. You don't need to know D&D at all, just say what you want to do.1213---1415## In Action — Dungeon Crawler Carl1617A campaign imported from *Dungeon Crawler Carl*. Tandy the sasquatch rips the skin off a Terror Clown, forces Carl to wear it as a disguise, then performs a sasquatch mating dance to distract Grimaldi while Donut frees the dragon. Standard Tuesday.1819202122232425---2627## Getting Started2829**Prerequisites:** [Claude Code](https://docs.anthropic.com/en/docs/claude-code)3031```bash32git clone https://github.com/Sstobo/Claude-Code-Game-Master.git33cd Claude-Code-Game-Master34./install.sh35```3637The setup script installs everything you need — Python, uv, jq, and all project dependencies. It works on macOS and Linux with zero prior setup. You can also run it from inside Claude Code by asking the agent to set things up.3839Once installed:40411. Drop a PDF in the `source-material/` folder422. Run `claude` to launch Claude Code433. Run `/dm` and let the agent guide you4445That's it. The AI handles world extraction, character creation, and gameplay.4647---4849## What Happens Under the Hood5051When you import a document, the system vectorizes it locally with ChromaDB and spawns extraction agents that pull the book apart into structured data. During gameplay, every scene gets grounded in real passages from your source material — the AI isn't making things up, it's drawing from the text.5253Everything persists. NPCs remember what you said last session. Piss off a shopkeeper? That's tracked. The system schedules consequences that fire days later in-game time. Locations change as events unfold. Plot threads track your progress. Save and restore at any point.5455Specialist agents spin up on the fly. A fight starts and the monster-manual agent grabs real stat blocks. Cast a spell and the spell-caster agent looks up actual mechanics. Shopping? The gear-master has 237+ equipment items and 362+ magic items. The player never sees any of this — they just see the story — but you can always pull up the hood and see what's going on.5657It uses the [D&D 5e API](https://www.dnd5eapi.co/) for official rules, spellbooks, monsters, and equipment. This grounds everything in real mechanics and keeps Claude from just picking numbers.5859---6061## Advanced6263Everything below is handled automatically by the `/dm` command, but you can call these directly if you want manual control.6465### Dependencies6667Installed automatically during setup via [uv](https://docs.astral.sh/uv/):6869**Core:**70| Package | Purpose |71|---------|---------|72| `anthropic` | Claude API client |73| `pdfplumber` | PDF text extraction |74| `pypdf2` | PDF parsing |75| `python-docx` | Word document support |76| `python-dotenv` | Environment variable loading |77| `requests` | HTTP requests (D&D 5e API) |7879**RAG (for document import):**80| Package | Purpose |81|---------|---------|82| `sentence-transformers` | Text embeddings for semantic search |83| `chromadb` | Vector database for RAG retrieval |8485### Slash Commands8687| Command | What it does |88|---------|--------------|89| `/dm` | Start or continue your story |90| `/dm save` | Save your progress |91| `/dm character` | View your character sheet |92| `/dm overview` | See the world state |93| `/new-game` | Create a world from scratch |94| `/create-character` | Build your character |95| `/import` | Import a PDF/document as a new campaign |96| `/enhance` | Enrich entities with source material via RAG |97| `/world-check` | Validate campaign consistency |98| `/reset` | Clear campaign state |99| `/setup` | Verify/fix installation |100| `/help` | Full command reference |101102### Bash Tools103104All tools follow the pattern: `bash tools/dm-<tool>.sh <command> [args]`105106| Tool | Purpose |107|------|---------|108| `dm-campaign.sh` | Create, list, switch, and delete campaigns |109| `dm-session.sh` | Session lifecycle, party movement, save/restore |110| `dm-player.sh` | Player stats — HP, XP, gold, inventory, conditions |111| `dm-npc.sh` | NPC creation, updates, party member management |112| `dm-location.sh` | Location creation and connections |113| `dm-plot.sh` | Quest and storyline tracking |114| `dm-search.sh` | Search world state and/or source material |115| `dm-enhance.sh` | RAG-powered entity enrichment |116| `dm-extract.sh` | Document import and extraction pipeline |117| `dm-consequence.sh` | Future event scheduling and triggers |118| `dm-condition.sh` | Player condition tracking (poisoned, stunned, etc.) |119| `dm-note.sh` | Record world facts by category |120| `dm-time.sh` | Advance in-game time |121| `dm-overview.sh` | Quick world state summary |122| `dm-reset.sh` | Reset campaign data |123124### Specialist Agents125126These spawn automatically during gameplay when context demands it:127128| Agent | Triggered by |129|-------|--------------|130| `monster-manual` | Combat encounters |131| `spell-caster` | Casting spells |132| `rules-master` | Mechanical edge cases |133| `gear-master` | Shopping, identifying gear |134| `loot-dropper` | Victory, treasure discovery |135| `npc-builder` | Meeting new NPCs |136| `world-builder` | Exploring new areas |137| `dungeon-architect` | Entering dungeons |138| `create-character` | New characters |139140---141142## License143144This work is licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) — free to share and adapt for non-commercial use. See [LICENSE](LICENSE) for details.145146---147148Built by [Sean Stobo](https://www.linkedin.com/in/sean-stobo/). Your story awaits. Run `/dm` to begin.149
Full transparency — inspect the skill content before installing.