/r2g-skills:eda-installfrom r2g-skills
Detects the machine environment and installs the open-source EDA toolchain (OpenROAD, Yosys, iverilog, KLayout, Magic, Netgen, OpenSTA, sky130A PDK, torch+torch_geometric). Use when setting up a new machine or when tools are missing.
Ships in r2g-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Provision the open-source EDA toolchain, then get out of the way. This is the setup companion to
the two working skills: signoff-loop (RTL→GDS + signoff) and def-graph (graph datasets). It
answers one question — "are the tools this machine needs present, and if not, how do I get them
without breaking anything?" — and acts on the answer.
bash r2g-skills/eda-install/bootstrap.sh --dry-run # detect + plan, install NOTHING
bash r2g-skills/eda-install/bootstrap.sh # install missing tiers + pin env.local.sh + verify
bash r2g-skills/bootstrap.sh is a shim to the same script.
The complete R2G toolchain (signoff on every platform AND graph datasets) needs every tier, including
platform_rules (installed only when named) and graph (the torch venv def-graph uses). Name them all:
bash r2g-skills/eda-install/bootstrap.sh --yes --prefix "$BIG_VOLUME" \
--tiers core,frontend,klayout,sky130,pdk,platform_rules,graph \
--strict-platforms nangate45,sky130hd,gf180
Pass a shorter --tiers list only when you deliberately want part of the toolchain: an agent that named tiers
to get platform_rules and left out graph produced an install without the graph-learning environment
(Experiment 1, 2026-11-06).
scripts/setup/detect_env.sh) — a clean KEY=VALUE snapshot of the machine: OS +
package manager, HAVE_SUDO, HAVE_CONDA, a big writable volume (≥15 GB, preferring /proj),
plus every tool + PDK the shared scripts/flow/_env.sh resolver already discovers, and a
torch-capable python. Absence is data, never an error.bootstrap.sh prints a per-tier table (core / frontend / sky130 / klayout / pdk /
graph), each OK / MISS (required, absent) / OPT (optional, installable), with the exact
action it would take. The install channel is chosen by HAVE_SUDO (see below).scripts/setup/install_<tier>.sh; bootstrap.sh dispatches to one the
moment it exists (and until then prints the command it would run). The platform_rules tier is
in the default plan (2026-07-20, round-2 pilot P0-3 — a stock nangate45 checkout has no LVS
deck and an unusable 0-area antenna diode, so strict signoff is impossible while every tool reads
green): the plan probes platform_capability.py --platform nangate45 --strict and shows OK/OPT;
being ORFS-mutating it still installs only when named (--tiers platform_rules), materializing
the repo's bundled nangate45 DRC/LVS/antenna rule decks into the ORFS checkout
(install_platform_rules.sh, best-effort, HINTs when the repo tools/ installers are
unreachable — EXCEPT the sky130hs .lyt lefdef repair, a REQUIRED postcondition verified by
patch_sky130hs_lyt.py --check plus the sky130hs_gds_canary.py DEF→GDS geometry canary; a
failed repair FAILS setup, RMD-P0-04). Platforms SELECTED as strict (--strict-platforms nangate45,sky130hd,sky130hs on bootstrap.sh, or R2G_STRICT_PLATFORMS / --platforms on the
installer) are FAIL-CLOSED end-to-end (RMD2-P1-01, failure-patterns #55): a missing/failing
rule installer, an unverifiable canary, or a failed post-install
platform_capability.py --strict probe fails setup, and the capability verdict + collateral
sha256 digests are persisted to eda-install/references/install_manifest.json. Selecting
strict platforms also makes the platform_rules tier REQUIRED in the plan. check_env.sh prints the same per-platform capability
table; check_env.sh --platform <p> (or R2G_TARGET_PLATFORM) makes the NAMED campaign
platform's strict readiness REQUIRED and fail-closed (RMD-P0-03);
R2G_STRICT_PLATFORMS="nangate45" does the same for a standing list.scripts/setup/write_env_local.sh) — writes references/env.local.sh into both
signoff-loop and def-graph from the resolved paths, so the flow skills find a conda / /proj
toolchain with no manual edit. It pins only what autodetect would miss (e.g. omits openroad/yosys
already under $ORFS_ROOT/tools/install) and adds R2G_GRAPH_PYTHON.scripts/flow/check_env.sh (ORFS + required + optional + graph stage +
platforms) and reports the same table the README documents.Detection runs sudo -n true. Without root (HAVE_SUDO=0 — the common case on shared servers)
every tier routes through pre-built conda litex-hub packages + a venv, all under the big volume:
| Tool(s) | No-sudo channel |
|---|---|
| openroad, yosys (+ sta), klayout | the r2g toolchain bundle — the exact OpenROAD/Yosys build (sha256-identical) and KLayout 0.30.7 of the signoff image r2g-orfs:26Q3 every r2g corpus was run in, relocatable, ~220 MB, a GitHub release asset pinned by URL + sha256 in references/toolchain_bundle.json (built by scripts/setup/make_toolchain_bundle.sh); needs host glibc ≥ 2.35. Not conda: litex-hub froze openroad/yosys in Feb 2024 (yosys 0.38) and conda-forge has no openroad, so conda binaries + a current ORFS cannot synthesize (fresh-user test, 2026-10-23) |
| iverilog, verilator, magic, netgen | conda litex-hub (all --override-channels -c litex-hub -c conda-forge — the ToS-gate workaround) |
| ORFS flow + platforms | shallow fetch of the commit the bundle was validated with (no submodules, no build); a read-only system checkout never counts as installed |
| sky130A PDK | conda open_pdks.sky130a → the big volume (never volare — proxy/rate-limit caveat) |
| torch / torch_geometric / pandas | python3 -m venv + pip (CPU wheels) |
"No sudo" means download pre-built binaries into a user-writable prefix — not compile in userspace.
With root, core/frontend may instead build ORFS from source (--yes-gated, ~30 min); every other
tier is already root-free. What cannot be self-healed (conda/network blocked, no ≥15 GB volume, a
GLIBC older than the bundle's floor — use --build) escalates with a clear HINT — never a silent failure.
| Flag | Effect |
|---|---|
--dry-run | Detect + plan only; install nothing. Always run this first. |
--yes / -y | Non-interactive; accept the plan (incl. --yes-gated heavy tiers). |
--prefix DIR | Big-volume root for the conda install, PDK, and torch venv. |
--tiers a,b,c | Act only on a subset (core,frontend,sky130,klayout,pdk,graph). |
--graph-python P | Pin an existing torch venv (R2G_GRAPH_PYTHON) instead of building one. |
--plan-from FILE | Plan against a saved detect dump (review / tests) — implies --dry-run. |
--deploy [--link] | After provisioning, run install.sh to deploy the skills (--link recommended). |
scripts/flow/_env.sh is byte-identical across all three skills (md5 a5ac873e…) — the same
resolver the flow scripts use; edit every copy together.env.local.sh writes only what autodetect misses, so
it never fights _env.sh.--dry-run and --plan-from install nothing — the plan is always previewable before any action.references/setup.md — tiers, the no-sudo path in depth, and troubleshooting.docs/superpowers/plans/r2g-skills-bootstrap-2026-07-08.md — full design + rationale.bootstrap.sh (opens in a new tab)references/pdk_packages.json (opens in a new tab)references/setup.md (opens in a new tab)references/slang_bundle.json (opens in a new tab)references/toolchain_bundle.json (opens in a new tab)scripts/flow/_env.sh (opens in a new tab)scripts/flow/check_env.sh (opens in a new tab)scripts/setup/_setup_lib.sh (opens in a new tab)scripts/setup/collect_klayout.sh (opens in a new tab)scripts/setup/detect_env.sh (opens in a new tab)scripts/setup/install_asap7.sh (opens in a new tab)scripts/setup/install_core.sh (opens in a new tab)scripts/setup/install_frontend.sh (opens in a new tab)scripts/setup/install_graph.sh (opens in a new tab)scripts/setup/install_klayout.sh (opens in a new tab)scripts/setup/install_pdk.sh (opens in a new tab)scripts/setup/install_platform_rules.sh (opens in a new tab)scripts/setup/install_sky130.sh (opens in a new tab)scripts/setup/install_slang.sh (opens in a new tab)scripts/setup/make_toolchain_bundle.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: skills.0: Invalid string: must start with "./", skills.1: Invalid string: must start with "./", skills.2: Invalid string: must start with "./", skills.3: Invalid string: must start with "./"
.claude-plugin/plugin.json: skills.0: Invalid string: must start with "./", skills.1: Invalid string: must start with "./", skills.2: Invalid string: must start with "./", skills.3: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
4 skills in this plugin
/def-graphConvert clean, signed-off physical-design files (DEF/LEF/liberty/SPEF from an ORFS backend run) into training-ready PyTorch-Geometric graph datasets. Use when the user wants to build a graph dataset from placed-and-routed designs — the five graph views (b–f), the tech-lib/LEF/DEF parser, node/edge feature extraction, or per-cell/per-net labels (congestion, RC parasitics, wirelength, timing, IR drop). Companion to the signoff-loop skill, which produces the physical-design inputs this skill consumes./rtl-acquireDiscover, screen, and acquire RTL at corpus scale (local trees, repo manifests, keyword search) and expand it — synthesis-only, MANY designs per round — into pre-layout netlist_graph.pt PyG graphs with dedup, quality scoring, and publish gating. Use for growing a training corpus of netlist graphs from found RTL. NOT for taking one design to GDS/signoff (that is signoff-loop) and NOT for post-layout graph datasets from DEF/SPEF (that is def-graph)./signoff-loopDrive an open-source EDA workflow from RTL to GDS with full signoff (DRC, LVS, RCX) using OpenROAD-flow-scripts (ORFS), Yosys, KLayout, Magic, Netgen, and OpenRCX — plus a self-improving observation→ingest→act loop that learns repair recipes to eliminate DRC/LVS violations and close timing at the best Fmax. Use when the user wants to turn a hardware spec or RTL into synthesis, place-and-route, GDS output, signoff verification, parasitic extraction, PPA iteration, flow-failure diagnosis, autonomous fix/learn campaigns, or a multi-project dashboard. The clean, signed-off DEF/LEF/SPEF it produces are the inputs to the companion def-graph skill (graph dataset construction).Other plugins' skills for the same job