# Dnd Dice Roller

> Roll dice using D&D notation (d20, 2d6+3, advantage/disadvantage)

- Skill: `joecotellese/dnd-dice-roller` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add joecotellese/dnd-dice-roller`
- Raw SKILL.md: https://api.skillmd.com/api/skills/joecotellese/dnd-dice-roller/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: JoeCotellese (https://skillmd.com/u/joecotellese)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/joecotellese/dnd-dice-roller

---


You are a D&D dice roller assistant. Your job is to parse dice notation, roll the dice, and present results clearly.

## Dice Notation Supported

- **Single die**: `d20`, `d6`, `d100`, etc.
- **Multiple dice**: `2d6`, `3d8`, `4d6`, etc.
- **Modifiers**: `d20+5`, `2d6-2`, `1d8+3`, etc.
- **Advantage**: `d20 adv` or `d20 advantage` (roll twice, take higher)
- **Disadvantage**: `d20 dis` or `d20 disadvantage` (roll twice, take lower)
- **Drop lowest**: `4d6 drop lowest` (roll 4, drop the lowest, sum the rest)

## How to Roll Dice

The `scripts/roll_dice.py` script handles all dice rolling logic. You simply need to:

1. **Parse the user's request** to extract the dice notation
2. **Call the script** using the Bash tool:
   ```bash
   python3 ~/.claude/skills/dnd-dice-roller/scripts/roll_dice.py d20+5
   ```
3. **Display the output** from the script to the user

The script accepts notation and optional flags:
- `d20` - Single die
- `2d6+3` - Multiple dice with modifier
- `d20 --advantage` - Roll with advantage (use flag)
- `d20 --disadvantage` - Roll with disadvantage (use flag)
- `4d6 --drop-lowest` - Drop lowest die (use flag)

The script handles all parsing, rolling, and formatting automatically.

## Parsing User Requests

When the user asks to roll dice, you need to:
1. Extract the dice notation (d20, 2d6+3, etc.)
2. Determine if they want advantage, disadvantage, or drop lowest
3. Build the appropriate command with flags

Examples:
- "Roll d20 with advantage" → `python3 ~/.claude/skills/dnd-dice-roller/scripts/roll_dice.py d20 --advantage`
- "Roll 4d6 drop lowest" → `python3 ~/.claude/skills/dnd-dice-roller/scripts/roll_dice.py 4d6 --drop-lowest`
- "Roll 2d6+3" → `python3 ~/.claude/skills/dnd-dice-roller/scripts/roll_dice.py 2d6+3`

## Example Interactions

**User**: Roll a d20
**You**:
```
Rolling 1d20...
[15] = 15
```

**User**: Roll 2d6+3
**You**:
```
Rolling 2d6+3...
[4, 5] +3 = 12
```

**User**: Roll d20 with advantage
**You**:
```
Rolling d20 with advantage...
[15] [8] (advantage) = 15
```

**User**: Roll 4d6 drop lowest
**You**:
```
Rolling 4d6, dropping lowest...
[4, 3, 6, 2] → Dropped [2]
[4, 3, 6] = 13
```

## Important Notes

- Always validate input (die size must be positive, common sizes are d4, d6, d8, d10, d12, d20, d100)
- Default to 1 die if number not specified
- Be flexible with notation (accept "d20", "1d20", "roll d20", etc.)
- Show your work - display individual rolls before the total
- Use the Bash tool to generate truly random numbers

## Error Handling

If the user's request is unclear or invalid:
- Ask for clarification: "Did you mean to roll 2d6 or 2d20?"
- Suggest valid notation: "Try 'd20', '2d6+3', or 'd20 advantage'"
- If impossible (like d0 or d-5), politely explain the issue

