This is a build orchestrator for Keil MDK embedded projects that scans for .uvprojx files, enumerates targets, runs build/rebuild/clean operations, and parses the logs to extract artifact paths. It's designed to sit between your Keil toolchain and downstream flashers like jlink or openocd, giving you structured JSON output instead of raw UV4 console noise. The configuration cascades from environment to workspace to CLI args, and it refuses to guess when multiple projects or targets exist, which is the right call. One thing to know: it won't modify your project files and blocks flashing if the last build had errors. Useful if you're automating Keil workflows or just tired of hunting through build logs for the hex file path.

skills.sh installs
902
GitHub stars
791
last updated
Aug 21, 2026

Install

$ npx -y skills add zhinkgit/embeddedskills --skill keil --agent claude-code

Installs into .claude/skills of the current project.

Files

Keil MDK 工程构建

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

配置

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

skill 目录下的 config.json 包含环境级配置,首次使用前确认 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. 环境级配置(skill/config.json)
  3. 工程级配置(.embeddedskills/config.json)
  4. .embeddedskills/state.json(上次构建记录)
  5. 搜索/询问

子命令

子命令用途风险
scan搜索当前目录下的 .uvprojx/.uvproj/.uvmpw 工程低
targets枚举工程中的 Target低
build增量编译中
rebuild全量重建中
clean清理工程高
flash通过 Keil 烧录固件(兼容入口,优先建议使用 jlink/openocd)高

执行流程

Sponsors

Details

Repository
github.com/zhinkgit/embeddedskills
Category
DevOps & CI/CD
First seen
Jun 3, 2026

More from zhinkgit/embeddedskills

All 9
1circlefin avatarswap-tokenscirclefin/skillsBuild token swap functionality with Circle App Kit or standalone Swap Kit SDKs. App Kit (@circle-fin/app-kit) is an all-inclusive SDK covering swap, bridge, and894skills.sh installs
2adobe avatarcontent-distributionadobe/skillsAEM as a Cloud Service content distribution and replication. Covers programmatic publishing using the Replication API and distribution event monitoring using Sl890skills.sh installs
3pulumi avatarprovider-upgradepulumi/agent-skillsUpgrade any Pulumi provider to a newer version and reconcile the resulting diff. Use when users want to upgrade or update a provider (including editing package.885skills.sh installs
4zubair-trabzada avatargeo-prospectzubair-trabzada/geo-seo-claudeCRM-lite for managing GEO agency prospects and clients. Track leads through the full sales pipeline: Lead → Qualified → Proposal Sent → Won → Lost. Store audit 881skills.sh installs
5alirezarezvani avatarcold-emailalirezarezvani/claude-skillsWhen the user wants to write, improve, or build a sequence of B2B cold outreach emails to prospects who haven't asked to hear from them. Use when the user menti879skills.sh installs
6prompt-security avatarclawsec-suiteprompt-security/clawsecClawSec suite manager with embedded advisory-feed monitoring, cryptographic signature verification, approval-gated malicious-skill response, and guided setup fo875skills.sh installs