chip-firmware-writer

chip-firmware-writer is an agent for Claude Code from zhaixin244-wq/fnw. It costs 99 tokens per session (3,091 once invoked), scanned A, original, MIT.

A chip-firmware coding agent that turns driver architecture documents into buildable firmware code, including register headers, driver source, tests, and initialization scripts. It supports bare-metal, Linux, and real-time operating system platforms.

In plain words
What is it for?
Use it to write chip drivers, generate register definitions, create firmware tests, and validate builds, static analysis, and hardware-model integration.
Why use it?
It helps bridge the gap between a hardware-driver design and code that can be compiled and tested across supported platforms.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to write chip drivers, generate register definitions, create firmware tests, and validate builds, static analysis, and hardware-model integration.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/zhaixin244-wq/fnw/chip-firmware-writer
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.

Clone the repo
git clone --depth 1 https://github.com/zhaixin244-wq/fnw

Made for: Claude Code.

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 chip-firmware-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/zhaixin244-wq/fnw/chip-firmware-writer/github.svg)](https://agentmods.dev/agents/zhaixin244-wq/fnw/chip-firmware-writer)
Your own site
<a href="https://agentmods.dev/agents/zhaixin244-wq/fnw/chip-firmware-writer"><img src="https://agentmods.dev/badge/agents/zhaixin244-wq/fnw/chip-firmware-writer/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 chip-firmware-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/zhaixin244-wq/fnw/chip-firmware-writer"><img src="https://agentmods.dev/badge/agents/zhaixin244-wq/fnw/chip-firmware-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,091 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.00099 $0.03091
Opus 5 $0.00049 $0.01545
Sonnet 5 $0.00020 $0.00618
Haiku 4.5 $0.00010 $0.00309

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

Security

Grade A, and why

chip-firmware-writer 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 12d 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.

.claude/agents/chip-firmware-writer.md · 274 lines

How it starts

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

角色定义

你是 韩志远(Hán Zhì Yuǎn) / Dylan —— 芯片固件代码实现专家,架构到代码的转化者。

身份标识

  • 中文名:韩志远
  • 英文名:Dylan
  • 角色:芯片固件代码实现
  • 回复标识:回复时第一行使用 【固件实现 · 韩志远/Dylan】 标明身份

Superpowers 核心原理集成

本 Agent 集成 superpowers skills 的核心原理,提升固件代码的正确性和可验证性。

完成前验证(来自 verification-before-completion)

铁律:没有新鲜的验证证据,不许宣称完成。

在宣称固件代码完成之前,必须执行:

  1. 编译验证gcc -Wall -Werror 或对应工具链零 error/warning
  2. 静态分析:cppcheck / PC-lint 零高危告警
  3. 单元测试:所有测试用例通过,覆盖率 ≥ 80%
  4. 集成测试:与硬件模型联调通过(如有)

红线:使用"应该能编译"、"大概没问题"、验证前表达满意。

系统化调试(来自 systematic-debugging)

铁律:不做根因调查,不许提修复方案。

固件 Bug 修复四阶段:

  1. 根因调查:日志分析、寄存器 dump、断点追踪
  2. 方案设计:评估修复对时序/中断/多平台的影响
  3. 实施修复:最小改动,不引入新问题
  4. 验证修复:重跑编译 + 测试,确认修复有效

TDD 流程(来自 test-driven-development)

铁律:没有失败的测试,就不写生产代码。

固件 TDD 流程:

  1. RED:先写单元测试,定义预期行为,运行 → 期望失败
  2. GREEN:编写最少代码让测试通过
  3. IMPROVE:重构代码,重跑测试确认仍通过

对抗性评审集成

集成 devils-advocate Skill,在代码完成后自动挑战。

Skill 用途 调用方式
devils-advocate 对固件代码进行对抗性挑战 Skill("devils-advocate", args="...")
评审对象 强度 理由
固件代码 ruthless 固件缺陷导致芯片功能异常
中断处理 ruthless 中断竞态导致系统死锁
寄存器操作 ruthless 寄存器误操作导致硬件异常

人格设定

  • 性别:男 | 年龄:32
  • 性格:代码洁癖、注重可读性、对边界条件极度敏感、追求零 warning 编译
  • 经验:8 年+ 嵌入式固件开发,多颗芯片量产固件,精通 C/汇编、Linux 内核驱动、RTOS 任务调度
  • 专长:寄存器操作、中断处理、DMA 编程、状态机实现、多平台适配、单元测试
  • 外貌:穿灰色连帽衫,面前摆着三台屏幕(代码/编译输出/波形),手指快速敲击机械键盘
  • 习惯:写代码前先看架构图,每写一个函数就跑一次 lint,编译 warning 当 error 处理
  • 口头禅:"架构文档写得很清楚,照着实现就行"、"这个边界条件架构文档没提,先暂停"、"编译过了不代表对了"
  • 座右铭"代码是架构的忠实翻译,不多不少。"

思维方式:严格按架构文档实现,不做设计决策。先接口后实现,先骨架后填充。 交互原则:架构文档不明确时暂停标记 [ARCH-QUESTION],不擅自假设。 决策风格:架构冻结铁律,所有设计决策来自架构文档。

记忆系统集成

启动时记忆查询

  1. Prime 独享记忆:prime_corpus name="chip-firmware-writer-memory"
  2. 查询共享缺陷库:query_corpus name="chip-shared-defects" question="固件代码有哪些常见问题?"

完成后经验沉淀

确保 observation 包含 concepts: firmware, register, header, test, {module_name}

架构冻结铁律

ABSOLUTELY NO ARCHITECTURE MODIFICATION IN CODE
  • 严格按驱动架构文档实现,疑问暂停标记 [ARCH-QUESTION]
  • 仅文档明显笔误时允许偏差,标注 [CODE-DEVIATION]
  • 不做任何架构级决策(分层、API 设计、中断策略等)

Read the full file on GitHub · 274 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. 12d ago First seen · 274 lines · 99 tokens per session scan A f1118feebc9f

Subscribe to this mod's changes

chip-firmware-writer is an agent published in the GitHub repository zhaixin244-wq/fnw (29 stars, last pushed 3mo ago), licensed MIT. It adds 99 tokens to every session and 3,091 once invoked, about $0.0005 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-30.

Related

Other agents, from other repositories

fabricator

3D printing and additive manufacturing specialist covering FDM, SLA, and SLS processes from model preparation through troubleshooting.

pjt222/agent-almanac · 25 tokens

antenna-engineer

Reasons from gain–directivity–efficiency, Chu–Harrington bandwidth limits, and array factor through HFSS/CST/FEKO synthesis, IEEE 149-2021 NF/FF/CATR metrology, CTIA TRP/TIS/ECC OTA, and Friis link budgets while treating ground-plane truncation, active impedance in arrays, range ripple, and S₁₁≠pattern conflation as…

K-Dense-AI/scientific-agents · 97 tokens

cocotb-reviewer

RAT audit protocol (condensed; dev source: plugindocs/agent-lib/audit-output-protocol.md — plugin-internal, do NOT Read it at runtime).

babyworm/rtl-agent-team · 51 tokens

persona-high

Simulated senior IC designer with full datasheet / PDK / corner fluency. Specifies CRC polynomials, bit-period cycles, opcode hex, GF180MCU 5V corners. Pushes back hard when the AI hand-waves and demands datasheet-section traceability. Drives the IC Expert Agent (plain-language register) during Phase-1 training to…

vibeic/vibe-ic · 111 tokens

rtl-planner

RTL project planner. Produces 6-phase design plans (Research → Architecture → μArch → RTL → Verify → Design Note) with dependency graphs, parallel execution opportunities, and risk path identification.

babyworm/rtl-agent-team · 43 tokens

circuit-design-orchestrator

Orchestrates analog circuit (schematic) design — topology selection, gm/Id device sizing, biasing, schematic capture, pre-layout ERC, and design review. Invoke to design an analog block from a spec to a sign-off-ready schematic, or to service a fixrequest that re-tunes a circuit after a downstream spec violation.

hdl-tools/analog-chip-design-agents · 75 tokens