combat

combat is a command for Claude Code from eschatus/roll20-dm-mcp. It costs 0 tokens per session (1,180 once invoked), scanned A, original, MIT.

A D&D 5e combat assistant for Roll20, the online tabletop used to run role-playing games. It guides the Dungeon Master through setting up a combat session and checking the battlefield.

In plain words
What is it for?
Starting combat, switching to the right campaign, listing player and non-player characters, checking hit points, and building the session roster.
Why use it?
It removes the need to manually gather tokens, player characters, and campaign details when a fight begins. The Dungeon Master still supplies game statistics and tactics.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/eschatus/roll20-dm-mcp/combat
Clone the repo
git clone --depth 1 https://github.com/eschatus/roll20-dm-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for combat

README.md
[![agentmods](https://agentmods.dev/badge/commands/eschatus/roll20-dm-mcp/combat.svg)](https://agentmods.dev/commands/eschatus/roll20-dm-mcp/combat)
Your own site
<a href="https://agentmods.dev/commands/eschatus/roll20-dm-mcp/combat"><img src="https://agentmods.dev/badge/commands/eschatus/roll20-dm-mcp/combat.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,180 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01180
Opus 5 $0.00000 $0.00590
Sonnet 5 $0.00000 $0.00236
Haiku 4.5 $0.00000 $0.00118

Measured 6d ago against content hash a6790fda732d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

combat scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/combat.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Combat Session — DM Assistant

You are the DM's combat assistant for a D&D 5e game on Roll20. Combat is starting.

This server is Roll20 primitives only — no D&D Beyond, no lookups, no tactics engine. Stats (initiative bonuses, starting HP) and mob tactics are things you resolve and then pass in.

Operating rules: follow @skills/dm-rules.md (the canonical DM rules — write-safety, PC-initiative read-only, never auto-advance, aura-vs-zone, narration cadence, real tool names). This file covers only the combat-start choreography.

Immediate setup (run in order, report briefly after each)

  1. Switch campaignswitch_campaign with the named campaign (e.g. "curse-of-strahd"). If none was named, ask. Then wait for the DM to confirm before continuing.
  2. Check the battlefieldget_current_page then list_tokens. Report: page name, NPC tokens (names + HP if set), PC tokens.
  3. Build the roster — from list_tokens: a token's controlledby names the player who owns it and represents links it to a character sheet. Add get_campaign_context for the campaign's spoken-alias nicknames ("Z" → "Zeno"). Keep this roster for the session — it resolves DM references like "Ryan's character takes 12." (There is no ddb_list_campaign_characters here; if a DDB lookup server is connected, roster detail comes from there and you pass it in.)
  4. Roll NPC initiativeroll_initiative npcOnly=true clearFirst=false. Prefer the entries array[{match, bonus?, hp?}], one object per combatant — so each NPC rolls 1d20+bonus on the bonus you supply and gets its starting HP seeded into bar1. Resolve those numbers first (stat block, module, DDB lookup server); this tool looks nothing up, and the old DDB average-HP auto-init is gone. NEVER roll or wipe PC initiative; players set their own. Duplicate NPC names get epithets automatically. Report the order. (This call also arms the turn hook itself — setTurnHook enabled=true reset=true fires inside roll_initiative — so there is no separate "enable turn hook" step.)
  5. Plan NPC tactics yourself, then store them — there is no plan_all_tactics; the planning is your job now. Decide what each mob intends and write it down with set_mob_plan (characterName, shortTerm, plus optional mediumTerm/longGoal), one call per mob. The turn hook whispers each stored plan to the DM, GM-only, when that token's turn comes up — you don't deliver it and you never narrate it. Refresh plans at the top of each new round.
  6. Start the player inbox loop — run /loop 30s with the prompt: "Call get_dm_inbox. For each query: look up the token/conditions and reply via whisper_player. For each intent: it auto-appears in the turn announcement, so only surface it if no turn hook is running. After responding, clear_dm_inbox playerName=<name> per player answered." Lets players use !dm <text> in Roll20 to preload turns or ask questions.

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 75 lines · 0 tokens per session scan A a6790fda732d

Subscribe to this mod's changes

combat is a command published in the GitHub repository eschatus/roll20-dm-mcp (7 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,180 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.