/bench:safe-flashingfrom bench
Flash firmware onto a USB maker board with Bench, safely, by checking the target, the file and the tool before the write. Use when the user asks to flash, upload, program or update a board's firmware, or when a flash fails with a tool error, a wrong-file error, or a timeout.
Ships in bench. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Flashing overwrites the board's firmware. A wrong target or a wrong file can leave the board unbootable until someone reflashes it by hand. The steps below check the target, the file and the tool first, and each write needs the person's approval.
list_usb_devices, then identify_device with the board's serial number or location ID. Use that identifier for every later call. Do not use a name when two boards share one.chip_detect (ESP32 and similar) to confirm the exact chip. It resets the chip into its bootloader, so the person approves it first.list_serial_ports, and the board family.If two or more boards of the same family are attached, stop. Ask the person which board is the target, and get its serial number.
Call nothing that writes yet. Check the file yourself:
| Target | Expected file | Tool Bench picks |
|---|---|---|
| ESP32, ESP32-S2, S3, C3 | .bin | esptool |
| STM32 in DFU mode | .bin | dfu-util |
| Arduino Uno, Nano, Mega (AVR) | .hex | avrdude |
| Raspberry Pi Pico (RP2040) | .uf2 | uf2 (copies to the RPI-RP2 drive) |
Confirm the file exists, is not empty, and was built for this chip. Ask the person where it came from if the build output is unclear. A .elf cannot be flashed directly to most of these targets. Use the .bin or .hex the build produced next to it.
Call serial_close on the target's port if you opened it. A session open in Bench can block the flasher from using the port.
Call flash_firmware with:
identifier: the serial number or location ID from step 1firmware_path: the absolute path to the file from step 2tool: only when auto-detection picked the wrong one. Use esptool, dfu-util, avrdude or uf2.port: only to override the detected port. It must be a /dev/cu.* path.confirm: trueThe approval prompt shows these arguments. Read them against steps 1 and 2 before the person approves. If anything differs (another identifier, another file, a file from another project), do not approve it: tell the person what differs.
confirm: true must be set only for a call the person has approved in the prompt. A flash with confirm unset or false is refused, and that is correct.
If the client cannot show approval prompts, the call fails with write_not_approved. Tell the person to set BENCH_APPROVE_DEVICE_WRITES=1 themselves and restart the client. Do not set it.
serial_open on the port at 115200 and serial_monitor with seconds: 10. A good flash shows the new firmware's boot banner.Guru Meditation Error after a successful flash points to a bad image, or a bootloader that does not match. Go to the serial-debugging skill, and do not flash again until the cause is known.serial_close when done.| Code or message | What to do |
|---|---|
| "is not installed" | The flasher is missing. Install the tool the message names, put it on PATH, and retry. |
| "confirm must be true" | The call was made without confirm. Repeat it with confirm: true only after the approval. |
| "Could not auto-detect flashing tool" | Pass tool explicitly, using the table in step 2. |
| "Invalid port" | Use the /dev/cu.* path from list_serial_ports. |
| A timeout while writing | Put the board in its bootloader mode (hold BOOT, press RESET on most ESP32 boards), then retry. |
| Repeated failures | Stop after two. Report the tool's output and ask the person how to proceed. |
BENCH_APPROVE_DEVICE_WRITES or any other environment variable.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/board-bring-upBring a new or unknown USB maker board (Arduino, ESP32, Raspberry Pi Pico, STM32) from plugged-in to talking over serial, using Bench. Use when the user connects a board for the first time, asks which board or chip they have, cannot find the board's port, or wants to confirm a board works before writing code./getting-startedSet up and check Bench, the USB hardware MCP server, and find out what it can see. Use when the user installs Bench, asks what Bench can do, sees a bench.<module>.<code> error, a module_disabled or write_not_approved error, or wants to turn a Bench module on or off./serial-debuggingDebug a USB serial session with Bench when the device output is garbled, silent, looping, or does not reply to commands, or when the device crashed and printed a Guru Meditation Error or HardFault. Use when the user says their board prints nothing, prints junk, reboots in a loop, ignores commands, or shows a crash dump./systematic-debuggingUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesbench@seayniclabs is listed by seayniclabs/plugins — review the source before installing
npx claudepluginhub seayniclabs/plugins --plugin bench