rtl-p4s-unit-test-policy

rtl-p4s-unit-test-policy is a skill for Claude Code from babyworm/rtl-agent-team. It costs 26 tokens per session (1,983 once invoked), scanned A, original, MIT.

An internal policy for unit tests of RTL modules. It describes how to write testbenches, compare results with a reference model, investigate failures, and decide when a module passes.

In plain words
What is it for?
Use it to guide SystemVerilog testbench structure, reference comparisons through a compiled library or files, failure analysis, and unit-test pass criteria.
Why use it?
It prevents a test from being treated as successful merely because a simulation ran. A passing result requires all unit tests to pass and the reference comparison to show no mismatches.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the rtl-agent-team plugin — 97 skills, 99 agents, 6 hooks shipped together

Good fit Use it to guide SystemVerilog testbench structure, reference comparisons through a compiled library or files, failure analysis, and unit-test pass criteria.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/babyworm/rtl-agent-team/rtl-p4s-unit-test-policy
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 babyworm/rtl-agent-team --skill rtl-p4s-unit-test-policy
Clone the repo
git clone --depth 1 https://github.com/babyworm/rtl-agent-team

Made for: Claude Code.

Or install rtl-agent-team, the plugin that ships this one along with the rest of its 97 skills, 99 agents, 6 hooks.

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 rtl-p4s-unit-test-policy

README.md
[![agentmods](https://agentmods.dev/badge/skills/babyworm/rtl-agent-team/rtl-p4s-unit-test-policy/github.svg)](https://agentmods.dev/skills/babyworm/rtl-agent-team/rtl-p4s-unit-test-policy)
Your own site
<a href="https://agentmods.dev/skills/babyworm/rtl-agent-team/rtl-p4s-unit-test-policy"><img src="https://agentmods.dev/badge/skills/babyworm/rtl-agent-team/rtl-p4s-unit-test-policy/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 rtl-p4s-unit-test-policy

Your own site · 80×15
<a href="https://agentmods.dev/skills/babyworm/rtl-agent-team/rtl-p4s-unit-test-policy"><img src="https://agentmods.dev/badge/skills/babyworm/rtl-agent-team/rtl-p4s-unit-test-policy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,983 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.00026 $0.01983
Opus 5.5 $0.00010 $0.00793
Sonnet 5.5 $0.00005 $0.00397
Haiku 4.5 $0.00003 $0.00198

Measured 15d ago against content hash 994d4e7f1679, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rtl-p4s-unit-test-policy 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 15d 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.

skills/rtl-p4s-unit-test-policy/SKILL.md · 161 lines

How it starts

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

Tier 2 Unit Test Policy

Coding Convention Requirements

Testbenches MUST follow project conventions:

  • Port connections: i_ prefix for inputs, o_ prefix for outputs, io_ for bidirectional
  • Clock: clk (single domain) or {domain}_clk (multiple, e.g., sys_clk) — NOT clk_i
  • Reset: rst_n (single domain) or {domain}_rst_n (multiple, e.g., sys_rst_n) — NOT rst_ni
  • Use logic only (NOT reg/wire)
  • DUT instance: u_ prefix (e.g., u_dut)
  • Testbench filename: tb_{module}.sv

Execution Policy

  • testbench-dev writes SV testbenches per module (parallel), targeting uarch features
  • Reference model comparison: Mode A (DPI-C) or Mode B (file compare) — auto-selected
  • func-verifier runs simulations via run_sim.sh and reports results
  • Failing tests trigger waveform analysis before reporting
  • Gate: all unit tests pass AND reference comparison has zero mismatches

Reference Comparison Modes

Mode Condition Method
A: DPI-C refc/build/lib{module}_ref.so exists SV TB calls ref functions via DPI-C, cycle-level comparison
B: File DPI-C unavailable RTL sim → output file, ref binary → output file, diff comparison

DPI-C setup:

cd refc && mkdir -p build
gcc -std=c11 -shared -fPIC -o build/lib{module}_ref.so src/{module}_ref.c

Result JSON Schema

Each feature entry supports an optional ac_ids field for acceptance criteria traceability:

  • ac_ids: array of AC IDs covered by this test (e.g., ["REQ-U-012.AC-1", "REQ-U-012.AC-2"])
  • When the requirement has acceptance_criteria (structured object array with ac_id fields) in iron-requirements.json, ac_ids MUST be populated for each covered criterion.
  • When acceptance_criteria is absent or an empty array [], ac_ids may be omitted (backward compatible).
{
  "module": "{module}",
  "tier": 2,
  "ref_mode": "A_DPI" | "B_FILE",
  "features": [
    {"name": "fsm_idle_to_active", "status": "PASS", "req_ids": ["REQ-U-003"], "ac_ids": ["REQ-U-003.AC-1"]},
    {"name": "pipeline_latency_3cyc", "status": "PASS", "req_ids": ["REQ-U-007"], "ac_ids": ["REQ-U-007.AC-1", "REQ-U-007.AC-2"]},
    {"name": "valid_ready_handshake", "status": "PASS", "req_ids": ["REQ-U-012"], "ac_ids": ["REQ-U-012.AC-1"]},
    {"name": "transform_accuracy", "status": "FAIL", "mismatch_cycle": 47, "req_ids": ["REQ-U-015"]}
  ],
  "ref_mismatches": 0,
  "pass_count": 5,
  "fail_count": 0,
  "total": 5,
  "gap_fill_round": {
    "executed": true,
    "before": {"line_pct": 52.1, "fsm_pct": 40.0},
    "after": {"line_pct": 67.3, "fsm_pct": 55.0}
  },
  // When gap-fill NOT triggered: {"executed": false, "before": null, "after": null}
  "coverage": {
    "line_pct": 67.3,
    "fsm_pct": 55.0,
    "toggle_pct": 42.1
  },
  "func_coverage": {
    "covergroups_defined": 2,
    "bins_hit": 14,
    "bins_total": 20
  },
  "codec_conformance": "PASS" | "FAIL" | "N/A"
}

Read the full file on GitHub · 161 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. 15d ago First seen · 161 lines · 26 tokens per session scan A 994d4e7f1679

Subscribe to this mod's changes

rtl-p4s-unit-test-policy is a skill published in the GitHub repository babyworm/rtl-agent-team (61 stars, last pushed 16d ago), licensed MIT. It adds 26 tokens to every session and 1,983 once invoked, about $0.0001 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-10-08.

Related

Other skills, from other repositories

test-sqrl

Use when adding or updating tests for a DataSQRL pipeline. Use after implementing features to verify correctness.

DataSQRL/sqrl · 26 tokens

embedded-testing-patterns

Firmware test patterns with Unity, CMock, Ceedling, and QEMU: project layout, testable HAL interfaces, CMock expect chaining, error-path tests, and an on-target test runner over ITM. Use when making embedded C testable or writing tests for it.

HermeticOrmus/LibreEmbed-Claude-Code · 62 tokens

mavlink-integration

Use this skill when a task involves MAVLink protocol communication via pymavlink, UART/UDP/TCP drone connections, ArduPilot SITL simulation, or telemetry message parsing in the edge service. Don't use it for raw UART hardware driver code without MAVLink framing (use embedded-systems), WebSocket transport to the web…

atretyak1985/swarmery · 86 tokens

codexkit-test-hardening

Strengthen test coverage around changed behavior, edge cases, and regressions without writing noisy or brittle tests.

hoavdc/CodexKit · 28 tokens

testing-business-rules

Use when adding, reviewing, or deleting tests, deciding whether a function needs coverage, or when a suite enumerates branches, signs, empty values, or implementation steps without naming the behavior at risk.

luabagg/agent-skills · 45 tokens

precommit

Run the deterministic pre-commit pipeline in fast or full mode through the packaged runner. Use when handing off repository changes. Not for: ad hoc replacement checks, dependency audits, or read-only verification. Output: runner-owned changed-file reporting and final verdict.

hmj1026/dhpk · 54 tokens