A Claude Code skill for controlling sigrok-compatible logic analyzers via sigrok-cli. Capture, decode, and analyze digital signals (I2C, SPI, UART, JTAG, and 130+ protocols) directly from your terminal through natural language.
Tell Claude what you want to capture, and it handles the rest:
- Detects your connected logic analyzer automatically
- Builds the correct sigrok-cli commands for your protocol and wiring
- Captures raw data to
.srsession files (capture-first pattern for reliability) - Decodes offline using sigrok's 132 protocol decoders
- Analyzes results and summarizes findings (NACKs, framing errors, register values, etc.)
Works in two modes:
- Interactive — walks you through channel mapping, protocol settings, triggers, and sample rate selection
- Autonomous — give a complete request like "capture 3 seconds of I2C on D0/D1" and it runs end-to-end
The skill uses a multi-device architecture with per-device profile files. Currently includes:
| Device | Driver | Channels | Max Sample Rate |
|---|---|---|---|
| Sipeed SLogic16 U3 | sipeed-slogic-analyzer |
16 (D0-D15) | 200 MHz |
Adding support for another sigrok-compatible analyzer means adding one device profile markdown file. See Adding a new device.
- sigrok-cli with libsigrokdecode (protocol decoder support)
- A sigrok-compatible logic analyzer
- Claude Code
To check if your sigrok-cli has decoder support:
sigrok-cli --help | grep -q "\-P" && echo "Decoders available" || echo "Missing libsigrokdecode"If missing, you'll need to build libsigrokdecode and rebuild sigrok-cli. See Building from source below.
git clone https://github.com/jguy/sigrok-skill.git
cd sigrok-skill
mkdir -p ~/.claude/commands/sigrok
cp SKILL.md ~/.claude/commands/sigrok.md
cp devices/sipeed-slogic16u3.md ~/.claude/commands/sigrok/# Check device is detected
sigrok-cli --scan
# Check decoders work
sigrok-cli --protocol-decoders i2c --showThen in Claude Code, invoke with /sigrok or just ask about capturing signals.
The skill includes decode recipes for:
- I2C — with stacked decoders (EEPROM, sensors, etc.)
- SPI — configurable CPOL/CPHA/word size/bit order
- UART/Serial — configurable baud, parity, inversion
- JTAG — TCK/TMS/TDI/TDO mapping
- 1-Wire — link + network layer stacking
Plus access to all 132 sigrok protocol decoders (CAN, FlexRay, USB, IR, RF, ARM debug, and more).
If you're running sigrok-cli inside WSL, you need usbipd-win to forward the USB device. The scripts/ directory provides helpers:
# Attach the logic analyzer to WSL
./scripts/slogic-attach
# Detach it back to Windows
./scripts/slogic-detachEdit scripts/slogic.conf to set your device's VID:PID if using a different analyzer.
SKILL.md # Core skill — copy to ~/.claude/commands/sigrok.md
devices/
sipeed-slogic16u3.md # Device profile — copy to ~/.claude/commands/sigrok/
scripts/
slogic.conf # USB device config (VID:PID, device name)
slogic-attach # Bind + attach device to WSL via usbipd-win
slogic-detach # Detach device from WSL back to Windows
sigrok-cli-full-reference.md # Full sigrok-cli option reference (for humans)
- Connect the device and run
sigrok-cli -d <driver> --showto get capabilities - Create a profile at
devices/<device-name>.md(seedevices/sipeed-slogic16u3.mdas a template) with:- Driver name
- Supported sample rates
- Channel naming convention
- Voltage threshold range
- Trigger support
- Known quirks
- Copy it to
~/.claude/commands/sigrok/ - Add a scan-match entry in
SKILL.mdunder the "Detect device" workflow step
PRs with new device profiles are welcome!
If your distro's sigrok-cli package doesn't include protocol decoders, build from source:
# Dependencies (Ubuntu/Debian)
sudo apt install build-essential autoconf automake libtool pkg-config \
libglib2.0-dev python3-dev libusb-1.0-0-dev libzip-dev
# Build libsigrok
git clone git://sigrok.org/libsigrok
cd libsigrok && ./autogen.sh && ./configure && make -j$(nproc) && sudo make install
cd ..
# Build libsigrokdecode
git clone git://sigrok.org/libsigrokdecode
cd libsigrokdecode && ./autogen.sh && ./configure && make -j$(nproc) && sudo make install
cd ..
# Build sigrok-cli (will detect libsigrokdecode)
git clone git://sigrok.org/sigrok-cli
cd sigrok-cli && ./autogen.sh && ./configure && make -j$(nproc) && sudo make install
cd ..
sudo ldconfigVerify: sigrok-cli --help | grep "\-P" should show protocol decoder flags.
MIT