studio-seventeen
WORKSHOP--:--
~/workshop/skills/modbus/remap-addresses.md

$remap-addresses

SKILL 10 / 20READ-ONLY

Remap Addresses

Convert a complete map between zero-based offsets and 40001-style register numbers, then return the converted map when it is safe.

WHAT YOU GET

A clear result you can inspect

It writes one JSON result with every old and new address. Each converted point keeps `protocol_offset` as the zero-based value used in the Modbus request and `display_address` as its 40001-style reference. `source_address` contains the output notation you selected. When every address converts without a collision, the result contains the complete converted map for the next check. The input map stays unchanged.

HOW IT RUNS

Converts the full map before linting

01 · GUIDESKILL.mdprocess + safety
02 · EXECUTEscripts/run.pybundled local Python

Converts the full map before linting. You state the current and required address conventions. The script converts the full map, refreshes each stored address representation, and checks for invalid values and collisions. Converting to protocol offsets does not replace the 40001-style display address with an offset. A clean result includes the converted points and goes to $check-map. A held result does not publish converted points.

SYNTHETIC CONVERTED POINT

Keep each address meaning separate

This example converts a 40001-style source to a protocol offset. The runtime and display values both remain correct.

PROTOCOL OFFSET0The zero-based value sent in the Modbus request.
DISPLAY ADDRESS40001The Modicon reference kept for people and compatible tools.
SELECTED OUTPUTsource_address: 0The requested output convention is protocol-offset.

WHERE IT FITS

Used in these workflows

EXAMPLE REQUEST

Ask for the result in your own words.

Use this example as a starting point. Replace the file names and details with your own.

CODEX$remap-addresses
CLAUDE CODE/modbus-skills:remap-addresses
CURSOR + OTHER CLIENTSUse the client’s native skill invocation.
$remap-addresses

This map uses 40001-style holding-register numbers, but the target system expects zero-based offsets. Convert the addresses in `reviewed-map.json` and flag any duplicates or overlaps.
GitHub source ↗