- Add `bin/generate-npc-profile` script to generate random NPC options (names, occupations, personality, goals, flaws, secrets) with configurable count - Expand npc-file-generator workflow to include random profile generation step for NPCs with minimal context - Add selection strategy guidelines for choosing between explicit context, inferred values, and random options - Document random profile JSON output format and example workflow in agent instructions - Authorize `Bash(bin/generate-npc-profile:*)` permission in settings.json |
||
|---|---|---|
| .claude | ||
| bin | ||
| resources | ||
| rules | ||
| templates | ||
| .gitignore | ||
| CLAUDE.md | ||
| PLAYER-GUIDE.md | ||
| README.md | ||
Claude DM - Your AI Dungeon Master for D&D 5e
Claude is your Dungeon Master! This is a complete D&D 5e campaign system where Claude runs persistent adventures for you in a living, breathing world.
What Is This?
This is an AI-powered D&D 5e campaign manager where:
- Claude is your DM - Running the world, NPCs, and story
- You play your character - In a persistent living world
- Time flows naturally - Based on in-game days, not real-world sessions
- Everything is remembered - Through organized campaign files
- Drop in anytime - Play whenever you want, pick up where you left off
Perfect for solo D&D play with an always-available, consistent DM!
Quick Start
New to This System?
- Read PLAYER-GUIDE.md - Learn how to play with Claude as your DM
- Type
/new-campaign- This slash command starts the character creation process - Begin your adventure! - Your story starts immediately
Already Have a Campaign?
Just type /continue and Claude will:
- Read all campaign files
- Remind you where you are
- Pick up exactly where you left off
You can also just say "Let's play" or "Let's continue" naturally!
How It Works
The Persistent World
Unlike traditional sessions, this is a living world:
- Play for 10 minutes or 2 hours - doesn't matter
- Multiple conversations can happen in the same game day
- Long rests (sleeping) advance to the next day
- Everything is tracked in organized files
- Claude reads the files to maintain perfect consistency
Day-Based Progression
Time flows naturally:
- Day 1 - Your adventure begins
- Travel, fight, explore during the day
- Long rest - Sleep 8 hours, restore resources
- Day 2 - Wake up, new day begins
- Everything from each day is logged in
logs/day-##.md
What Claude Does
As your DM, Claude:
- Runs the world and all NPCs
- Handles all dice rolls (transparently)
- Manages combat and encounters
- Tracks your character stats and resources
- Updates all campaign files automatically
- Maintains perfect consistency across all conversations
- Creates engaging stories tailored to your choices
File Structure
claude-dm2/
├── CLAUDE.md # Claude's DM operating manual
├── PLAYER-GUIDE.md # Your guide to playing
├── README.md # You are here
│
├── rules/ # D&D 5e rules library
│ ├── Classes/ # Character classes
│ ├── Spells/ # Spell descriptions
│ ├── Gameplay/ # Core mechanics
│ └── Gamemastering/ # GM resources
│
├── campaigns/ # Your campaigns
│ └── [campaign-name]/
│ ├── STATE.md # ⭐ Current game state (live)
│ ├── character.md # ⭐ Your D&D 5e character sheet
│ ├── campaign.md # Campaign overview, DM notes
│ │
│ ├── logs/ # ⭐ In-game day logs
│ │ ├── day-01.md # Everything from game day 1
│ │ ├── day-02.md # Game day 2 (after sleeping)
│ │ └── day-03.md # Game day 3
│ │
│ ├── npcs/ # Non-player characters
│ │ ├── allies/
│ │ ├── enemies/
│ │ └── neutral/
│ │
│ ├── locations/ # Places in the world
│ ├── plot/ # Story and quests
│ ├── encounters/ # Pre-built encounters
│ └── items/ # Equipment and loot
│
├── templates/ # Templates for new content
│ ├── character-sheet-dnd5e.md # D&D 5e character template
│ ├── STATE.md # Game state template
│ ├── day-log.md # Day log template
│ ├── campaign.md # Campaign template
│ └── [all other templates] # NPCs, locations, encounters, etc.
│
└── resources/
├── random-tables/ # Inspiration generators
│ ├── names.md # Quick NPC names
│ ├── personality-traits.md # Instant personalities
│ ├── quest-hooks.md # Adventure ideas
│ ├── weather.md # Weather generator
│ ├── rumors.md # Information and gossip
│ └── loot.md # Treasure tables
│
├── reference/ # DM guides
│ ├── dm-cheatsheet.md # Quick rules reference
│ ├── session-zero.md # Campaign setup guide
│ ├── pacing-guide.md # Session pacing
│ └── improv-tips.md # Improvisation techniques
│
└── claude-dm/ # ⭐ Claude's DM resources
├── commands.md # All player commands
├── balancing-solo.md # Solo play encounter balance
└── [other DM resources]
Commands
There are two types of commands in this system:
1. Slash Commands (Claude Code)
These are actual Claude Code slash commands stored in .claude/commands/:
| Command | What It Does |
|---|---|
/new-campaign |
Start a new D&D campaign with character creation |
/continue |
Resume your saved campaign |
/save |
Manually save your current game state |
/campaigns |
List all your available campaigns |
/exit |
End session and save progress |
These are project-level commands you can use in Claude Code.
2. In-Game Commands (During Play)
Once you're playing, you can use these natural commands during gameplay (Claude responds to these as your DM):
| Command | What It Does |
|---|---|
/character |
Show full character sheet |
/status |
Current HP, spell slots, resources |
/inventory |
All items and equipment |
/quests |
Active quests and objectives |
/npcs |
NPCs you've met recently |
/recap |
Summary of recent events |
/rest-short |
Take short rest (1 hour) |
/rest-long |
Take long rest (sleep, new day) |
/roll [skill] |
Make specific skill check |
/map |
Describe current surroundings |
/game-help |
Show all game commands |
Or just play naturally! Tell Claude what you want to do in your own words.
What to Expect
Full D&D 5e Experience
- Complete D&D 5e rules and mechanics
- Character creation with classes, races, backgrounds
- Tactical combat with initiative, attacks, spells
- Skill checks, saving throws, ability scores
- Leveling up and character progression
- Magic items, equipment, and treasure
- Everything you'd expect from D&D
Story-Driven Adventures
Play style balance:
- 60% Roleplay & Story - Character interactions, investigation, exploration
- 40% Combat - Tactical battles and action scenes
- Adjusted for context (more combat in dungeons, less in cities)
Solo Play Optimized
- Encounters balanced for one player
- Transparent dice rolls (you see everything)
- NPC allies when story-appropriate
- Spotlight always on you
- Your choices drive the story
Text-Based Format
- Concise, engaging narration (2-4 paragraphs)
- Clear choices offered frequently
- Fast-paced, keeps moving
- Easy to read and follow
- Great for async play
Example Play
You: "Let's continue my adventure"
Claude:
Welcome back! You're in the Rusty Anchor tavern in Port Dread. Last time, the mysterious hooded woman offered you a job to retrieve a stolen artifact from the Bloodfang gang's warehouse. You accepted.
She slides a rough map across the table. "The warehouse is on the docks, heavily guarded. Get in, find the silver locket, get out. Don't get caught."
It's evening. The docks are a 10-minute walk from here.
What do you do?
You: "I want to scout the warehouse first, see what I'm dealing with"
Claude:
You make your way through the foggy streets to the docks. The warehouse looms ahead - a large wooden building with a loading door and a side entrance. You spot:
[Rolling Perception: 16 + 3 = 19 vs DC 15] Success!
- Two guards at the main door, armed with clubs
- One guard patrolling the roof
- The side entrance has a lock, looks pickable
- Several wooden crates stacked outside provide cover
- A window on the second floor is slightly ajar
Do you: A) Try to pick the side door lock (Stealth + Thieves' Tools) B) Climb to the second floor window (Athletics check) C) Create a distraction and slip past the main door guards D) Something else?
You: "I'll climb up to the window!"
Claude:
You wait for the rooftop guard to turn away, then dash to the wall and begin climbing.
[Rolling Athletics: 12 + 4 = 16 vs DC 13] Success!
You scale the rough wooden planks and reach the window. Peering inside, you see a dimly lit storage room with crates and... a guard sleeping in a chair.
What do you do?
Features
✅ Persistent Living World - Everything is tracked and remembered ✅ Full D&D 5e Mechanics - Complete rules implementation ✅ Day-Based Progression - Natural time flow ✅ Automatic State Management - Claude tracks everything ✅ Transparent Dice Rolling - See all rolls and math ✅ Solo Play Balanced - Encounters scaled for one player ✅ Drop In/Out Anytime - Play when you want ✅ Story + Combat - Balanced, engaging gameplay ✅ Easy Commands - Quick info access ✅ Organized Files - Everything documented
For the DM (Claude)
If you're Claude reading this:
- Read CLAUDE.md first - That's your operating manual
- Every time player wants to play:
- Read STATE.md
- Read character.md
- Read campaign.md
- Read current day log (if player asks about past events)
- During play:
- Update STATE.md after significant events
- Update day log continuously
- Show all dice rolls transparently
- Keep responses 2-4 paragraphs
- After long rest:
- Finalize current day log
- Update STATE.md (new day, restore resources)
- Create new day log
See CLAUDE.md for complete instructions.
Getting Started
As a Player
- Read PLAYER-GUIDE.md (your player manual)
- Say "Let's start a new campaign!"
- Create your character with Claude's help
- Begin your adventure!
Starting Your First Campaign
You: "I want to start a new D&D campaign!"
Claude will:
- Help you create a D&D 5e character
- Discuss what kind of setting/story you want
- Set up the campaign structure
- Start Day 1 of your adventure
- Guide you through everything
No D&D experience required! Claude explains everything as you play.
Tips for Players
Do:
- Tell Claude what your character does naturally
- Use commands for quick info (/status, /quests, etc.)
- Make bold choices - your decisions matter
- Ask questions anytime
- Try creative solutions
- Speak in-character if you want (or don't!)
Don't Worry About:
- Knowing all the rules (Claude handles that)
- Making "wrong" choices (there aren't any)
- Dying immediately (encounters are balanced)
- Perfect optimization (story matters more)
Combat Tips:
- Think tactically - use the environment
- Tell Claude what you want to do, they handle the mechanics
- Ask about options if unsure
- Creativity is rewarded
System Requirements
For Players:
- Just you and Claude
- Any device that can chat with Claude
- No special software needed
For Claude:
- Access to campaign files
- Ability to read/write markdown files
- D&D 5e rules knowledge (rules/ folder)
Frequently Asked Questions
Q: Do I need to know D&D 5e rules? A: Nope! Claude teaches you as you play.
Q: Can I play multiple characters? A: System is optimized for one character, but Claude can adapt.
Q: How long are sessions? A: As long or short as you want! Play for 10 minutes or 2 hours.
Q: What happens if Claude forgets something? A: Just tell Claude to check the relevant file. The files are the source of truth.
Q: Can I play different campaigns? A: Yes! Create multiple campaign folders.
Q: Do I need physical dice? A: No - Claude rolls all dice transparently in the chat.
Q: What if I want to stop playing mid-adventure? A: Just stop! Claude updates STATE.md and you can pick up anytime.
Example Campaigns
Create campaigns in any D&D setting:
- High Fantasy - Epic quests, dragons, ancient magic
- Dark Fantasy - Gothic horror, vampires, curses
- Urban Adventure - City intrigue, thieves guilds, politics
- Dungeon Crawl - Classic dungeon exploration
- Wilderness Survival - Frontier exploration, survival
- Seafaring - Pirates, sea monsters, island hopping
- Planar Travel - Visit other planes of existence
- Custom Setting - Create your own world together
The world is yours to explore!
Advanced Features
For Experienced Players
- Multiclassing (with Claude's approval)
- Complex builds and optimization
- Homebrew content discussion
- Custom magic items
- Faction play
- Base building
- Followers and hirelings
Campaign Types
- Sandbox - Open world, player-driven
- Story-Driven - Follow epic narrative
- Mega-Dungeon - One massive dungeon to explore
- West Marches - Exploration-focused
- Intrigue - Politics and schemes
- Horror - Scary and atmospheric
Technical Notes
File Management
- All files are markdown (.md format)
- Human-readable and editable
- Can be version controlled (git)
- Easy to backup
- Portable across systems
STATE.md Updates
Claude updates STATE.md automatically:
- After combat (HP changes)
- After spell casting (spell slots)
- After rests (resource restoration)
- Major story events
- Location changes
- Quest updates
Day Logs
One log per in-game day:
logs/day-01.md- First day of adventurelogs/day-02.md- After first long restlogs/day-03.md- After second long rest- etc.
Each log contains everything that happened that day.
Contributing & Customization
This system is yours to modify:
- Add new templates
- Create custom random tables
- Modify STATE.md tracking
- Add custom character sheet sections
- Create campaign-specific rules
- Expand the rules/ folder
Make it your own!
Support
Having issues?
- Check PLAYER-GUIDE.md for common questions
- Ask Claude to check CLAUDE.md
- Claude can explain any confusion
- Files are the source of truth
Want to improve the system?
- Suggest new templates
- Add more random tables
- Expand reference guides
- Share your campaigns
Ready to Adventure?
Use the slash commands:
/new-campaign- Start a brand new adventure/continue- Resume your saved game/campaigns- See all your campaigns/save- Save your progress/exit- End session and save
Or just talk naturally:
- "Let's start a new campaign!"
- "I want to continue playing"
- "Let's play"
Claude is ready to run an amazing adventure for you!
Credits
Built for solo D&D 5e play with Claude as your DM. Combines:
- D&D 5e rules and mechanics
- Persistent campaign management
- AI-powered dungeon mastering
- Organized file-based memory
- Optimized for engaging text-based play
Now go forth and adventure! 🎲⚔️🐉