cubemx

cubemx is a skill for Claude Code, Codex from ProfYangShengXu/nuedc-skills. It costs 70 tokens per session (4,086 once invoked), scanned A, original, MIT.

A workflow for configuring STM32 microcontrollers with STM32CubeMX, ST's tool for assigning pins, setting clocks and peripherals, and generating starter projects.

In plain words
What is it for?
Use it to configure STM32 pins, clocks, peripherals, and middleware, then generate a project or automate CubeMX tasks from the command line.
Why use it?
It provides a structured path from hardware settings to a buildable Keil, Makefile, GCC, or STM32CubeIDE project.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it to configure STM32 pins, clocks, peripherals, and middleware, then generate a project or automate CubeMX tasks from the command line.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/profyangshengxu/nuedc-skills/cubemx
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.

Any agent
npx skills add ProfYangShengXu/nuedc-skills --skill cubemx
Clone the repo
git clone --depth 1 https://github.com/ProfYangShengXu/nuedc-skills

Made for: Claude Code, Codex.

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 cubemx

README.md
[![agentmods](https://agentmods.dev/badge/skills/profyangshengxu/nuedc-skills/cubemx/github.svg)](https://agentmods.dev/skills/profyangshengxu/nuedc-skills/cubemx)
Your own site
<a href="https://agentmods.dev/skills/profyangshengxu/nuedc-skills/cubemx"><img src="https://agentmods.dev/badge/skills/profyangshengxu/nuedc-skills/cubemx/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 cubemx

Your own site · 80×15
<a href="https://agentmods.dev/skills/profyangshengxu/nuedc-skills/cubemx"><img src="https://agentmods.dev/badge/skills/profyangshengxu/nuedc-skills/cubemx.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,086 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.00070 $0.04086
Opus 5 $0.00035 $0.02043
Sonnet 5 $0.00014 $0.00817
Haiku 4.5 $0.00007 $0.00409

Measured 11d ago against content hash 623b6be1928b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

cubemx 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 11d 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.

.reasonix/skills/cubemx/SKILL.md · 441 lines

How it starts

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

STM32CubeMX MCU 配置与代码生成全能技能

STM32CubeMX 6.x — ST 官方图形化 MCU 配置工具,电赛 STM32 项目起点 选型 → 引脚分配 → 时钟树 → 外设 → 中间件 → 一键生成 Keil / Makefile / STM32CubeIDE 工程


📦 一、下载与安装

1.1 下载

来源 地址
ST 官网 https://www.st.com/en/development-tools/stm32cubemx.html
ST 中文 https://www.st.com.cn/zh/development-tools/stm32cubemx.html

⚠️ ST 官网下载需要注册 ST 账号(免费)。点击 "Get Software" → 登录 → 下载。

备用下载(无需登录,各版本独立链接):

# STM32CubeMX 6.13.0 (约 450MB)
https://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-configurators-and-code-generators/stm32cubemx.html#get-software

1.2 安装步骤

1. 运行 SetupSTM32CubeMX-6.x.x.exe
2. Next → Accept License
3. 选择安装路径 (默认 C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\)
4. 勾选:
   ☑ STM32CubeMX            — 主程序
   ☑ STM32Cube MCU Packages — MCU 支持包(按需选)
   ☐ STM32CubeIDE            — 如果已有 Keil 则不需要
5. 等待安装 (5-10 分钟)
6. ✔ 完成

1.3 验证安装

:: CubeMX2 CLI 版本
D:\cubemx\.bin\cube.exe --version
:: → cube wrapper version: 0.10.2

:: 启动 CubeMX2 GUI
D:\cubemx\.bin\cube.exe mx start

:: 查看所有命令
D:\cubemx\.bin\cube.exe --help
D:\cubemx\.bin\cube.exe mx --help

1.4 安装 MCU 包

:: STM32CubeMX 首次启动会自动提示安装 MCU Pack
:: 也可手动下载: https://www.st.com/en/embedded-software/stm32cube-mcu-packages.html

:: 电赛常用 MCU 包:
::  - STM32F1  (F103C8T6/C8T6/RCT6)
::  - STM32F4  (F407VGT6/F411CEU6)
::  - STM32G0  (G030F6P6/G071RBT6)
::  - STM32H7  (H743VIT6/H750VBT6)

🛠 二、CLI 命令与自动化

2.1 启动 CubeMX2

:: 启动 CubeMX2 (GUI + Backend Server)
D:\cubemx\.bin\cube.exe mx start

:: 启动时自动打开项目
D:\cubemx\.bin\cube.exe mx start D:\projects\nuedc_test\nuedc_test.ioc

:: 指定端口启动(CLI 需要连这个端口)
D:\cubemx\.bin\cube.exe mx start --port 5123

2.2 CLI 命令速查(CubeMX2)

:: 通用格式: cube mx <command> [options]

:: 项目管理
cube mx project create-from-mcu --cpn STM32F103C8Tx --project-location . --project-name my_project --port 5123
cube mx project save     --port 5123
cube mx project close    --port 5123

:: 查看支持的 MCU
cube mx finder device list   --port 5123
cube mx finder device info STM32F103C8Tx  --port 5123

:: 代码生成
cube mx ide-project list-toolchain   --port 5123
cube mx ide-project list-format      --port 5123
cube mx ide-project set-format --format "MDK-ARM V5" --port 5123
cube mx ide-project generate         --port 5123

:: 引脚/时钟/外设配置(CLI)
cube mx pinout       --port 5123
cube mx clock        --port 5123
cube mx peripherals  --port 5123
cube mx nvic         --port 5123
cube mx dma          --port 5123

Read the full file on GitHub · 441 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. 11d ago First seen · 441 lines · 70 tokens per session scan A 623b6be1928b

Subscribe to this mod's changes

cubemx is a skill published in the GitHub repository ProfYangShengXu/nuedc-skills (2 stars, last pushed 28d ago), licensed MIT. It adds 70 tokens to every session and 4,086 once invoked, about $0.0003 per session on Opus 5. 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.