la

A command for capturing and decoding signals with a Saleae logic analyzer, a device that records electrical digital signals over time. It supports buses such as UART, SPI, and I2C, which are common ways chips communicate with peripherals.

In plain words
What is it for?
Use it to record digital or analog signals, decode communication protocols, export raw data, save and reload captures, create waveform plots, and test analyzer workflows with a simulated device.
Why use it?
It helps reveal timing and communication problems that are difficult to see from firmware logs alone. Captures can be saved, reused, exported, plotted, or simulated without hardware.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/jzl-maker/ea-skill/la
Clone the repo
git clone --depth 1 https://github.com/jzl-maker/EA-SKILL
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,273 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.02273
Opus 5 $0.00000 $0.01137
Sonnet 5 $0.00000 $0.00455
Haiku 4.5 $0.00000 $0.00227

Measured 2d ago against content hash abc536b846e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

la 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 2d 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.

commands/la.md · 109 lines

How it starts

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

命令: /ea la (逻辑分析仪)

功能

Saleae 逻辑分析仪(Logic 8 / Logic 16 / Pro 8 / Pro 16)抓取 + 协议解码,用于排查 UART/SPI/I2C 等总线时序。

能力 参数 底层 依赖
数字/模拟抓取 --capture Logic 2 Automation API Logic 2 软件 + logic2-automation
协议解码 --decoder add_analyzer + export_data_table 同上
原始数据导出 --export-raw export_raw_data_csv(写目录) 同上
捕获保存/复用 --save / --load save_capture / load_capture 同上
波形图 --plot numpy + matplotlib + numpy/matplotlib
无硬件自测 --simulate Logic 2 内置模拟设备 Logic 2 软件即可

与 jlink-debug 不同:这是唯一依赖第三方 pip 包 + 后台 GUI 软件的工具。Logic 2 软件需单独安装(winget install Saleae.Logic2 或官网下载),且抓取前需开启「脚本服务器」。

调用方式

py ~/.claude/skills/ea-skill/tools/instrument/scripts/logic_analyzer.py --detect
# ✅ 确认依赖 / Logic 2 软件 / 脚本端口 10430

# 无硬件自测:模拟设备抓 0.5s + I2C 解码 + 出图
py .../logic_analyzer.py --simulate --capture --duration 0.5 \
  --decoder "i2c:SCL=0,SDA=1" --export-raw --save sim.sal --plot la.png

# 真实抓取:4 通道 10M 采样 2s + UART 解码
py .../logic_analyzer.py --capture --channels 0,1,2,3 --sample-rate 10000000 \
  --duration 2 --decoder "uart:TX=0,RX=1,Bit Rate (Bits/s)=115200" --export-raw

# 复用已有 .sal 重新解码
py .../logic_analyzer.py --load trace.sal --decoder "spi:CLK=0,MOSI=1,MISO=2"

# 纯逻辑核对(不碰设备,打印将执行的 API 序列)
py .../logic_analyzer.py --dry-run --capture --decoder "spi:CLK=0,MOSI=1,MISO=2,Enable=3"

参数表

参数 必须 说明
--detect 是(动作) 探测依赖 / Logic 2 软件 / 端口 / 设备
--list-devices 是(动作) 列出已连接设备(含模拟设备)
--list-analyzer-types 是(动作) 常用解码器类型速查
--capture 是(动作,默认) 抓取主流程
--load <file.sal> 是(动作) 加载已有捕获做解码/导出
--channels 0,1,2,3 数字通道(默认 0..7)
--sample-rate 数字采样率 Hz(默认 10M;Logic 8 ≤100M,Pro 单通道 ≤500M)
--duration 抓取时长秒(默认 1.0,TimedCaptureMode)
--threshold Pro 系列阈值档位 1.2/1.8/3.3 V(Logic 8/16 忽略,用默认档位)
--analog-channels 使能模拟通道(Logic 8 / Pro 8 支持)
--decoder <TYPE:K=V,...> 添加解码器,可重复
--export-raw 导出原始数据 CSV(写目录)
--export-dir 导出目录(默认 <STATE_DIR>/captures/la_<ts>/
--save <file.sal> 保存 .sal 捕获文件
--plot [file.png] 波形图 png(默认 la_waveform.png)
--port Logic 2 脚本端口(默认 10430)
--launch Logic 2 未运行时自动启动
--simulate 内置模拟设备(无硬件自测)
--logic2-path 显式指定 Logic 2 可执行文件
--device 多设备时按名/ID 过滤
--dry-run 只打印 API 调用序列,不连接
--json 结构化 JSON 输出(供 AI 解析)

Read the full file on GitHub · 109 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. 2d ago First seen · 109 lines · 0 tokens per session scan A abc536b846e1

Subscribe to this mod's changes

la is a command published in the GitHub repository jzl-maker/EA-SKILL (6 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,273 tokens. 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-31.