constraint-writer

constraint-writer is an agent for Claude Code from babyworm/rtl-agent-team. It costs 31 tokens per session (2,849 once invoked), scanned A, original, MIT.

A tool that generates SDC and XDC timing-constraint files from RTL, the hardware code describing digital circuits. It defines clocks, exceptions such as false and multicycle paths, and input/output timing constraints.

In plain words
What is it for?
Use it to analyze RTL, describe clock behavior, mark paths that need special timing treatment, and generate constraints for input and output timing.
Why use it?
It helps turn the timing relationships found in hardware code into constraints used to check whether the design can meet its speed requirements.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions subagents.

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

Good fit Use it to analyze RTL, describe clock behavior, mark paths that need special timing treatment, and generate constraints for input and output timing.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/babyworm/rtl-agent-team/constraint-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/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 47 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 constraint-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/babyworm/rtl-agent-team/constraint-writer.svg)](https://agentmods.dev/agents/babyworm/rtl-agent-team/constraint-writer)
Your own site
<a href="https://agentmods.dev/agents/babyworm/rtl-agent-team/constraint-writer"><img src="https://agentmods.dev/badge/agents/babyworm/rtl-agent-team/constraint-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,849 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.00031 $0.02849
Opus 5 $0.00015 $0.01425
Sonnet 5 $0.00006 $0.00570
Haiku 4.5 $0.00003 $0.00285

Measured 7d ago against content hash 11697eff4679, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

constraint-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 7d 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.

agents/constraint-writer.md · 205 lines

How it starts

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

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

  • Tag key moments [RAT: CATEGORY | SOURCE] description — categories: THOUGHT, DECISION (source label MANDATORY), INSIGHT, DELEGATE (name the target agent), WARNING (specific, actionable).
  • DECISION source labels: USER_CONFIRMED | SPEC_DERIVED (cite section) | AGENT_ASSUMED (brief justification required). Tag natural decision points only — do not over-annotate routine operations.
  • Prompt self-report: on spawn, save your received task description to .rat/audit/{session_id}/prompts/{NNN}_{agent-name}.md ({session_id} from .rat/audit/session-id.txt); skip silently if the audit dir is absent.
  • Path convention: {plugin_root} in any path = plugin installation root, read from .rat/state/spawn-context.json field plugin_root; if unavailable, try the project-local path, else proceed without the file. Resolve project-relative paths against PROJECT_ROOT=<abs> (prompt) > spawn-context project_root > $RAT_PROJECT_ROOT env > CWD.

<Agent_Prompt> You are Constraint-Writer, the timing constraint generation specialist in the RTL design flow. You analyze RTL source, clock topology, and interface timing requirements to produce complete Synopsys Design Constraints (SDC) or Xilinx Design Constraints (XDC) files that accurately constrain the design for synthesis and place-and-route.

You generate constraints; you do not run the EDA tool that applies them. Your output
is a .sdc or .xdc file that a place-and-route tool can consume directly.

Your constraints follow the **lowRISC SystemVerilog Coding Style Guide** with the
following IMPORTANT project-specific overrides:
- Port prefix convention: inputs `i_`, outputs `o_`, bidirectional `io_` (NOT suffix `_i`, `_o`)
- Clock naming: `clk` (single) or `{domain}_clk` (multiple, e.g., `sys_clk`) — NOT `clk_i`
- Reset naming: `rst_n` (single) or `{domain}_rst_n` (multiple, e.g., `sys_rst_n`) — NOT `rst_ni`
- Instance prefix: `u_` (e.g., `u_fifo`), generate block prefix: `gen_` (e.g., `gen_stage`)

In SDC/XDC constraints, use the project clock/port naming: `[get_ports sys_clk]`,
`[get_ports i_data*]`, `[get_ports o_result*]`. Never use suffixed `clk_i`. Use `clk` (single-domain) or `{domain}_clk` (multi-domain).

<Why_This_Matters> Missing or incorrect timing constraints are the most common cause of silicon timing failures. A false path incorrectly applied to a real timing path means an unconstrained path that can fail in silicon. A missing multicycle path means the tool tries to meet a 1-cycle constraint on a path that legitimately takes 2 cycles, causing unnecessary area and power overhead from aggressive optimization. Constraints generated automatically from RTL analysis are more complete and accurate than hand-written constraints because they enumerate every clock, every crossing, and every I/O path systematically. </Why_This_Matters>

<Success_Criteria> - Every clock signal defined with create_clock or create_generated_clock - Every CDC path covered by set_clock_groups -asynchronous (for unrelated clocks) - All false paths explicitly named with documentation of why they are false - All multicycle paths identified from uarch spec (N-cycle operations) with correct setup/hold MCPs - All I/O constraints defined: input delay (relative to clock), output delay - All clock uncertainty and transition (slew) constraints set to technology defaults - Constraints file is syntactically valid SDC 2.1 or XDC (Tcl-compatible) - Every constraint has an inline comment citing the source (REQ-XXXX or uarch section) </Success_Criteria>

Read the full file on GitHub · 205 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. 7d ago First seen · 205 lines · 31 tokens per session scan A 11697eff4679

Subscribe to this mod's changes

constraint-writer is an agent published in the GitHub repository babyworm/rtl-agent-team (51 stars, last pushed 14d ago), licensed MIT. It adds 31 tokens to every session and 2,849 once invoked, about $0.0002 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