From r2g-skills
Discovers, screens, and acquires RTL at corpus scale, synthesizes into pre-layout netlist graphs (PyG) with dedup and quality scoring for ML training corpora.
How this skill is triggered — by the user, by Claude, or both
Slash command
/r2g-skills:rtl-acquireThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Execute a staged, artifact-first corpus-expansion workflow for discovered RTL:
OPEN_SOURCE_SETUP.mdREADME.mdoptional_tools/INSTALL_FROM_SOURCE.mdoptional_tools/README_optional_tools.mdreferences/README.mdreferences/architecture_layers.mdreferences/candidate_csv_schema.mdreferences/candidate_policy.jsonreferences/definition_of_done.mdreferences/design_quality_policy.mdreferences/env.local.sh.templatereferences/failure_case_schema.mdreferences/failure_family_taxonomy.mdreferences/failure_knowledge_base.mdreferences/failure_strategy.jsonreferences/llm_api_integration.mdreferences/llm_repair_policy.jsonreferences/mutation_policy.jsonreferences/operation_matrix.mdreferences/publish_policy.jsonExecute a staged, artifact-first corpus-expansion workflow for discovered RTL: acquire → expand (synth-only) → repair → validate → publish. Prefer deterministic scripts and policy files; treat the workspace ledgers and manifests as the source of truth.
Positioned upstream of the other r2g-skills: it feeds a stream of screened,
synthesized, graph-converted designs. It never runs place/route or signoff
— hand a promising design to signoff-loop for that.
OWNS (the heart — genuinely net-new for r2g):
_downloads trees, repo manifests, keyword search), RAM/macro
exclusion, bundle-aware candidate CSVs, incremental scan ledgers.BORROWS (converged onto sibling sub-skills — never reimplement these here):
scripts/flow/_env.sh +
references/env.local.sh pin written by eda-install (skill_env.py is a
thin delegate over it).signoff-loop/scripts/flow/run_orfs.sh with
ORFS_STAGES=synth (per-candidate project dirs; the r2g Hard Rules hold by
construction).def-graph/scripts/extract/graph/netlist_graph.py
produces every corpus graph (netlist_graph.pt); the legacy 30pt converter
is retired (2026-07-09 amendment).knowledge/knowledge.sqlite (R2G_FLOW_SCOPE = synth_only); frontend
failure classes land as synth-frontend-<class> failure_events.R2G_ACQUIRE_*)<repo>/design_cases/_rtl_acquire (R2G_ACQUIRE_ROOT)$R2G_ACQUIRE_ROOT/_downloads (R2G_ACQUIRE_DOWNLOADS)$R2G_ACQUIRE_ROOT/workspace (R2G_ACQUIRE_WORKSPACE)
candidates/ scan_state/ failures/ quality/ audits/ runs/
manifests/ — the ledger surfacessynth_projects/<design>/ — per-candidate ORFS project dirs
(constraints/config.mk + constraint.sdc + backend/ + reports/)$R2G_ACQUIRE_ROOT/corpus (R2G_ACQUIRE_OUT) —
per-design netlist_graph.pt, mapped_netlist.v, cell_stats.json,
design_meta.json, plus index.csv + _design_status/$R2G_ACQUIRE_ROOT/orfs_seed_designs
(R2G_ACQUIRE_SEED_ROOT)$R2G_ACQUIRE_ROOT/netlist_graph_corpus_manifest.csv
(R2G_ACQUIRE_MERGED_MANIFEST)Never hand-configure tools here. Resolution order (same as every r2g skill):
shell env > $R2G_ENV_FILE > references/env.local.sh (written by
eda-install's write_env_local.sh) > _env.sh autodetection. Verify with
python3 scripts/skill_env.py (prints every resolved root/tool) or the
comprehensive signoff-loop/scripts/flow/check_env.sh.
Knobs specific to this skill:
R2G_ACQUIRE_PLATFORM — target ORFS platform (default nangate45; v1 scope)R2G_ACQUIRE_SYNTH_TIMEOUT — per-candidate synth timeout s (default 3600)R2G_ACQUIRE_NUM_CORES — cap ORFS NUM_CORES per flow (Hard Rule:
concurrent flows × cores ≈ machine cores)R2G_GRAPH_PYTHON — torch venv for graph conversion + scale reports; when
unset those stages SKIP with a HINT and designs record graph_skipped
(never success)R2G_KNOWLEDGE_DB — override the knowledge DB (tests only; default is the
committed signoff-loop store)R2G_ACQUIRE_ENABLE_LLM=1 — opt-in for the LLM patch path (default OFF)Gather candidate RTL from _downloads, repo manifests, or prebuilt CSVs.
scripts/acquire/discover_download_candidates.pyscripts/acquire/discover_repo_manifest_candidates.pyscripts/acquire/clone_repo_manifest.py
Outputs: candidate CSV + updated scan_state/downloads_scan_state.json.RAM/hard-macro keywords are risk markers, never hard rejects (2026-07-10;
the old whole-text substring reject threw picorv32 away on its formal-only
RISCV_FORMAL_BLACKBOX_* macro names): tokenized + comment-stripped matching
lives in scripts/common/rtl_risk.py, the flags ride the candidate notes
column (risk_flags=…), and the synth attempt is the real arbiter — a true
hard-macro dependency fails with evidence and the repair-side classifier
excludes it then. --retry-excluded re-emits candidates parked in
failed_candidates_exclude.csv (a past failure must not permanently block a
retry after a fix).
scripts/execute/expand_candidates.py per candidate: sanitize RTL (encoding,
helper modules, iscas89 dff) → write synth_projects/<design>/ → synth via
run_orfs.sh (ORFS_STAGES=synth, FLOW_VARIANT = the unique candidate id)
→ sv2v/vhd2vl fallback + LEC-lite when needed → dedup by rtl/netlist
signature → convert via def-graph netlist_graph.py → cell_stats.json
(liberty-driven seq/comb split) → ingest into knowledge.sqlite (every
flow, pass or fail).
Outputs: corpus dir updates, refreshed index.csv, _design_status/.
Failed candidates in the index always retry on the next run (only
status==success skips); --force re-runs successes too (regeneration after
a synth/extractor fix). Candidate paths are CWD-proof: ~/$VAR expand, and
relative paths bind to the candidate CSV's directory, then the repo root —
never the caller's CWD (see references/candidate_csv_schema.md).
scripts/repair/classify_failed_candidates.py → retry vs exclude + classscripts/repair/auto_fix_failures.py (deterministic first-line)scripts/knowledge/project_frontend_diagnosis.py — projects the final class
into each failed project's reports/diagnosis.json + fix_log.jsonl and
re-ingests, so knowledge carries synth-frontend-<class> events and the
exclude decision (negative learning)scripts/validate/check_mapped_netlist_duplicates.py (cross-corpus dedup)scripts/validate/audit_near_duplicates.pyscripts/validate/validate_publish_readiness.py → quality/publish_validation.jsonscripts/report/score_design_quality.py + score_download_repos.pyscripts/publish/build_publish_candidates.py → publish eligibilityscripts/publish/refresh_expanded_raw_manifest.py → the merged
netlist-graph corpus manifest (only when the validation gate passes)scripts/publish/record_dataset_snapshot.py → runs/dataset_snapshot_latest.jsonscripts/promote/promote_candidates.py <design …>|--all [--require-publish-eligible] [--platform P] [--run] — one-click conversion of a synth-proven candidate
(index status==success) into a ready-to-run full-flow project under
design_cases/: init_project skeleton, RTL vendored into <project>/rtl/
(self-contained — the synth workspace is cleanable scratch), config.mk from
signoff-loop's template carrying the proven knobs (VERILOG_FILES/INCLUDE_DIRS,
ABC_AREA, SYNTH_MEMORY_MAX_BITS, SYNTH_HDL_FRONTEND, VERILOG_TOP_PARAMS) plus
the floorplan directive (CORE_UTILIZATION, PLACE_DENSITY_LB_ADDON ≥ 0.10) and
WITHOUT R2G_FLOW_SCOPE=synth_only (a promoted project ingests full-flow),
constraint.sdc with a detected clock port (virtual-clock fallback), then
validate_config.py as the readiness gate. Verdict in
<project>/reports/promote.json + provenance in metadata.json; --run
kicks run_orfs.sh immediately. Hand the promoted project to signoff-loop.
python3 scripts/run_expansion_round.py --discover --run-retry
# loops: scripts/run_until_empty.py, scripts/search_and_expand_until_target.py
Check workspace/runs/run_manifest_latest.json + quality/publish_validation.json;
a round is fully successful only when publish gating and the manifest refresh
completed as expected.
design values unique per round.R2G_ACQUIRE_NUM_CORES so flows × cores ≈ machine.failure_event in knowledge.sqlite is a loop bug (check with
scripts/knowledge/project_frontend_diagnosis.py --check <db>).graph_skipped designs are not
publish-eligible; provision R2G_GRAPH_PYTHON and re-run.R2G_ACQUIRE_ENABLE_LLM=1 to opt in; OpenAI fallback additionally needs
OPENAI_API_KEY). Do not route template-placeholder failures to LLM when
deterministic template_materialization applies.success
in index.csv, loadable netlist_graph.pt, cells > 0)cleared)publish_eligible_designs AND the
merged manifest refresh included itflow_scope='synth_only'), synth-fails carry synth-frontend-* eventsreferences/operation_matrix.mdreferences/script_index.mdreferences/candidate_csv_schema.mdreferences/failure_knowledge_base.md,
references/failure_family_taxonomy.mdreferences/*.jsondocs/superpowers/plans/rtl-acquire-ingestion-2026-07-09.mdnpx claudepluginhub shenshan123/r2g-skillsRoutes RTL design tasks to the appropriate action skill or agent. Provides the complete routing table for the RTL design pipeline, including skill-to-agent mapping and invocation rules.
Classifies GateFlow user intents semantically (e.g., RTL creation, testbench, debug, simulate), scores confidence, triggers expand mode for ambiguity, routes to skills/agents.
Base skill for JITX Python hardware design projects, PCB design, circuit creation, board builds, and JITX CLI workflows. Routes component modeling, substrate/stackup, physical layout, and mechanical CAD work to specialized skills.