savecraft.gg: Skill for Claude Code

.claude/skills/working-on-d2r/SKILL.md

working-on-d2r is a skill for Claude Code from joshsymonds/savecraft.gg. It costs 80 tokens per session (909 once invoked), scanned A, original, Apache-2.0.

A set of instructions for developing Savecraft’s Diablo II: Resurrected save-file parser. It covers reading binary `.d2s` files, decoding items and skills, and handling shared stash data for the Reign of the Warlock version.

In plain words
What is it for?
Use it when changing code in `plugins/d2r/`, including save parsing, item properties, skill trees, attributes, treasure classes, or parser tests.
Why use it?
It gives developers the version-specific details needed to avoid misreading save files, such as different expansion detection, skill offsets, and Huffman-encoded item codes.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is joshsymonds/savecraft.gg's own configuration. It tells Claude Code how to work on savecraft.gg itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything savecraft.gg configures →

Reuse

Borrowing it

Nothing to install: this file belongs to joshsymonds/savecraft.gg. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/joshsymonds/savecraft.gg/main/.claude/skills/working-on-d2r/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/joshsymonds/savecraft.gg

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 working-on-d2r

README.md
[![agentmods](https://agentmods.dev/badge/skills/joshsymonds/savecraft.gg/working-on-d2r/github.svg)](https://agentmods.dev/skills/joshsymonds/savecraft.gg/working-on-d2r)
Your own site
<a href="https://agentmods.dev/skills/joshsymonds/savecraft.gg/working-on-d2r"><img src="https://agentmods.dev/badge/skills/joshsymonds/savecraft.gg/working-on-d2r/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 working-on-d2r

Your own site · 80×15
<a href="https://agentmods.dev/skills/joshsymonds/savecraft.gg/working-on-d2r"><img src="https://agentmods.dev/badge/skills/joshsymonds/savecraft.gg/working-on-d2r.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 909 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.00080 $0.00909
Opus 5 $0.00040 $0.00454
Sonnet 5 $0.00016 $0.00182
Haiku 4.5 $0.00008 $0.00091

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

Security

Grade A, and why

working-on-d2r 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 10d 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/skills/working-on-d2r/SKILL.md · 76 lines

How it starts

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

Working on the D2R Parser

The parser lives in plugins/d2r/d2s/. It's a WASM plugin that reads .d2s binary save files and emits ndjson to stdout. See docs/plugins.md for the plugin contract and working-on-plugins skill for section design guidance.

Verification

cd plugins/d2r && just test      # D2R-specific tests
just test-go                      # Full Go test suite
just lint-go                      # Includes D2R with relaxed lint rules

D2R v105 (Reign of the Warlock) Specifics

This parser targets v105 only (version byte 0x69). Classic LoD saves are not supported.

Expansion detection: v105+ saves do NOT set the LoD status bit (0x20) in the header. You must check header.Realm >= RealmLoD to gate mercenary and golem parsing. This is a common trap — the LoD bit check works for older saves but silently misparses v105.

Warlock class: Class index 7. Skill offset is 373 (not 281 — those are monster skills). Skills.txt extracted via CASC.

Item codes: Huffman-encoded in D2R (not ASCII like LoD). The Huffman tree is in d2s/huffman.go.

ISC (ItemStatCost): RotW ISC is IDENTICAL to vanilla D2R — zero property bit width changes. RotW added properties 365 (sB=6) and 366 (sB=8), plus items not in vanilla tables.

Lint Exceptions

golangci-lint config has exclusions for plugins/d2r/:

  • govet/shadow (binary parsing has lots of shadowed err)
  • globals (lookup tables are package-level)
  • complexity (binary parsing functions are inherently complex)
  • magic numbers (byte offsets, bit widths)

These exclusions are intentional. Don't try to "fix" them.

Test Data

  • Primary test save: reference/Diablo II Resurrected/Atmus.d2s — Level 74 Warlock, 45 items + 3 merc items.
  • Reference implementation: reference/olegbl-d2rmm/.../d2s/d2/items.tsreadItem() function.

CASC Data

Game data tables are extracted from the D2R CASC archive:

  • Archive: reference/d2r-casc/ (gitignored, must copy locally)
  • Extracted tables: reference/d2r-rotw-excel/ (gitignored — Blizzard IP, NEVER check in)
  • Extract tool: plugins/d2r/tools/casc-extract/ (uses CascLib, cloned at build time)
  • Plugin devenv.nix adds cmake/gcc/zlib for building the extract tool

Read the full file on GitHub · 76 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. 10d ago First seen · 76 lines · 80 tokens per session scan A 158c9e8ea996

Subscribe to this mod's changes

working-on-d2r is a skill published in the GitHub repository joshsymonds/savecraft.gg (12 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 80 tokens to every session and 909 once invoked, about $0.0004 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-30.