Skip to content

Keil MDK project build tool that scans uvprojx/uvproj/uvmpw projects, enumerates targets, and runs build, rebuild, or clean.

CCM score
56 of 100
skills.sh installs
984
GitHub stars
815
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers scanning for .uvprojx, .uvproj, and .uvmpw projects, enumerating Targets, and running build, rebuild, and clean through UV4.exe
  • Parses build logs and returns artifact paths such as flash_file and debug_file for reuse by jlink or openocd
  • Enforces a rule that flash is allowed only after a clean build, and never guesses project or Target when ambiguous
  • Designed for embedded engineers working on Keil MDK firmware projects on Windows with Python 3.10 or newer

Install

$ npx -y skills add zhinkgit/embeddedskills --skill keil -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Keil MDK 工程构建

本 skill 提供 Keil MDK 工程的发现、Target 枚举、构建、重建、清理能力,并返回可供 jlink/openocd 继续使用的固件产物路径。flash 仅作为兼容入口保留。

运行依赖

Windows、Python 3.10+ 和 Keil MDK 的 UV4.exe。

配置

环境级配置(skill/config.json)

skill 目录下的 config.json(可按需从 config.example.json 复制创建)包含环境级配置,工具未加入 PATH 或默认安装目录时可在此配置 uv4_exe:

{
  "uv4_exe": "C:\\Keil_v5\\UV4\\UV4.exe",
  "operation_mode": 1
}
  • uv4_exe:UV4.exe 完整路径(必填)
  • operation_mode:1 直接执行 / 2 输出风险摘要但不阻塞 / 3 执行前确认

工程级配置(workspace/.embeddedskills/config.json)

工程级共享配置统一保存在工作区的 .embeddedskills/config.json 中:

{
  "keil": {
    "project": "",
    "target": "",
    "log_dir": ".embeddedskills/build"
  }
}
  • project:默认工程路径(相对 workspace),构建成功后会自动更新
  • target:默认 Target 名称,构建成功后会自动更新
  • log_dir:构建日志输出目录,默认 .embeddedskills/build

参数解析优先级

参数解析顺序(从高到低):

  1. CLI 显式参数
  2. 工程级配置(.embeddedskills/config.json)
  3. .embeddedskills/state/keil.json(上次构建记录)
  4. 搜索/询问

工具路径依次读取 CLI、本机配置和 PATH。

子命令

Details

Repository
github.com/zhinkgit/embeddedskills
First seen
Jun 3, 2026

Questions

What does the keil skill do for an embedded project?

The keil skill scans for .uvprojx, .uvproj and .uvmpw Keil MDK projects, lists their Targets, and runs build, rebuild and clean. It parses the build log and returns firmware artifact paths such as the hex and axf files for use with jlink or openocd.

How do I install the keil skill?

Run npx -y skills add zhinkgit/embeddedskills --skill keil -y in your project. Once installed, the agent can build Keil MDK projects when you ask it to compile, rebuild or clean them.

What does the keil skill need to run?

It needs Windows, Python 3.10 or newer, and the UV4.exe from Keil MDK. If UV4.exe is not on the PATH or in the default install folder, set its full path as uv4_exe in the skill's config.json.

Can the keil skill flash firmware to a board?

The flash subcommand is kept only as a compatibility entry, and the skill recommends using jlink or openocd for flashing. Flash runs only after the last build finished with zero errors.

More from zhinkgit/embeddedskills

All 9

Similar to Keil