Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Jinchen-Yang/diansai-skillnpx agentmods add skills/jinchen-yang/diansai-skill/firmware-scaffoldWrote 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.
[](https://agentmods.dev/skills/jinchen-yang/diansai-skill/firmware-scaffold)<a href="https://agentmods.dev/skills/jinchen-yang/diansai-skill/firmware-scaffold"><img src="https://agentmods.dev/badge/skills/jinchen-yang/diansai-skill/firmware-scaffold/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.
<a href="https://agentmods.dev/skills/jinchen-yang/diansai-skill/firmware-scaffold"><img src="https://agentmods.dev/badge/skills/jinchen-yang/diansai-skill/firmware-scaffold.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00120 | $0.01050 |
| Opus 5.5 | $0.00048 | $0.00420 |
| Sonnet 5.5 | $0.00024 | $0.00210 |
| Haiku 4.5 | $0.00012 | $0.00105 |
Grade A, and why
firmware-scaffold 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 2mo 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.
What it actually says
firmware-scaffold —— 固件骨架(流水线 ⑦,控制 lane)
lane: 控制(DeepSeek/GLM 擅长代码) · 门: 编译 + 外设 init 人工核对
复用 KB kb/08-软件架构与调试工程化.md 的 4 层架构 + 裸机时间片调度 + FSM + VOFA,别另发明。控制参数(PID/阈值)一律占位待整定。
前置
design/solution.md、contracts/pinmap.yaml(pinmux PASS 过)、contracts/protocol.h(已生成)。
生成结构(写到 firmware/)
firmware/
README.md # 编译/烧录说明(指向 env/control.md),分层纪律
app/ app_mission.c # FSM 跑流程(取药→巡线→识别→送达→返航→停)
app_track.c # 循迹决策(灰度质心/K230偏差 → 外环PID)
middleware/ pid.{c,h} scheduler.{c,h} filter.{c,h} fsm.{c,h} vofa.{c,h} # 与芯片无关, 可主机编译
driver/ motor.{c,h} encoder.{c,h} imu.{c,h} k230_uart.{c,h} oled.{c,h} # 调 DriverLib, 据 pinmap
bsp/ pinmap.md # 由 pinmap.yaml 导出的引脚配置表(导入 SysConfig 用)
ti_msp_dl_config.placeholder # 提示用 SysConfig 生成
contracts/protocol.h # 从 ../../contracts/ 复制或软链(K230 收帧, 勿手改)
tests/ host_test.c # 主机可编译: 验 pid + scheduler + protocol 往返
步骤
- 中间件(可移植、可主机编译,先写实):
pid.c(位置式+增量式,抗积分饱和)、scheduler.c(KB08 时间片表)、fsm.c、vofa.c(JustFloat)。这些不依赖 MCU,必须能cc过并跑通单测。 - 驱动层(据 pinmap 出桩):
motor.c(PWM+方向, 引脚取自 pinmap 的 motor* 信号)、encoder.c(QEI)、k230_uart.c(用protocol.h的proto_parse_byte)、imu.c、oled.c。调 DriverLib 处标// TODO: SysConfig/DriverLib。 - 应用层:
app_mission.c用 KB08 的 FSM 模板(状态/事件分离),app_track.c外环 PID。 - bsp/pinmap.md:把
contracts/pinmap.yaml转成"引脚-功能-外设"表,供用户在 SysConfig 里照配(生成 .syscfg 需在 CCS 内做,这里出配置清单)。 - 协议:复制
contracts/protocol.h到firmware/contracts/(或软链),K230 收帧只用它。 - 主机自测:
tests/host_test.c编译运行,验 PID 阶跃、调度器节拍、protocol 往返。 - 门:
README写清编译/烧录(指 env/control.md);提醒用户逐项核对外设 init(时钟树/PWM 频率/ADC 采样/中断优先级)对照参考手册;所有 PID 增益/阈值是占位,须在真车整定。
异构模型友好
中间件/驱动是纯代码活,DeepSeek/GLM lane 可跑;正确性交编译 + host_test。控制环时序与电机安全逻辑(限流/急停)建议人写人审。
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.
- 2mo ago First seen · 40 lines · 120 tokens per session scan A bb8210c87d1b
firmware-scaffold is a skill published in the GitHub repository Jinchen-Yang/diansai-skill (12 stars, last pushed 3mo ago), licensed MIT. It adds 120 tokens to every session and 1,050 once invoked, about $0.0005 per session on Opus 5.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.
firmware-scaffold compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| firmware-scaffoldJinchen-Yang/diansai-skill | Skill | 12 | 3mo ago | MIT | A | 120 | Claude Code |
| mspm0-ccsmc3545dada/mspm0-skill | Skill | 378 | 3mo ago | MIT | A | 101 | Claude Code, Codex |
| mspm0-skillIbook000/mspm0-skill | Skill | 13 | 1mo ago | MIT | A | 76 | Claude Code, Codex |
| volt-otatonone-ai/tonone | Skill | 77 | 23d ago | MIT | A | 70 | Claude Code |
| volt-firmwaretonone-ai/tonone | Skill | 77 | 23d ago | MIT | A | 76 | Claude Code |
| agentic-hilagentic-hil/agentic-hil | Skill | 24 | yesterday | Apache-2.0 | A | 104 | Claude Code |
| iot-expertpersonamanagmentlayer/pcl | Skill | 44 | 11d ago | Apache-2.0 | A | 59 | Claude Code |