hdl-module-design

hdl-module-design is a skill for Claude Code from Midstall/claude-for-hardware. It costs 63 tokens per session (1,385 once invoked), scanned A, original, Apache-2.0.

A design and testing method for reusable HDL hardware modules, such as Verilog, VHDL, Chisel, SpinalHDL, or ROHD components.

In plain words
What is it for?
It helps build peripherals, data paths, control blocks, and reusable IP with typed configuration, early error checks, and exhaustive isolated tests.
Why use it?
It keeps configuration and validation at the module boundary, making hardware blocks easier to reuse and test independently instead of only through a complete system.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-for-hardware plugin — 14 skills, 3 commands, 3 agents, 1 hook shipped together

Good fit It helps build peripherals, data paths, control blocks, and reusable IP with typed configuration, early error checks, and exhaustive isolated tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/midstall/claude-for-hardware/hdl-module-design
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 Midstall/claude-for-hardware --skill hdl-module-design
Clone the repo
git clone --depth 1 https://github.com/Midstall/claude-for-hardware

Made for: Claude Code.

Or install claude-for-hardware, the plugin that ships this one along with the rest of its 14 skills, 3 commands, 3 agents, 1 hook.

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 hdl-module-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/midstall/claude-for-hardware/hdl-module-design/github.svg)](https://agentmods.dev/skills/midstall/claude-for-hardware/hdl-module-design)
Your own site
<a href="https://agentmods.dev/skills/midstall/claude-for-hardware/hdl-module-design"><img src="https://agentmods.dev/badge/skills/midstall/claude-for-hardware/hdl-module-design/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 hdl-module-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/midstall/claude-for-hardware/hdl-module-design"><img src="https://agentmods.dev/badge/skills/midstall/claude-for-hardware/hdl-module-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,385 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.00063 $0.01385
Opus 5 $0.00032 $0.00692
Sonnet 5 $0.00013 $0.00277
Haiku 4.5 $0.00006 $0.00138

Measured 9d ago against content hash 6b56af6b001f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

hdl-module-design 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 9d 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/hdl-module-design/SKILL.md · 90 lines

How it starts

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

HDL Module Design

Overview

A hardware module is an interface plus an implementation. Get the interface and its configuration right and the implementation stays swappable, testable, and reusable across an FPGA and an ASIC.

Core principle: A module should declare exactly what it needs as typed configuration, validate it at build time, and be exhaustively testable in isolation. If you can't construct and test it without the rest of the SoC, the boundary is wrong.

When to Use

  • Writing a new peripheral, datapath, control block, or reusable IP
  • A module takes a pile of bare int/String/bool constructor args
  • Configuration is validated late (at elaboration or simulation) instead of at construction
  • Domain logic is leaking into the CLI/generator wrapper instead of the library
  • Tests only exercise the top level, not the component

Skip for throwaway testbench glue or a one-line wire rename.

Design The Configuration First

Hardware bugs are expensive, so push errors as early as possible: ideally a type error, otherwise a build-time assertion, never a silent miscompile.

  1. One config object per module. Group the parameters into an immutable config type with named, typed fields. The module takes the config, not a long positional arg list.
  2. Types, not strings. Use enums for modes, kinds, and identifiers. BusKind.axi4 not "axi4". A typo becomes a compile error instead of a wrong build.
  3. Validate at construction. Width relationships, power-of-two requirements, address-range overlaps, legal mode combinations: assert them when the config is built, with a message that names the offending field and value. Do not defer to simulation.
  4. Derive, don't duplicate. If addrWidth is a function of depth, compute it. Don't make the caller pass both and hope they agree.
// ROHD-flavored, but the shape is language-neutral.
class FifoConfig {
  final int depth;
  final int width;
  const FifoConfig({required this.depth, required this.width});

  // build-time validation, names the bad field
  void validate() {
    if (depth <= 0 || (depth & (depth - 1)) != 0) {
      throw ArgumentError('FifoConfig.depth must be a power of two, got $depth');
    }
    if (width <= 0) {
      throw ArgumentError('FifoConfig.width must be positive, got $width');
    }
  }

  int get addrWidth => depth.bitLength - 1; // derived, not passed in
}

Read the full file on GitHub · 90 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 9d ago First seen · 90 lines · 63 tokens per session scan A 6b56af6b001f

Subscribe to this mod's changes

hdl-module-design is a skill published in the GitHub repository Midstall/claude-for-hardware (20 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 63 tokens to every session and 1,385 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-08-30.

Related

Other skills, from other repositories

unity-ceedling-integration

Use when adding, configuring, or debugging Unity, Ceedling, CMock, or embedded C unit tests, mocks, fixtures, build variants, or CI test runs.

easyzoom/aix-skills · 41 tokens

review-ugc-render

Mandatory pre-publish review gate for a UGC video render. Transcribes the finished render's AUDIO with Whisper and word-diffs it against the approved spoken script, then gates setfinalrender — blocking a render whose generated audio mis-voices a word (e.g. the approved "human-vetted" spoken as "human witted"), drops…

gooseworks-ai/goose-skills · 116 tokens

test-generator

A test-writing helper that creates unit or integration tests from the code's actual behavior and contracts. Unit tests check small pieces of code, while integration tests check how real components work together.

laolaoshiren/claude-code-skills-zh · 79 tokens

testing-r-packages

Best practices for writing R package tests using testthat version 3+. Use when writing, organizing, or improving tests for R packages. Covers test structure, expectations, fixtures, snapshots, mocking, and modern testthat 3 patterns including self-sufficient tests, proper cleanup with withr, and snapshot testing.

posit-dev/skills · 67 tokens

r-package-development

R package development with devtools, testthat, and roxygen2. Use when the user is working on an R package, running tests, writing documentation, or building package infrastructure.

posit-dev/skills · 41 tokens

robotics-testing

Testing strategies, patterns, and tools for robotics software. Use this skill when writing unit tests, integration tests, simulation tests, or hardware-in-the-loop tests for robot systems. Trigger whenever the user mentions testing ROS nodes, pytest with ROS, launchtesting, simulation testing, CI/CD for robotics, test…

arpitg1304/robotics-agent-skills · 110 tokens