/protocol-analysis
Protocol analysis skill for serial bus debugging. Use when decoding I2C/SPI/UART with logic analyzer concepts, sigrok/PulseView, or Python capture scripts. Activates on queries about logic analyzer, sigrok, PulseView, decode I2C SPI UART, or bus protocol capture.
$ npx -y skills add mohitmishra786/low-level-dev-skills --skill protocol-analysis --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/protocol-analysis
Context preview
The summary Claude sees to decide when to auto-load this skill.
Protocol analysis skill for serial bus debugging. Use when decoding I2C/SPI/UART with logic analyzer concepts, sigrok/PulseView, or Python capture scripts. Activates on queries about logic analyzer, sigrok, PulseView, decode I2C SPI UART, or bus protocol capture.
SKILL.md
protocol-analysis.SKILL.mdname: protocol-analysis
description: Protocol analysis skill for serial bus debugging. Use when decoding I2C/SPI/UART with logic analyzer concepts, sigrok/PulseView, or Python capture scripts. Activates on queries about logic analyzer, sigrok, PulseView, decode I2C SPI UART, or bus protocol capture.
Protocol Analysis (I2C / SPI / UART)
Purpose
Guide agents through software-side serial bus analysis: logic analyzer workflow, sigrok/PulseView decoding, correlating captures with firmware drivers, and Python-based parsing — bridging `skills/baremetal/spi-i2c-baremetal` and hardware bring-up.
When to Use
- Sensor not responding — verify clock and data on bus
- Compare kernel driver transactions vs datasheet
- Document expected transaction format for CI/regression
- Teaching protocol layers without expensive lab gear (sim + decode)
Workflow
1. Capture stack
Physical probe → logic analyzer hardware (or GPIO bit-bang)
├── sigrok-cli / PulseView GUI
├── Protocol decoder (i2c, spi, uart)
└── Export VCD/CSV for scripts
Open-source: [sigrok](https://sigrok.org/) with cheap FX2LA boards.
2. PulseView quick start
# List devices
pulseview
# CLI capture (device-dependent)
sigrok-cli --driver fx2lafw --config samplerate=1MHz \
--channels 0=SDA,1=SCL \
--samples 1m \
--protocols i2c
3. I2C decode expectations
| Phase | Lines | |-------|-------| | START | SDA fall while SCL high | | Address + R/W | 7 bits + ACK | | Data bytes | ACK per byte | | STOP | SDA rise while SCL high |
NACK at address → wrong `0x48` or device held in reset.
4. SPI decode
Check mode (CPOL/CPHA), bit order (MSB first typical), CS polarity, and word size. Compare to `spi_setup()` in `skills/kernel-dev/bus-drivers-i2c-spi`.
5. UART decode
Set baud (9600/115200), frame (8N1), and signal polarity. Async — sample rate must be ≥ 4× baud for LA.
6. Python post-process (csv)
import csv
with open("capture.csv") as f:
for ts, ch0, ch1 in csv.reader(f):
# edge detect, reconstruct bits
pass7. Correlate with firmware
Logic capture timestamp
├── Match driver reg write sequence
├── Compare inter-byte delay vs datasheet max
└── Flag extra clock pulses (mode fault)
8. Agent usage
/protocol-analysis Decode this I2C capture — device NACKs after register 0x0F write
Common Problems
| Symptom | Cause | Fix | |---------|-------|-----| | Garbage decode | Wrong samplerate | ≥ 4× bus speed | | Floating lines | Missing pull-ups | Enable internal pull or external | | SPI shifted bits | Mode mismatch | CPOL/CPHA table from RM | | UART framing errors | Baud drift | Measure actual bit time | | No decoder | Missing sigrok build | Install `sigrok-cli` + decoders |
Related Skills
- `skills/baremetal/spi-i2c-baremetal` — firmware-side protocol
- `skills/baremetal/uart-serial-baremetal` — UART config
- `skills/kernel-dev/bus-drivers-i2c-spi` — kernel transactions
- `skills/profilers/strace-ltrace` — userspace syscall trace analog
- `skills/embedded/openocd-jtag` — scope alongside SWD debug
Read more
name: protocol-analysis description: Protocol analysis skill for serial bus debugging. Use when decoding I2C/SPI/UART with logic analyzer concepts, sigrok/PulseView, or Python capture scripts. Activates on queries about logic analyzer, sigrok, PulseView, decode I2C SPI UART, or bus protocol capture.
Protocol Analysis (I2C / SPI / UART)
Purpose
Guide agents through software-side serial bus analysis: logic analyzer workflow, sigrok/PulseView decoding, correlating captures with firmware drivers, and Python-based parsing — bridging `skills/baremetal/spi-i2c-baremetal` and hardware bring-up.
When to Use
- Sensor not responding — verify clock and data on bus
- Compare kernel driver transactions vs datasheet
- Document expected transaction format for CI/regression
- Teaching protocol layers without expensive lab gear (sim + decode)
Workflow
1. Capture stack
Physical probe → logic analyzer hardware (or GPIO bit-bang) ├── sigrok-cli / PulseView GUI ├── Protocol decoder (i2c, spi, uart) └── Export VCD/CSV for scripts
Open-source: [sigrok](https://sigrok.org/) with cheap FX2LA boards.
2. PulseView quick start
# List devices pulseview # CLI capture (device-dependent) sigrok-cli --driver fx2lafw --config samplerate=1MHz \ --channels 0=SDA,1=SCL \ --samples 1m \ --protocols i2c
3. I2C decode expectations
| Phase | Lines | |-------|-------| | START | SDA fall while SCL high | | Address + R/W | 7 bits + ACK | | Data bytes | ACK per byte | | STOP | SDA rise while SCL high |
NACK at address → wrong `0x48` or device held in reset.
4. SPI decode
Check mode (CPOL/CPHA), bit order (MSB first typical), CS polarity, and word size. Compare to `spi_setup()` in `skills/kernel-dev/bus-drivers-i2c-spi`.
5. UART decode
Set baud (9600/115200), frame (8N1), and signal polarity. Async — sample rate must be ≥ 4× baud for LA.
6. Python post-process (csv)
import csv
with open("capture.csv") as f:
for ts, ch0, ch1 in csv.reader(f):
# edge detect, reconstruct bits
pass7. Correlate with firmware
Logic capture timestamp ├── Match driver reg write sequence ├── Compare inter-byte delay vs datasheet max └── Flag extra clock pulses (mode fault)
8. Agent usage
/protocol-analysis Decode this I2C capture — device NACKs after register 0x0F write
Common Problems
| Symptom | Cause | Fix | |---------|-------|-----| | Garbage decode | Wrong samplerate | ≥ 4× bus speed | | Floating lines | Missing pull-ups | Enable internal pull or external | | SPI shifted bits | Mode mismatch | CPOL/CPHA table from RM | | UART framing errors | Baud drift | Measure actual bit time | | No decoder | Missing sigrok build | Install `sigrok-cli` + decoders |
Related Skills
- `skills/baremetal/spi-i2c-baremetal` — firmware-side protocol
- `skills/baremetal/uart-serial-baremetal` — UART config
- `skills/kernel-dev/bus-drivers-i2c-spi` — kernel transactions
- `skills/profilers/strace-ltrace` — userspace syscall trace analog
- `skills/embedded/openocd-jtag` — scope alongside SWD debug
A curated suite of AI agent skills for systems and low-level programming — C/C++, Rust, Zig, GPU, bare-metal firmware, Linux kernel/driver development, computer architecture, compiler internals, HPC, and more.
Repo: mohitmishra786/low-level-dev-skills
Other skills on low-level-dev-skills.
- /custom-allocators
Custom allocator skill for memory allocation strategies. Use when implementing pool/slab/arena allocators, tuning jemalloc/mimalloc, writing Rust GlobalAlloc, or benchmarking allocator performance. Activates on queries about jemalloc, mimalloc, tcmalloc, arena allocator,
Open skill - /numa-programming
NUMA programming skill for multi-socket memory locality. Use when detecting NUMA topology, binding processes with numactl, using libnuma API, building NUMA-aware data structures, or measuring remote access penalties. Activates on queries about numactl, libnuma, NUMA topology,
Open skill - /af-xdp
AF_XDP skill for high-performance XDP sockets. Use when creating AF_XDP sockets, configuring UMEM and XSK rings, XDP_REDIRECT programs, copy vs zero-copy mode, or comparing with DPDK. Activates on queries about AF_XDP, xsk_umem, XDP_REDIRECT, libbpf xsk, or zero-copy XDP.
Open skill - /dpdk
DPDK skill for userspace packet I/O. Use when initializing EAL, configuring PMD drivers, using mbuf pools and rte_ring, setting up huge pages, RSS, or testpmd validation. Activates on queries about DPDK, EAL, rte_eth_rx_burst, hugepages, PMD, or testpmd.
Open skill - /io-uring
io_uring skill for Linux async I/O. Use when building high-performance servers with liburing, multi-shot operations, provided buffers, fixed files, zero-copy send, or tokio-uring. Activates on queries about io_uring, SQE/CQE, liburing, IORING_OP_PROVIDE_BUFFERS, or io_uring vs
Open skill - /adc-dac-baremetal
Bare-metal ADC and DAC skill. Use when configuring analog sampling, DMA-driven ADC, calibration, or DAC output on MCUs. Activates on queries about ADC bare-metal, sampling time, DMA ADC, or DAC channel setup.
Open skill

