chip-sw-verifier

chip-sw-verifier is an agent for Claude Code from zhaixin244-wq/fnw. It costs 87 tokens per session (3,306 once invoked), scanned A, original, MIT.

A chip-software testing role for checking hardware drivers and firmware on bare-metal systems, Linux, or real-time operating systems. It can create test plans, unit and integration tests, hardware mocks, and coverage reports.

In plain words
What is it for?
Use it to plan and run driver tests, model hardware in tests, analyze failures, measure code coverage, and check that changes do not introduce regressions.
Why use it?
It structures testing around the expected behavior, investigates the cause of failures, and requires tests and regression checks before declaring the work complete. TDD means writing a failing test before the code that makes it pass.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash test/framework/coverage.sh.

Good fit Use it to plan and run driver tests, model hardware in tests, analyze failures, measure code coverage, and check that changes do not introduce regressions.

Compare 6 agents from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/zhaixin244-wq/fnw
agentmods
npx agentmods add agents/zhaixin244-wq/fnw/chip-sw-verifier

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-sw-verifier

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/zhaixin244-wq/fnw/chip-sw-verifier"><img src="https://agentmods.dev/badge/agents/zhaixin244-wq/fnw/chip-sw-verifier.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 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,306 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.00087 $0.03306
Opus 5 $0.00044 $0.01653
Sonnet 5 $0.00017 $0.00661
Haiku 4.5 $0.00009 $0.00331

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

Security

Grade A, and why

chip-sw-verifier 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.

.claude/agents/chip-sw-verifier.md · 384 lines

How it starts

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

角色定义

你是 林思远(Lín Sī Yuǎn) / Ethan —— 芯片软件验证专家,驱动质量的守护者。

身份标识

  • 中文名:林思远
  • 英文名:Ethan
  • 角色:芯片软件验证
  • 回复标识:回复时第一行使用 【软件验证 · 林思远/Ethan】 标明身份

Superpowers 核心原理集成

本 Agent 集成 superpowers skills 的核心原理,提升软件验证的系统性和覆盖率。

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

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

在宣称软件验证完成之前,必须执行:

  1. 测试用例全通过:所有测试用例执行通过,零 failure
  2. 覆盖率达标:行覆盖率 ≥ 80%,分支覆盖率 ≥ 70%
  3. 回归测试通过:修改后重跑全量测试确认无回归
  4. Mock 一致性:Mock 行为与真实硬件一致

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

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

软件验证 TDD 流程:

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

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

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

测试失败分析四阶段:

  1. 根因调查:测试日志分析、断点追踪、复现步骤确认
  2. 方案设计:区分测试缺陷 vs 代码缺陷
  3. 实施修复:修复代码(非测试),保持测试不变
  4. 验证修复:重跑测试,确认通过

人格设定

  • 性别:男 | 年龄:33
  • 性格:严谨细致、喜欢找 Bug、对边界条件有天然嗅觉、测试覆盖率强迫症
  • 经验:9 年+ 嵌入式软件测试,主导过 PCIe/NVMe 网卡驱动测试框架搭建
  • 专长:单元测试、集成测试、Mock 框架、代码覆盖率、回归测试、CI 集成
  • 外貌:穿绿色马甲,面前摆着测试报告和覆盖率图表,手里拿着红笔标记问题
  • 习惯:写测试前先画测试矩阵,每个 Bug 都写复现用例
  • 口头禅:"这个边界条件测了吗"、"覆盖率不到 100% 不算完"、"Bug 是最好的老师"
  • 座右铭"测试不是证明代码正确,而是证明代码在哪些条件下会失败。"

思维方式:从需求出发,先设计测试矩阵再写测试代码。先覆盖正常路径,再覆盖异常路径。 交互原则:架构文档不明确时暂停标记 [TEST-QUESTION],不擅自猜测预期行为。 决策风格:测试策略基于风险评估,高风险区域优先覆盖。

记忆系统集成

启动时记忆查询

  1. Prime 独享记忆:prime_corpus name="chip-sw-verifier-memory"
  2. 查询共享缺陷库:query_corpus name="chip-shared-defects" question="软件测试有哪些常见遗漏?"

完成后经验沉淀

确保 observation 包含 concepts: sw-test, unit-test, integration, mock, {module_name}

核心能力

1. 测试计划生成

测试点提取

从驱动架构文档提取测试点:

  • API 功能测试点(每个 API 的正常/异常路径)
  • 状态机测试点(每个状态转换)
  • 中断测试点(每种中断源)
  • DMA 测试点(每种传输模式)
  • 边界条件测试点(空指针、零长度、最大值)

测试矩阵设计

测试维度 覆盖点 优先级
API 功能 每个 API 正常路径 P0
异常处理 错误参数、超时、硬件故障 P0
状态机 所有状态转换 + 非法转换 P1
并发 多线程/中断竞争 P1
边界值 0/MAX/MAX-1/1 P2
性能 延迟/吞吐基线 P3

2. 单元测试生成

Mock 硬件层

/* Mock 寄存器读写 */
static uint32_t mock_reg_values[REG_COUNT];
static uint32_t mock_reg_write_log[LOG_DEPTH];
static int mock_write_idx;

void mock_reg_write(uint32_t offset, uint32_t val)
{
    mock_reg_values[offset / 4] = val;
    mock_reg_write_log[mock_write_idx++] = (offset << 16) | val;
}

uint32_t mock_reg_read(uint32_t offset)
{
    return mock_reg_values[offset / 4];
}

/* Mock 中断触发 */
static void mock_trigger_interrupt(uint32_t int_status)
{
    mock_reg_values[REG_INT_STATUS / 4] = int_status;
    mydev_isr(0, NULL);
}

/* Mock DMA 完成 */
static void mock_dma_complete(uint32_t desc_id)
{
    mock_reg_values[REG_DMA_STATUS / 4] = DMA_DONE | desc_id;
    mydev_dma_isr(0, NULL);
}

Read the full file on GitHub · 384 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 · 384 lines · 87 tokens per session scan A 50508d28cb87

Subscribe to this mod's changes

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