r2g-skills: Instructions file for Claude Code

CLAUDE.md

r2g-skills CLAUDE.md is an instructions file for Claude Code from ShenShan123/r2g-skills. It costs 12,428 tokens per session, scanned B, original, MIT.

Project instructions for Agent-with-OpenROAD, a collection of skills that turns hardware descriptions into chip layouts and checks them for manufacturing errors. The project uses OpenROAD and related electronic-design automation tools, plus a library of reusable hardware designs.

In plain words
What is it for?
Use them to install and verify the chip-design toolchain, acquire and screen RTL hardware code, create layout graphs, run design-rule and connectivity checks, and prepare results for machine-learning datasets.
Why use it?
They explain the required toolchain, deployment rules, and order of operations so chip-design tasks produce checked, usable results. They also separate acquiring hardware designs from layout and signoff work.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

This is ShenShan123/r2g-skills's own configuration. It tells Claude Code how to work on r2g-skills itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything r2g-skills configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/yangao/r2g_toolchain/OpenROAD-flow-scripts.

Reuse

Borrowing it

Nothing to install: this file belongs to ShenShan123/r2g-skills. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ShenShan123/r2g-skills/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ShenShan123/r2g-skills

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 r2g-skills CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/shenshan123/r2g-skills/claude-md/github.svg)](https://agentmods.dev/instructions/shenshan123/r2g-skills/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/shenshan123/r2g-skills/claude-md"><img src="https://agentmods.dev/badge/instructions/shenshan123/r2g-skills/claude-md/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 r2g-skills CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/shenshan123/r2g-skills/claude-md"><img src="https://agentmods.dev/badge/instructions/shenshan123/r2g-skills/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12,428 This file is loaded in full into every session.
When invoked 12,428 The same file — it is already loaded in full.
Security scan B 1 finding. 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.12428 $0.12428
Opus 5.5 $0.04971 $0.04971
Sonnet 5.5 $0.02486 $0.02486
Haiku 4.5 $0.01243 $0.01243

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

Security

Grade B, and why

r2g-skills CLAUDE.md scanned grade B with 1 finding 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 14d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

`bootstrap.sh` (detect → plan → install → pin `env.local.sh` → verify); no-sudo conda path by default.
CLAUDE.md · 527 lines

How it starts

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

Agent-with-OpenROAD — Project Guide

AI-driven open-source EDA flow: natural-language spec → GDSII via OpenROAD-flow-scripts (ORFS), with full signoff (DRC, LVS, RCX), then a training-ready graph dataset for GNN predictors. Implemented as the r2g-skills Claude Code skill collection — four sub-skills (signoff-loop + def-graph from the 2026-07-07 split; eda-install added 2026-07-08; rtl-acquire ingested 2026-07-09. The three design plans were retired once completed — see git log for them, not a path in the tree):

  • eda-install — detects the machine and installs + verifies the toolchain the others run (ORFS + openroad/yosys, iverilog, klayout, magic/netgen, sky130A PDK, torch venv). One command, bootstrap.sh (detect → plan → install → pin env.local.sh → verify); no-sudo conda path by default.
  • rtl-acquire — the RTL corpus supplier, UPSTREAM of the others: discovers/screens/acquires RTL at corpus scale (local trees, repo manifests, keyword search) and expands it synth-only into pre-layout netlist_graph.pt graphs with dedup, quality scoring, and publish gating. Owns acquire + corpus publish + the one-click promote of a synth-proven candidate into a signoff-loop full-flow project (scripts/promote/promote_candidates.py, 2026-07-10); BORROWS env (_env.sh), synth (run_orfs.sh, ORFS_STAGES=synth), the graph format (def-graph netlist_graph.py), and failure learning (knowledge.sqlite, runs stamped flow_scope='synth_only'; frontend classes land as synth-frontend-* events).
  • signoff-loop — drives the flow RTL→GDS with full signoff and the self-improvement loop (the two memory DBs + engineer_loop) that eliminates DRC/LVS violations and closes timing at Fmax.
  • def-graph — converts the clean, signed-off physical design (the ORFS 6_final.odb/.def/ .spef + platform liberty/LEF) into PyTorch-Geometric graph datasets: five graph views (b–f), emitted as HeteroData by default (2026-07-16; R2G_GRAPH_KIND=homo for the legacy flat tensors), the shared tech-lib/LEF/DEF parser, and feature (X) / label (Y) extraction — labels are congestion, wirelength, per-path timing slack, IR drop, and SPEF-derived RC parasitics (the last a y[N,6] node label + a separate rc_edge_* parasitic edge set, merged 2026-07-07).

Each skill has ONE heart; everything else is plumbing — read the two ⭐ sections below:

  1. signoff-loop → The Closed Learning Loop — the two memory DBs (knowledge.sqlite = what resulted, journal.sqlite = what was done) + engineer_loop, the autonomous driver that closes the wheel unattended (flow → fix → learn → A/B-promote) and learns repair recipes that transfer across designs/platforms.
  2. def-graph → The Dataset-Construction Pipeline — three composable stages (labels → features → graphs) keyed to the same DEF so X and Y join, whose failure mode is a plausible CSV with silently wrong values.

This file is orientation; the skills document how to run/debug/tune. Don't duplicate skill content or per-run results here — when you fix a bug, update the relevant sub-skill under r2g-skills/ (signoff-loop/ for flow/signoff/learning, def-graph/ for dataset construction), not this file. Prefer editing existing scripts/ over adding new ones; use the documented steps, not ad-hoc shell, in production.

Read the full file on GitHub · 527 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. 14d ago Changed · +35 lines · +870 tokens per session 0885a50886c9
  2. 1mo ago Changed · +10 lines · +292 tokens per session 902ae2068557
  3. 1mo ago Changed · -1 tokens per session 432408d5a188
  4. 1mo ago Changed · +13 tokens per session fdb1229c9ac4
  5. 1mo ago Changed 0a15e09aea43
  6. 2mo ago First seen · 482 lines · 11,254 tokens per session scan B 5f2b43e12365

Subscribe to this mod's changes

r2g-skills CLAUDE.md is an instructions file published in the GitHub repository ShenShan123/r2g-skills (44 stars, last pushed 8d ago), licensed MIT. It adds 12,428 tokens to every session, about $0.0497 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

r2g-skills CLAUDE.md compared with instructions from other repositories

r2g-skills CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
r2g-skills CLAUDE.mdShenShan123/r2g-skillsInstructions file448d agoMITB12,428Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode