Skip to content
cccskills
FreePublished on GitHub

workflow

embeddedskills 的薄编排层,用于在当前 workspace 中发现工程、选择 build/flash/debug/observe 后端、串联 .embeddedskills/state.json,并聚合底层 skill 的结果。

当用户明确输入以下命令之一:"一键构建烧录"、"自动诊断"、"串起 build -> flash -> debug -> observe" 或显式调用 /workflow 时触发。

The English summary is being prepared. Showing the original description.

See how to install

Files included (6)

  • SKILL.md3.5 KB
  • config.example.json121 B
  • README.md2.1 KB
  • scripts/workflow_plan.py4.7 KB
  • scripts/workflow_run.py25.8 KB
  • scripts/workflow_runtime.py9.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Workflow 编排层

本 skill 不重复实现底层逻辑,只做发现、选择、串联和聚合。

支持 Keil / GCC / EIDE 三种构建后端,以及 jlink / openocd / probe-rs 三种 flash/debug/observe 后端。

observe 阶段当前会给出 jlink:rtt、jlink:swo、openocd:semihosting、openocd:itm、probe-rs:rtt 这几类候选观测后端。

命令

python <skill-dir>/scripts/workflow_plan.py --json
python <skill-dir>/scripts/workflow_run.py plan --json
python <skill-dir>/scripts/workflow_run.py build --json
python <skill-dir>/scripts/workflow_run.py build-flash --json
python <skill-dir>/scripts/workflow_run.py build-debug --json
python <skill-dir>/scripts/workflow_run.py observe --json
python <skill-dir>/scripts/workflow_run.py diagnose --json

配置说明

workflow 不再维护独立的工程配置结构,所有工程参数统一从 .embeddedskills/config.json 读取。

配置结构

.embeddedskills/config.json 中的 workflow 段仅包含首选后端配置:

{
  "workflow": {
    "preferred_build": "auto",
    "preferred_flash": "auto",
    "preferred_debug": "auto",
    "preferred_observe": "auto"
  }
}

workflow 通过读取 .embeddedskills/config.json 中其他 skill 的配置段来获取工程参数(如 keil.project、eide.project、eide.config、jlink.device、probe-rs.chip 等)。

参数解析顺序

按以下决策树依次判断,命中即停止:

  1. CLI 参数(优先级最高)

    • 条件:用户在命令行传入 --build-backend、--flash-backend 等参数
    • 示例:workflow_run.py build-flash --build-backend=keil --flash-backend=jlink
    • --build-backend 可选值:auto / keil / gcc / eide
    • 行为:直接使用该参数指定的后端,跳过后续步骤
  2. 配置文件(次优先)

    • 条件:CLI 未指定,且 .embeddedskills/config.json 的 workflow 段中对应 preferred_* 字段不为 "auto"
    • 示例:"preferred_build": "keil" → 使用 keil 作为构建后端
    • 行为:读取配置值并使用,跳过自动发现
  3. 自动发现(兜底)

    • 条件:CLI 未指定,且配置中 preferred_* 为 "auto" 或字段缺失
    • 示例:"preferred_flash": "auto" → 扫描 workspace 自动推断可用 flash 后端
    • 行为:枚举候选后端列表;若唯一则直接使用,若多个则返回列表请用户确认

成功执行后,实际使用的后端会自动写回 .embeddedskills/config.json 的 workflow 段。

规则

  • 发现多个工程或多个候选后端时,只返回候选列表,不自动猜测
  • 构建、烧录、调试、观测之间优先通过 .embeddedskills/state.json 串联
  • observe 只生成推荐命令,不在 workflow 内直接长时间占用观测通道
  • 失败时优先返回哪个阶段失败,以及底层脚本的结构化错误
  • workflow 与其他 Skill 的协同只通过 .embeddedskills/config.json、.embeddedskills/state.json 和子进程调用底层 Skill

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

can

Free

嵌入式 CAN / CAN-FD 调试工具,用于扫描接口、监控报文、发送测试帧、记录日志、数据库文件解码和总线统计。 当用户提到 CAN、CAN-FD、DBC 解码、总线抓包、USB-CAN 联调、报文发送、总线统计、 PCAN、Vector、slcan、CAN 接口扫描、CAN ID 过滤、ASC 日志、BLF 文件时自动触发, 也兼容 /can 显式调用。即使用户只是说"看看 CAN 报文"、"发一帧试试"或"解码一下 DBC", 只要上下文明确提到 CAN 总线通信的操作或问题就应触发此 skill。

The English summary is being prepared. Showing the original description.

zhinkgit/embeddedskills755Updated Sep 3, 2026

eide

Free

EIDE (Embedded IDE) 工程构建工具,用于扫描 .eide/eide.yml 工程、枚举构建 配置 (ConfigName)、执行 build/rebuild/clean 并解析构建日志,返回可供 jlink/openocd 复用的产物路径。当用户提到 EIDE、Embedded IDE、eide.yml、 unify_builder、VS Code EIDE 扩展、Cl.eide 时自动触发,也兼容 /eide 显式调用。 即使用户只是说"用 EIDE 编译一下"或"EIDE 烧录到板子上",只要上下文涉及 EIDE 嵌入式工程就应触发此 skill。

The English summary is being prepared. Showing the original description.

zhinkgit/embeddedskills755Updated Sep 3, 2026

gcc

Free

GCC 嵌入式工程构建工具(CMake + arm-none-eabi-gcc),用于扫描 CMake 型嵌入式工程、 列出预设、配置、编译、重建、清理和分析 ELF 大小。当用户提到 GCC、arm-none-eabi、 CMake 嵌入式编译、Ninja 构建、ELF 大小分析、arm-gcc、交叉编译、cmake --build、 cmake --preset 时自动触发,也兼容 /gcc 显式调用。即使用户只是说"编译一下"或 "看看固件多大",只要上下文涉及 CMake 嵌入式 GCC 工程就应触发此 skill。

The English summary is being prepared. Showing the original description.

zhinkgit/embeddedskills755Updated Sep 3, 2026

jlink

Free

J-Link 下载与在线调试工具,用于探测设备、烧录固件、读写内存、查看寄存器、复位目标、读取 RTT/SWO 日志, 以及在线调试(暂停/恢复/单步/断点运行/调用栈/变量查看)。 当用户提到 J-Link、JLink、RTT、烧录固件、写内存、读内存、寄存器查看、目标复位、探针连通性检查、 在线调试、单步、断点、调用栈时自动触发,也兼容 /jlink 显式调用。 即使用户只是说"烧录一下"、"看看 RTT 输出"或"调试一下",只要上下文涉及 J-Link 探针就应触发此 skill。

The English summary is being prepared. Showing the original description.

zhinkgit/embeddedskills755Updated Sep 3, 2026

keil

Free

Keil MDK 工程构建工具,用于扫描 .uvprojx/.uvproj/.uvmpw 工程、枚举 Target、执行 build/rebuild/clean 并解析构建日志,返回可供 jlink/openocd 复用的产物路径。 flash 子命令仅作为兼容入口保留。当用户提到 Keil、MDK、uVision、UV4、 Target 枚举、编译、重建、清理、烧录、下载固件、flash 时自动触发,也兼容 /keil 显式调用。 即使用户只是说"编译一下"或"烧录到板子上",只要上下文涉及嵌入式 Keil 工程就应触发此 skill。

The English summary is being prepared. Showing the original description.

zhinkgit/embeddedskills755Updated Sep 3, 2026

net

Free

嵌入式网络调试工具,用于发现接口、抓包、分析 pcap/pcapng、做连通性测试、端口扫描和流量统计。 当用户提到 Wireshark、tshark、Npcap、抓包、网络联调、端口扫描、连通性排查、pcap 分析、 网络接口、ping 测试、traceroute、流量统计、Modbus TCP、EtherNet/IP 等网络协议调试时自动触发, 也兼容 /net 显式调用。即使用户只是说"抓个包看看"、"扫一下端口"、"网络通不通"或"分析一下这个 pcap", 只要上下文中出现具体工具名(tshark、Wireshark、Npcap)、协议名(Modbus TCP、EtherNet/IP、ICMP 等)、 调试动作(抓包、端口扫描、连通性测试、ping、traceroute、流量统计、pcap 分析)或网络接口操作,就应触发此 skill。

The English summary is being prepared. Showing the original description.

zhinkgit/embeddedskills755Updated Sep 3, 2026

See all skills by zhinkgit

Report a problem with this skill