setup

A one-time setup command for preparing the embedded-development environment. It configures allowed actions, finds tools such as Keil, OpenOCD, and J-Link, can download OpenOCD, and registers command references for common embedded tasks.

In plain words
What is it for?
Use it before working with the embedded workflow to configure permissions, detect tool paths, install OpenOCD when needed, and connect keywords such as compiling, flashing, serial output, and debugging to the relevant commands.
Why use it?
It removes repeated manual setup and makes the required development tools easier for the workflow to find. It also sets restrictions around scripts and project-state files.

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/setup
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 1,667 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.01667
Opus 5 $0.00000 $0.00834
Sonnet 5 $0.00000 $0.00333
Haiku 4.5 $0.00000 $0.00167

Measured yesterday against content hash 076e1c8e5e31, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

setup scanned grade B with 1 finding 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 yesterday.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

自动更新 `~/.claude/settings.json`,追加脚本执行权限:
commands/setup.md · 142 lines

How it starts

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

命令: /ea setup (环境/工具初始化)

功能

初始化 EA-SKILL 开发环境,一次配置长期有效:

  1. 更新 Claude 权限配置(允许脚本执行 / 状态文件编辑,禁止危险操作)
  2. 探测并注册工具路径(Keil UV4 / OpenOCD / J-Link)
  3. 自动下载 OpenOCD(如果未安装)
  4. 注册全局 CLAUDE.md 触发器(编译/烧录/串口/RTT/断点 关键词 → 命令文档指针)

触发

/ea setup

执行流程

步骤 1: 更新权限配置

自动更新 ~/.claude/settings.json,追加脚本执行权限:

"permissions": {
  "allow": [
    "Read", "Glob", "Grep", "Search",
    "Bash(git:status)", "Bash(git:diff)",
    "Bash(ls:*)",
    "Edit(**/.ea/**/*.md)", "Write(**/.ea/**/*.md)",
    "Edit(**/.em/**/*.md)", "Write(**/.em/**/*.md)",
    "Bash(python:*)",
    "Bash(python */ea-skill/tools/build-keil/*.py)",
    "Bash(python */ea-skill/tools/flash-openocd/*.py)",
    "Bash(python */ea-skill/tools/serial-monitor/*.py)",
    "Bash(python */ea-skill/tools/jlink-debug/*.py)",
    "Bash(py */ea-skill/tools/svd/*.py)",
    "Bash(py */ea-skill/tools/instrument/*.py)",
    "Bash(py */ea-skill/tools/resource/*.py)",
    "Bash(py -m pip install *)",
    "Bash(python */ea-skill/tools/shared/*.py)"
  ],
  "ask": [
    "Write(**/.ea/discussion/**/*.md)",
    "Edit(**/.ea/discussion/**/*.md)"
  ],
  "deny": [
    "Bash(rm:*)", "Bash(sudo:*)", "Bash(git push:*)"
  ]
}

步骤 2: 探测工具路径

python ea-skill/tools/shared/detect_tools.py

找到的工具自动注册到 %APPDATA%/ea_skill/config.json(工作区级 .ea_skill.json 可覆盖)。

步骤 3: 注册工具

工具 config key 必须 说明
OpenOCD openocd ✅ 必须 烧录工具(未安装则自动下载)
Keil UV4 uv4 ✅ 必须 编译工具(用户手动指定)
J-Link jlink 可选 烧录 + 调试工具(debug 命令需要)
Logic 2 logic2 可选 Saleae 逻辑分析仪软件(la 命令需要,探测到即注册)

未找到的工具:OpenOCD → 自动下载;Keil UV4 → 提示用户手动指定;其余 → 提示手动指定。

仪器工具(/ea la /ea scope,可选)

la(Saleae 逻辑分析仪)与 scope(Rigol 示波器)依赖第三方 pip 包与硬件后端,按需启用:

# 探测依赖与后端(Logic 2 软件 / 端口 / VISA 资源)
py ~/.claude/skills/ea-skill/tools/instrument/scripts/deps_check.py --detect
# 缺 pip 包时安装(重依赖,确认后执行)
py ~/.claude/skills/ea-skill/tools/instrument/scripts/deps_check.py --install
  • pip 依赖logic2-automation / pyvisa / pyvisa-py / numpy / matplotlib
  • Logic 2 软件(非 pip):Saleae 官网下载或 winget install Saleae.Logic2;探测到即注册 logic2 工具路径
  • Rigol 示波器:USB 直连需 USB-TMC 驱动(Zadig 装 WinUSB),或用系统 VISA 后端
  • 无硬件自测:/ea la --simulate(模拟设备)、/ea scope --parse-tmc(合成 TMC 块)

Read the full file on GitHub · 142 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. yesterday First seen · 142 lines · 0 tokens per session scan B 076e1c8e5e31

Subscribe to this mod's changes

setup is a command published in the GitHub repository jzl-maker/EA-SKILL (4 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,667 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.