flash

flash is a command for Claude Code from jzl-maker/EA-SKILL. It costs 0 tokens per session (2,266 once invoked), scanned A, original, MIT.

A command for writing firmware to a microcontroller using OpenOCD, a tool that programs chips through a connected debugging probe.

In plain words
What is it for?
Use it to detect the connected probe, write an AXF or ELF build file to the chip, choose the probe and chip configuration, and diagnose connection or configuration errors.
Why use it?
It first checks whether OpenOCD and the probe are available, then reports whether writing and verification succeeded and groups common failures for troubleshooting.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it to detect the connected probe, write an AXF or ELF build file to the chip, choose the probe and chip configuration, and diagnose connection or configuration errors.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jzl-maker/ea-skill/flash
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.

Clone the repo
git clone --depth 1 https://github.com/jzl-maker/EA-SKILL

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flash

README.md
[![agentmods](https://agentmods.dev/badge/commands/jzl-maker/ea-skill/flash/github.svg)](https://agentmods.dev/commands/jzl-maker/ea-skill/flash)
Your own site
<a href="https://agentmods.dev/commands/jzl-maker/ea-skill/flash"><img src="https://agentmods.dev/badge/commands/jzl-maker/ea-skill/flash/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flash

Your own site · 80×15
<a href="https://agentmods.dev/commands/jzl-maker/ea-skill/flash"><img src="https://agentmods.dev/badge/commands/jzl-maker/ea-skill/flash.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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,266 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.02266
Opus 5.5 $0.00000 $0.00906
Sonnet 5.5 $0.00000 $0.00453
Haiku 4.5 $0.00000 $0.00227

Measured 1mo ago against content hash 16efe2944e3b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

flash 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 1mo 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/flash.md · 157 lines

How it starts

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

命令: /ea flash (烧录)

功能

烧录固件到 MCU。两条通道:

通道 工具 适用
--backend openocd(默认) OpenOCD ST-Link / CMSIS-DAP / DAPLink
--backend jlink-native JLink.exe J-Link 探针——Windows 上装了 SEGGER 驱动时,OpenOCD 用不了 J-Link(见下)

先探测环境

# OpenOCD 通道
python <SKILL>/tools/flash-openocd/scripts/openocd_flasher.py --detect

# J-Link 通道(确认 JLink.exe 在位)
python <SKILL>/tools/jlink-debug/scripts/jlink_debug.py --detect

调用方式

OpenOCD 通道(ST-Link / CMSIS-DAP / DAPLink):

python <SKILL>/tools/flash-openocd/scripts/openocd_flasher.py \
  --artifact <产物路径> \
  --interface stlink \
  --target target/stm32f4x.cfg

J-Link 原生通道(--backend jlink-native,烧录后独立回读比对):

python <SKILL>/tools/flash-openocd/scripts/openocd_flasher.py \
  --backend jlink-native \
  --artifact build/app.hex \
  --device N32G4FRRE

# 只回读校验(不烧),或看将要执行什么
python <SKILL>/tools/flash-openocd/scripts/openocd_flasher.py \
  --backend jlink-native --artifact build/app.hex --verify-only

.bin 必须给 --base-address 0x08000000(BIN 自身不含地址信息,工具拒绝猜)。 .hex / .elf / .axf 自带地址,无需。加 --json 输出机读结论。

参数来源

参数 来源
--artifact 从 build-keil 的产物路径获取(AXF/ELF/HEX)
--interface 从 --detect 探测结果获得(stlink/jlink/cmsis-dap)
--target 根据芯片型号选择(GD32F407 → target/stm32f4x.cfg)
--backend 探针是 J-Link → jlink-native;其余 → openocd
--device jlink-native 专用,芯片型号(默认 N32G4FRRE)
--settle jlink-native 专用,编程后静置秒数(默认 10)。别调 0,除非你确定板子不需要(见「编程后不能立刻回读」)

结果处理

字段 检查要点
烧录状态 success / failure
校验状态 verified / skipped
失败分类 connection-failure / target-response-abnormal / project-config-error

自动决策

  • 烧录成功 → 提示下一步(串口观察启动日志)
  • 烧录失败 → 根据失败分类引导排查

常见错误

错误类型 原因 解决方案
connection-failure 调试器未连接或驱动问题 检查调试器连接、USB驱动
target-response-abnormal 芯片未进入调试模式 检查芯片供电、复位电路
project-config-error target 配置文件与芯片不匹配 检查 --target 参数
Unsupported transport --interface 参数错误 使用正确的接口类型 (stlink/jlink/cmsis-dap)
LIBUSB_ERROR_NOT_SUPPORTED + No J-Link device found SEGGER 驱动占着 USB,OpenOCD 的 libusb 后端拿不到句柄 换 --backend jlink-native。不要试 transport select swd —— 见下
Verification failed @ 0x08000000(J-Link) 多为误报(回读与产物逐字节一致) 用 --backend jlink-native,工具会自己给结论,不要手工比 MD5

Read the full file on GitHub · 157 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. 1mo ago Changed 16efe2944e3b
  2. 1mo ago Changed · +78 lines 86aaa1c05551
  3. 1mo ago Changed · +16 lines c1d70a30bb9d
  4. 1mo ago First seen · 63 lines · 0 tokens per session scan A e248784be630

Subscribe to this mod's changes

flash is a command published in the GitHub repository jzl-maker/EA-SKILL (9 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,266 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.