/jitx-skills:jitx-interactive-layoutfrom jitx-skills
Places components, routes nets, drops vias, adds pair insertions or route points, and draws pours in an open board layout via Python scripts using jitx design session and exec. Results stay editable in the board editor. Handles BGA fan-out, DDR byte lane routing, blocked route fixes, and layout issue reporting.
Ships in jitx-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.
Place and route from a script, as edits to the open layout. Everything made
here (placements, routes, vias, control points, pours, keepouts) is an
ordinary layout object the user can edit in the board editor. A Route in
the design's Python is not: the editor cannot change what its code sets.
The runtime saves the layout under designs/<design>/design-info/. That is
the work; commit it with the source.
There are two ways in, and most work alternates between them:
| Task | Skill |
|---|---|
| Place, route, vias, pair insertions, route points, pours, keepouts in the open layout; read back status, issues, margins; floorplan and routing solvers | this skill |
| Design rules, net classes, tags, power widths, escape widths | jitx-layout-constraints |
| Decoupling modules | jitx-circuit-builder |
Copper, code vias, code Routes, control points in code; drawing the realized geometry | jitx-code-layout |
| Topology, timing, skew, loss constraints | jitx-interconnect-constraints |
| provide/require pools, swapping | jitx-pin-assignment |
| Stackup, via definitions, routing structures | jitx-substrate-modeler |
The base jitx skill owns setup. jitx.run is experimental: check a
refused call's signature with help(jitx.run.layout.SyncLayout).
Work around these and say where they affected the result.
provide/require
and route to the ones you choose.rd.nets, a pad's or control point's net) can
still show the old assignment until a fresh capture. Check connectivity
after a re-solve from the copper and the pads you chose, or from a fresh
capture (restart the session), not from those labels.exec starts failing unexplained, restart the
session.exec after it fails with message could not be delivered. Send large work
in batches of tens of objects, deletes included, with a sync between.
To recover, stop the session (jitx design session --stop), confirm no
session process is left, then start one. Never
start a second session while one is alive, and never run two execs at
once.mkdir -p .jitx
jitx design build my_pkg.main.MyDesign # once, if exec reports the board outdated
jitx design session my_pkg.main.MyDesign > .jitx/session.log 2>&1 &
jitx design exec my_pkg.main.MyDesign scripts/place.py # runs main(rd)
jitx design exec my_pkg.main.MyDesign scripts/place.py -f fix # runs fix(rd)
jitx design session --stop my_pkg.main.MyDesign
jitx runtime start --background. One session per design.exec fails with message could not be delivered until the session is
up: retry for a minute, then read .jitx/session.log..at(floating=True)) has no frame for its
position, and its placement is lost when the session restarts. Give
each block's circuit a placement in the source (.at(x, y) at the
block's floorplan origin), rebuild, then place its parts; their
placements and the user's moves then survive restarts. Say which
circuits you placed.rd.root is the design tree, rd.layout takes requests, rd.query(T)
yields (trace, obj), rd.nets.find(pad) gives a net, rd.issues() the
report. The return value prints as JSON; keep it small.exec does not put the script's folder on the import path; add it with
sys.path.insert.Board-absolute mm and degrees CCW; layer 0 is top, -1 is bottom.
| Request | Does |
|---|---|
place(comp, (x, y), rot, on=Side.Top) | Move a component |
route(a, b, layer, turns=, width=, space=, pour=) | Route two endpoints; turns=None autoroutes, a list guides it, [] is a straight sketch |
via(defn, pad, (x, y), layer, force=False) | Via routed from pad, nudged to a free spot unless force |
route_point(origin, (x, y), layer) | Control point routed from origin |
pair_insertion((p, n), (x, y), rot, layer), drop_pair_insertion, pair_point | Diff-pair merge point and coupled continuation |
region(Pour(ConvexHull([...], expand=), layer, rank=), net=) | Pour, keepout, cutout |
modify, update_via, update_control, update_region, delete | Change or remove |
sync(timeout) | Wait for routing and checks to settle |
place and delete do not wait; sync after them.with rd.layout.batch() as b: applies in order, all or nothing. A via or
control point made in a batch can be used from the next batch.RequestRejected; read its message.Signatures, handles, rejection kinds, read-back paths: references/api.md.
Accepted is not done: routes realize in the background, can come out blocked, and later copper can push earlier routes into blocked.
jitx design exec my_pkg.main.MyDesign <skill>/scripts/layout_report.py # state.json
jitx design exec my_pkg.main.MyDesign <skill>/scripts/layout_report.py -f issues_all
jitx design exec my_pkg.main.MyDesign <skill>/scripts/layout_checks.py # checks.json
| Read | Tells you |
|---|---|
| report summary | ideal and unplaced parts, courtyard overlaps, parts off the board, blocked routes, split, empty and fill_unknown pours (sync and rerun), issue counts, tightest skew and loss margins; a pending category means rerun |
report changed | what moved, appeared or went away since the previous report, the user's editor changes included |
connectivity | nets whose pads are not all joined by routes, vias and pour fills; rd.issues() does not report an unrouted plain net |
vias | per pad-to-pad connection, its vias: one its ends did not need (redundant), or one farther than via_reach_mm from the end it serves (far_from_end); every via joined on fewer than two layers (dangling), and every via in a pad whose definition does not allow it (via_in_pad) |
sanity | parts past the board edge (except those named in overhang), courtyard overlaps, vias outside the board |
circuitousness, loops, decap_vias, power, power_paths | placement and routing quality (references/general-pnr.md) |
issues_all | every constraint result with its margin; SI passes or fails here, never on your own estimates (references/si-pnr.md) |
rd.issues() does not check trace clearance; measure it from the copper
where a rule matters. Write a scorer for anything else you are optimizing
and run it every batch.
ShortTrace pairs, routing structures,
bounds, vias, stackup), each with its source file. If the constraints a
task needs are missing, hand off to jitx-layout-constraints or
jitx-interconnect-constraints. ideal_parts in the report: tell the
user and place around them only if they agree. A plane pour the stackup
leaves open is the user's call; if you cannot ask, add one and say so.general-pnr.md, Floorplan by blocks). Place each block's circuit at
its region's origin (Session, above).general-pnr.md, Via plan). For an interface
under SI constraints, one pin assignment for the whole interface first
(si-pnr.md).scope in the checks
config) before the next.The user's changes are the brief. Treat everything they placed, moved, routed or deleted as fixed unless they ask otherwise.
layout_report.py, and read
changed and the checks to see what the user did and what it broke.Before calling a build or an edit done, look at the board the way a
reviewer would. Draw it if that helps: the realized geometry (courtyards,
pads, route copper, vias, pour fills, the board outline) is readable from
Python, and jitx-code-layout covers reading it. Answer each:
overhang with its reason.connectivity, vias and sanity met; no blocked route.issues_all: no error-severity issue and every category complete; for
SI designs every skew, delay and loss check met with margins, and every
differential pair coupled on its structure.Do not write rules or tags in the source from here.
evals/cases/buck-local-pnr.json (opens in a new tab)evals/cases/ethernet-board-pnr.json (opens in a new tab)evals/cases/limits-stated.json (opens in a new tab)evals/cases/lpddr4x-byte-lane.json (opens in a new tab)evals/eval-contract.yaml (opens in a new tab)evals/routing.jsonl (opens in a new tab)references/api.md (opens in a new tab)references/general-pnr.md (opens in a new tab)references/si-pnr.md (opens in a new tab)scripts/layout_checks.py (opens in a new tab)scripts/layout_report.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jitx-inc/jitx-skills --plugin jitx-skills13 skills in this plugin
/jitxBase skill for JITX Python PCB design: install, the jitx CLI, auth and the runtime, building designs, the viewers, exports, code quality (ruff, pyright, type annotations, check.py and grep gates), and design introspection (jitx.inspect, jitx.query, runtime submit). Use to set up JITX, start the runtime, build or find a design, open the viewer, fix a build or environment error, or find things in a design from Python. Route a whole board from requirements to jitx-project-builder, code self-review to jitx-code-review, component modeling to jitx-component-modeler, wiring and passives to jitx-circuit-builder, stackups to jitx-substrate-modeler, layout in code and realized-geometry checks to jitx-code-layout, open-layout place and route to jitx-interactive-layout, design rules, stitching, fencing and routing structures by tag to jitx-layout-constraints, SI constraints to jitx-interconnect-constraints, pin flexibility to jitx-pin-assignment, mechanical CAD to jitx-mechanical, and JLCPCB fab and parts to jitx-jlcpcb./jitx-circuit-builderUse when the user asks to "wire up", "connect", "build a circuit", create an "application circuit", declare a circuit's typed ports or bundles (Power, I2C, RGMII), compose sub-circuits into a hierarchy and connect them port to port, "place components" or sub-circuits (fixed or floating), add passives (resistors, capacitors, inductors) or decoupling, or set up power connections. Covers the Circuit class, nets and the + operator, typed ports, hierarchy, placement, and jitxlib-parts passives. Drawing a pour or copper is jitx-code-layout; pour rules are jitx-layout-constraints; provide/require pin assignment is jitx-pin-assignment./jitx-code-layoutUse when the user asks to write a fixed PCB layout in Python: place vias, and parts relative to another instance (Circuit.place), code routes through control points (RoutePoint, PairPoint, PairInsertion), Route.Sketch, Route.Config, a Route.Target taper, narrowing a route in a BGA field or a fine-pitch pad, escape or fanout geometry fixed by a stated number or pad geometry, a connector launch on its pad axis, serpentine or deskew settings on a matched section, thermal vias in an exposed pad, pours, keepouts, cutouts, Copper or OverlappableCopper (antennas, net ties), or reading the realized layout back (capture, Empty pours, 'Unable to find path'). Sorts control points between code and jitx-interactive-layout. Tag rules, escape width rules, stitching and fencing go to jitx-layout-constraints; stackups, vias and structure definitions to jitx-substrate-modeler; land-pattern mask, paste and thermal pads to jitx-component-modeler; nets and passives to jitx-circuit-builder; timing to jitx-interconnect-constraints./jitx-code-reviewSame-model self-critique pass for JITX Python code just written in this workspace. Use when the user asks to "review my JITX code", "self-critique", "check JITX conventions", "find string-hacking", "check framework-boundary issues", "audit before merge", or any equivalent. Mandatory for complete-board tier at task acceptance (folds into Think Twice); user-invoked for single-task work. Catches the architectural failure modes that grep gates and static linters miss — parallel string-keyed models, reflection-as-iteration (regardless of whether on self), owner-shaped data misplaced in design code, build-spec-then-iterate, module-import-time parallel models, and framework-boundary-bypass (the "framework does it, therefore so can I" trap). Applies an ownership test to every banned-pattern hit or proposed exception. Produces severity-tagged findings (CRITICAL / WARNING / NOTE) that fold into the task acceptance block./jitx-component-modelerCreate JITX Python component code from datasheets, KiCad footprints, vendor pin files, or user specifications. ALWAYS use this skill when user asks to "create a component", "model a part", "generate a component", "add a component", or "make a JITX component" - even without a datasheet. Also triggers on part numbers (NE555, LM1117, RP2040) and package types (SOIC, QFN, BGA, SON, SOT). Covers JITX generators for standard packages, a vendor's KiCad footprint read directly for non-standard ones, multi-unit symbols, thermal pads, pin mappings, and datasheet checks with jitx.test.TestCase. Also covers generating from a vendor's machine-readable pinout file rather than a drawing ("generate the FPGA from the pin file", "parse the package pinout file", "model this 1000-ball BGA"): parse-don't-transcribe, reconcile the ball inventory before emitting, and a committed generator with a regenerate-and-diff check. For choosing and placing an ordinary queried passive, use jitx-circuit-builder instead./jitx-interconnect-constraintsUse when the user asks about timing constraints, skew matching, insertion loss limits, pin models (bridging, terminating, via models), proving that an SI constraint applied, or debugging a constraint that does not measure in the design issues report. Also covers differential pairs, DiffPair bundles, skew across a bundle or against a clock, protocol constraints for PCIe, USB, DisplayPort, RGMII, Ethernet, DDR, reference planes, length matching, impedance-controlled routing, SignalConstraint definitions, and daisy-chain or flyby topologies built with the double-greater-than operator. Covers Topology, Constrain, ConstrainDiffPair, ConstrainReferenceDifference, DiffPairConstraint, BridgingPinModel, TerminatingPinModel, ReferencePlanes, and protocol-specific constraint patterns. Trace width and clearance rules belong to jitx-layout-constraints. Pin muxing and lane or polarity swappability belong to jitx-pin-assignment. Stackups and routing-structure definitions belong to jitx-substrate-modeler.Other plugins' skills for the same job