d2r-scan

d2r-scan is a command for Claude Code from crabsmadethis/d2r-horadric-tools. It costs 12 tokens per session (302 once invoked), scanned A, original, MIT.

A command that runs the d2rdoctor scanner on one Diablo II: Resurrected character or on all characters.

In plain words
What is it for?
It helps validate character files, identify checksum and encoding problems, detect missing files, and inspect item placement after edits.
Why use it?
It checks edited character data for errors that could prevent the files from loading correctly.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the d2r plugin — 2 skills, 4 commands shipped together

Good fit It helps validate character files, identify checksum and encoding problems, detect missing files, and inspect item placement after edits.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/crabsmadethis/d2r-horadric-tools/d2r-scan
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.

Clone the repo
git clone --depth 1 https://github.com/crabsmadethis/d2r-horadric-tools

Made for: Claude Code.

Or install d2r, the plugin that ships this one along with the rest of its 2 skills, 4 commands.

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 d2r-scan

README.md
[![agentmods](https://agentmods.dev/badge/commands/crabsmadethis/d2r-horadric-tools/d2r-scan/github.svg)](https://agentmods.dev/commands/crabsmadethis/d2r-horadric-tools/d2r-scan)
Your own site
<a href="https://agentmods.dev/commands/crabsmadethis/d2r-horadric-tools/d2r-scan"><img src="https://agentmods.dev/badge/commands/crabsmadethis/d2r-horadric-tools/d2r-scan/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for d2r-scan

Your own site · 80×15
<a href="https://agentmods.dev/commands/crabsmadethis/d2r-horadric-tools/d2r-scan"><img src="https://agentmods.dev/badge/commands/crabsmadethis/d2r-horadric-tools/d2r-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 302 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00012 $0.00302
Opus 5 $0.00006 $0.00151
Sonnet 5 $0.00002 $0.00060
Haiku 4.5 $0.00001 $0.00030

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

Security

Grade A, and why

d2r-scan 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 11d 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.

plugin/commands/d2r-scan.md · 34 lines

What it actually says

D2R Scanner

Run the d2rdoctor scanner on $ARGUMENTS.

python3 << 'PYEOF'
import sys
sys.path.insert(0, '<parent-of-d2r-tools>')
from d2r_scanner import run_scanner
target = '$ARGUMENTS'.strip().lower() if '$ARGUMENTS'.strip() else 'all'
run_scanner(target)
PYEOF

Interpreting Results

  • Hard error (returns False): Deployment blocker. Fix before loading in D2R.
  • Checksum MISMATCH: Recalculate with calc_checksum() before writing.
  • LF INCONSISTENT: Merc items present but lf_count=0. Remove merc items or fix count.
  • Ghost character: .ctl exists but .d2s missing. Restore from backup or delete support files.
  • Encoding issues: Wrong ext bits. Rebuild with corrected build_item().
  • Grid view: Each cell shows first char of item type. . = free slot.

Rules

  • Rule 4: Always run scanner after every edit
  • Rule 17: Scanner hard errors are deployment blockers — never dismiss without bit-level proof
  • Rule 19: Investigate every remaining error before closing
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. 11d ago First seen · 34 lines · 12 tokens per session scan A de3864bd42a9

Subscribe to this mod's changes

d2r-scan is a command published in the GitHub repository crabsmadethis/d2r-horadric-tools (4 stars, last pushed 1mo ago), licensed MIT. It adds 12 tokens to every session and 302 once invoked, about $0.0001 per session on Opus 5. 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.