# Eda Install

> Detect a machine's environment and install + verify the open-source EDA toolchain that the signoff-loop and def-graph skills need — OpenROAD-flow-scripts (openroad/yosys), iverilog, KLayout, Magic, Netgen, OpenSTA, the sky130A PDK, and the torch+torch_geometric graph venv. Use when setting up a new machine, when `check_env.sh` reports missing tools, when the user asks to install/bootstrap/provisi…

- **Type:** Skill
- **Install:** `agentstack add skill-shenshan123-r2g-skills-eda-install`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ShenShan123](https://agentstack.voostack.com/s/shenshan123)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ShenShan123](https://github.com/ShenShan123)
- **Source:** https://github.com/ShenShan123/r2g-skills/tree/main/r2g-skills/eda-install

## Install

```sh
agentstack add skill-shenshan123-r2g-skills-eda-install
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# eda-install Skill

**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.

## The one command

```bash
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.

## What it does — detect → plan → install → pin → verify

1. **Detect** (`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.
2. **Plan** — `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).
3. **Install** — each tier is `scripts/setup/install_.sh`; `bootstrap.sh` dispatches to one the
   moment it exists (and until then prints the command it *would* run). One extra **on-demand helper
   outside the default plan**: `--tiers platform_rules` materializes 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).
4. **Pin** (`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`.
5. **Verify** — runs `scripts/flow/check_env.sh` (ORFS + required + optional + graph stage +
   platforms) and reports the same table the README documents.

## The channel is chosen for you: no-sudo is the default

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, iverilog, verilator, klayout, magic, netgen, opensta | conda `litex-hub` (all `--override-channels -c litex-hub -c conda-forge` — the ToS-gate workaround) |
| ORFS flow + platforms | `git clone --recursive` — **no build**; `env.local.sh` points `OPENROAD_EXE`/`YOSYS_EXE` at the conda binaries |
| 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 too old for the conda binaries) **escalates with a clear HINT — never a silent failure.**

## Flags

| 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). |

## Invariants (honesty layer)

- **`scripts/flow/_env.sh` is byte-identical across all three skills** (md5 `a5ac873e…`) — the same
  resolver the flow scripts use; edit every copy together.
- **Detection is read-only and total** — it emits every key (empty == absent) and never exits non-zero
  for a missing tool.
- **The pin file is idempotent** — regenerating `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

- `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.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ShenShan123](https://github.com/ShenShan123)
- **Source:** [ShenShan123/r2g-skills](https://github.com/ShenShan123/r2g-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-shenshan123-r2g-skills-eda-install
- Seller: https://agentstack.voostack.com/s/shenshan123
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
