Borrowing it
Nothing to install: this file belongs to sean-galloway/RTLDesignSherpa. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sean-galloway/RTLDesignSherpa/main/.claude/skills/test-patterns/SKILL.mdgit clone --depth 1 https://github.com/sean-galloway/RTLDesignSherpaWrote 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/sean-galloway/rtldesignsherpa/test-patterns)<a href="https://agentmods.dev/skills/sean-galloway/rtldesignsherpa/test-patterns"><img src="https://agentmods.dev/badge/skills/sean-galloway/rtldesignsherpa/test-patterns.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00059 | $0.02550 |
| Opus 5 | $0.00030 | $0.01275 |
| Sonnet 5 | $0.00012 | $0.00510 |
| Haiku 4.5 | $0.00006 | $0.00255 |
Grade A, and why
test-patterns 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 298 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test patterns
Moved out of the root CLAUDE.md, which loaded all of this into every session
whether or not a test was in scope. /GLOBAL_REQUIREMENTS.md remains the
enforcement authority and wins on conflict.
Writing Tests
Every RTL module requires a test!
# Run specific test
pytest val/{subsystem}/test_{module}.py -v
# Run all tests in subsystem
pytest val/{subsystem}/ -v
# Run with coverage
pytest val/{subsystem}/ --cov=rtl/{subsystem}/
Test Structure:
- Use CocoTB framework
- Import appropriate BFMs from
bin/TBClasses/ - Target >95% functional coverage
- Document test methodology in file header
- Include waveform dumps for debugging
Test File Location:
val/common/test_{module}.pyfor rtl/common/val/math/test_{module}.pyfor rtl/math/val/amba/test_{module}.pyfor rtl/amba/projects/components/{name}/dv/tests/for project-specific tests (RAPIDS, STREAM, bridge, ...)
🚨 CRITICAL: Test Structure Pattern 🚨
The repository uses TWO different test patterns depending on the location:
Pattern A: Direct CocoTB (val/common/, val/amba/ areas)
import cocotb
from cocotb_test.simulator import run
# CocoTB test function - direct @cocotb.test() decorator
@cocotb.test(timeout_time=3, timeout_unit="ms")
async def fifo_test(dut):
tb = FifoBufferTB(dut, dut.clk, dut.rst_n)
await tb.start_clock('clk', 10, 'ns')
# ... test logic
# Pytest wrapper function
@pytest.mark.parametrize("data_width, depth", params)
def test_fifo_buffer(request, data_width, depth):
# ... setup paths, filelist, parameters
run(
python_search=[tests_dir],
verilog_sources=verilog_sources,
toplevel=dut_name,
module=module, # Python module containing cocotb tests
# ... compilation args
)
Pattern B: CocoTB + Pytest Wrappers (projects/components/ areas)
⚠️ HARD REQUIREMENT for projects/components/: MUST use Pattern B ⚠️
import cocotb
from cocotb_test.simulator import run
# 1. CocoTB test functions - prefix with "cocotb_test_*" to prevent pytest collection
@cocotb.test(timeout_time=100, timeout_unit="ms")
async def cocotb_test_basic(dut): # ← "cocotb_test_*" prefix!
"""CocoTB test function - NOT collected by pytest"""
tb = SimpleSRAMTB(dut)
await tb.setup_clocks_and_reset()
# ... test logic
@cocotb.test(timeout_time=100, timeout_unit="ms")
async def cocotb_test_stress(dut): # ← "cocotb_test_*" prefix!
"""Another CocoTB test function"""
tb = SimpleSRAMTB(dut)
await tb.setup_clocks_and_reset()
# ... stress test logic
# 2. Pytest wrapper functions - call specific cocotb_test_* functions
@pytest.mark.parametrize("addr_width, data_width", params)
def test_basic(request, addr_width, data_width):
"""Pytest wrapper - calls cocotb_test_basic"""
module, repo_root, tests_dir, log_dir, rtl_dict = get_paths({
'rtl_stream_fub': '../../../../rtl/fub',
})
verilog_sources, includes = get_sources_from_filelist(
repo_root=repo_root,
filelist_path='projects/components/dmas/stream/rtl/filelists/fub/sram_controller.f'
)
run(
python_search=[tests_dir],
verilog_sources=verilog_sources,
includes=includes,
toplevel=dut_name,
module=module,
testcase="cocotb_test_basic", # ← Explicitly specify which cocotb function to run
parameters=rtl_parameters,
# ... compilation args
)
@pytest.mark.parametrize("addr_width, data_width", params)
def test_stress(request, addr_width, data_width):
"""Pytest wrapper - calls cocotb_test_stress"""
# ... same setup as above
run(
# ... same args except:
testcase="cocotb_test_stress", # ← Different cocotb function
# ...
)
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.
- 3d ago First seen · 298 lines · 59 tokens per session scan A c94042d21d70
test-patterns is a skill published in the GitHub repository sean-galloway/RTLDesignSherpa (23 stars, last pushed yesterday), licensed MIT. It adds 59 tokens to every session and 2,550 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-09-04.
Other skills, from other repositories
codec-conformance-eval
Evaluate C ref-model decoder against JVET/JCTVC conformance bitstreams (bitexact/MD5) — 'decoder conformance'; C-level, not RTL (rtl-conformance-test).
bfm-develop
Builds Phase 3 SystemC TLM-2.0 bus functional models with AMBA (AXI/AHB/APB) support. Use for 'develop BFM', 'SystemC TLM model', 'bus functional model'.
rat-p4p5-impl-verify-policy
Internal reference: rat p4p5 impl verify policy (agent-loaded; do not invoke).
ref-model
Builds Phase 2 golden C reference model with bitexact conformance and bandwidth estimation. Use for 'build reference model', 'C ref model', 'golden model'.
rtl-lint-check
Lint RTL with Verilator, Verible, and slang; report-only quick check for 'run lint', pre-commit, or phase-gate verification (no fixing).
rtl-model-consistency
3-way bitexact comparison of C ref model vs SystemC BFM vs RTL on shared vectors; isolates which model drifted. Triggers: 'model consistency', 'model drift'.