tutorial-4

Coordinate turn-based D&D 5e combat with spellcasting, spell slots, and JSON-to-SQLite data.

1|1|Updated Nov 14, 2025
One-click install
npx skills add https://github.com/JoeCotellese/dnd-dm-skill --skill tutorial-4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tutorial-4
Source: https://github.com/JoeCotellese/dnd-dm-skill/tree/main/tutorial-4-magic-system
Command: npx skills add https://github.com/JoeCotellese/dnd-dm-skill --skill tutorial-4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill adds a complete spellcasting system to the D&D combat framework, including spell slots, cantrips, leveled spells, and multiple resolution mechanics (attack rolls, saves, and auto-hit) integrated with a data-driven spell database.

Core Features & Use Cases

  • Resource management: Track spell slots, long rests, and cantrips (unlimited).
  • Modular data architecture: Spells and monster data are loaded from JSON into SQLite for efficient querying.
  • Three resolution mechanics: Spell attacks, saving throws, and auto-hit spells.
  • Data seeding workflows: Seed bestiary and spell data to enable combat scenarios.

Quick Start

Seed the bestiary and spell databases, then start a sample combat:

  • python3 ~/.claude/skills/tutorial-4/scripts/bestiary.py seed
  • python3 ~/.claude/skills/tutorial-4/scripts/spells.py seed
  • python3 ~/.claude/skills/tutorial-4/scripts/combat.py start Gandalf 0.25

Frequently Asked Questions about tutorial-4

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up D&D 5e spellcasting with spell slots and resource tracking?

Spellcasting with spell slots integrates cantrips, leveled spells, and resource management into turn-based combat. Seed the spell database and bestiary using the provided scripts, then initialize combat with tracked spell slots that deplete and restore on long rests.

Can I store D&D spell and monster data in SQLite while keeping JSON modular?

Yes. This system loads spells and bestiary data from JSON files into SQLite for efficient querying, combining modular data architecture with persistent storage for seamless combat lookups and scenario setup.

How do spell attacks, saves, and auto-hit mechanics resolve in combat?

Three resolution mechanics handle spell resolution: spell attacks roll against AC, saving throws let enemies resist with ability checks, and auto-hit spells apply effects directly. Each integrates with initiative and turn order.

What's the workflow for seeding bestiary and spell data before starting combat?

Run the bestiary and spells seed scripts to populate SQLite from JSON, then launch combat scenarios with initialized monsters and spell libraries available for the encounter.

Does this spellcasting system extend the D&D 5e combat framework from Tutorial 3?

Yes. This Skill builds on Tutorial 3's combat system by adding spellcasting mechanics, spell slots, and data-driven spell resolution while maintaining compatibility with existing initiative and turn structure.