d2r-safe-edit

d2r-safe-edit is a skill for Claude Code from crabsmadethis/d2r-horadric-tools. It costs 35 tokens per session (799 once invoked), scanned A, original, MIT.

A cautious workflow for editing Diablo II: Resurrected save files, character definitions, and game data. It requires backing up the save, changing one thing at a time, scanning the result, and verifying it before continuing.

In plain words
What is it for?
Safely changing character statistics, items, skills, or other save data while checking item codes, storage space, counts, positions, and file validity.
Why use it?
A bad save-file edit can corrupt data and make later problems difficult to trace. Small, checked changes reduce the risk of cascading damage.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

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

Good fit Safely changing character statistics, items, skills, or other save data while checking item codes, storage space, counts, positions, and file validity.

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

Any agent
npx skills add crabsmadethis/d2r-horadric-tools --skill d2r-safe-edit
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-safe-edit

README.md
[![agentmods](https://agentmods.dev/badge/skills/crabsmadethis/d2r-horadric-tools/d2r-safe-edit/github.svg)](https://agentmods.dev/skills/crabsmadethis/d2r-horadric-tools/d2r-safe-edit)
Your own site
<a href="https://agentmods.dev/skills/crabsmadethis/d2r-horadric-tools/d2r-safe-edit"><img src="https://agentmods.dev/badge/skills/crabsmadethis/d2r-horadric-tools/d2r-safe-edit/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-safe-edit

Your own site · 80×15
<a href="https://agentmods.dev/skills/crabsmadethis/d2r-horadric-tools/d2r-safe-edit"><img src="https://agentmods.dev/badge/skills/crabsmadethis/d2r-horadric-tools/d2r-safe-edit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 799 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.00035 $0.00799
Opus 5 $0.00017 $0.00400
Sonnet 5 $0.00007 $0.00160
Haiku 4.5 $0.00003 $0.00080

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

Security

Grade A, and why

d2r-safe-edit 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/skills/d2r-safe-edit/SKILL.md · 87 lines

How it starts

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

D2R Safe Edit

Overview

Every D2R save file edit follows the same cycle: backup, edit one thing, scan, verify, repeat. Skipping steps or batching edits has caused 15+ hours of debugging across multiple sessions. This skill is non-negotiable.

The Cycle

backup → edit ONE thing → scan → verify → next edit

Never batch. Never skip scanning. Never deploy with scanner errors.

Before Any Edit

  1. Backup the .d2s (Rule 3)

    shutil.copy2(path, path + '.pre_DESCRIPTION_bak')
    

    Verify the backup exists before proceeding.

  2. Verify preconditions:

    • UID exists in data file (Rule 1) — d2r_lookup_unique or read unique_items.py
    • Item code matches base type in item_bases.py
    • Target storage has free space (check grid with scanner)
    • Stats are non-zero (Rule: Dex/Energy must never be 0)

During Edit

  1. Edit ONE thing. Not two. Not "one more small fix."

    • Stats OR items OR skills — pick one per cycle
    • If using chargen: one --phase at a time
  2. Write to temp, verify, then overwrite (Rule 10)

    • Never write directly to a live .d2s
    • Parse the temp file back with scanner
    • Verify item counts/positions/types match intent
    • Only then copy to real location

After Edit

  1. Run d2rdoctor scanner (Rule 4)

    python3 -m d2r_chargen scan CHARNAME
    
  2. Evaluate ALL scanner output (Rule 19)

    • Hard error → STOP. Fix before proceeding. Never dismiss as false positive without bit-level proof (Rule 17).
    • Checksum mismatch → recalculate (Rule 5)
    • LF inconsistent → fix merc state
    • Encoding issues → rebuild item
  3. Only proceed to next edit when scanner is clean.

Red Flags — STOP Immediately

  • "Let me just do this other edit too" → NO. One edit per cycle.
  • "That scanner warning is probably fine" → NO. Investigate every error (Rule 19).
  • "I'll scan after all the edits" → NO. Scan after EACH edit (Rule 12).
  • "The number makes semantic sense" → NOT proof. Check actual encoding (Rule 17).
  • "Let me rebuild the whole file" → NO. Targeted section edits only (Rule 2).

Read the full file on GitHub · 87 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. 11d ago First seen · 87 lines · 35 tokens per session scan A eed1b541d913

Subscribe to this mod's changes

d2r-safe-edit is a skill published in the GitHub repository crabsmadethis/d2r-horadric-tools (4 stars, last pushed 1mo ago), licensed MIT. It adds 35 tokens to every session and 799 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

assets-shader-get-data

Get detailed data about a shader asset — properties, subshaders, passes, compilation messages, and supported status. Supports token-saving path-scoped reads via paths or viewQuery. Use 'assets-find' with t:Shader or 'assets-shader-list-all' to locate the shader first.

IvanMurzak/Unity-MCP · 70 tokens

gameobject-component-get

Get detailed information about a specific Component on a GameObject — type, enabled state, and (optionally) serialized fields and properties. Supports token-saving path-scoped reads via paths or viewQuery. Use 'gameobject-find' to list components first.

IvanMurzak/Unity-MCP · 59 tokens

gameobject-component-modify

Modify a specific Component on a GameObject in opened Prefab or in a Scene. Allows direct modification of component fields and properties without wrapping in GameObject structure. Use 'gameobject-component-get' first to inspect the component structure before modifying. Three modification surfaces are available…

IvanMurzak/Unity-MCP · 78 tokens

object-modify

Modify a Unity UnityEngine.Object's serializable fields/properties. Three modification surfaces are available (objectDiff, pathPatches, jsonPatch) — see the skill body. Use 'object-get-data' first to inspect the object structure.

IvanMurzak/Unity-MCP · 57 tokens

reflection-method-call

Call a C# method by reflection — including private methods. Requires a method schema obtained via 'reflection-method-find'. Supports static methods, instance methods (with optional target deserialization), and main-thread / off-thread execution.

IvanMurzak/Unity-MCP · 48 tokens

script-execute

Compiles and executes C# code dynamically using Roslyn. Supports a full-code mode (default) and a body-only mode — see the skill body for the difference and for how to pass Unity object references as parameters.

IvanMurzak/Unity-MCP · 48 tokens