/jitx-skills:jitx-substrate-modelerfrom jitx-skills
Models PCB substrates and stackups from fabrication house reports (CSV, PDF, quote). Defines layers, vias, routing structures, impedance control, differential pairs, and fabrication constraints.
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.
Write one Python file holding the substrate. API shapes, units and pitfalls are in the docstrings of jitx.stackup, jitx.via, jitx.si, jitx.substrate, jitx.constraints, jitx.inspect, jitx.test and jitxlib.physics, and in the JITX docs page Substrate & Stackup (its Vias section: layer indices count conductors only).
jitxexamples.substrates.generic_20layer shows the stackup, fab-rule and signal_via/gnd_via accessor shape; its materials are placeholders, not sourced values.
jitx skill. Design assembly: jitx-project-builder.jitx-layout-constraints. The substrate declares no design rule.jitx skill's architectural patterns 4a and 7.jitx-code-review.Trace every value to a source row, cell or field. The only derived values are this skill's named defaults, each labeled at its call site and under Provenance; anything else unstated is a question for the user. With no document, ask for a datasheet for Dk, Df and their frequency; label any value used without one at its call site (# skill default: assumed, no datasheet) and list it as an open item. Before writing any code, send the user a message of its own restating the document: layer count and construction, each dielectric's Dk/Df and frequency, foil weights and Rz, vias, impedance targets, fab rules, and what is ambiguous, with a question for each ambiguity. The completion summary does not stand in for it.
Traps in any report format:
impedance= is the target the fab was asked to hit, not its solver's figure.min_drill_diameter takes the laser figure). A rule with no JITX field is a hand-checked capability limit.Then:
Stackup, not Symmetric, so each layer keeps its source id; name copper layers for source id and function.material_name; generic constants get a generic name. Record matte and drum Rz (µm, as stated) in the conductor's docstring. If you set the roughness scalar, it is read as mm: matte-side Rz ÷ 1000.Via class on the substrate registers on the board. Set models= only from simulated or measured models the source supplies; a fab report has none (see Via.models). A via the report caps sets filled = True. Via layer indexes are absolute and do not flip (see Via), and a via runs from start_layer down to stop_layer (Substrate & Stackup, Vias), so every via runs top to bottom whichever side it is drilled from: a bottom-side via drilled from L12 to L11 is start_layer = -2, stop_layer = -1. A stacked microvia the source lists as one row is one laser Via spanning the stack (L1 to L3 is start_layer = 0, stop_layer = 2).phase_velocity(eps_eff) from the report's modeled eps_eff when it gives one; its docstring gives closed forms otherwise.jitx-layout-constraints, Routing structures by tag). A neck region the report quotes becomes a structure of its own, of its parent's kind, on its rows' layers, with each row's neck width, gap and clearance and the parent's reference planes; regions with identical neck geometry may share one. Velocity and loss come from the parent row, labeled as a default. Its impedance is one of its rows' modeled neck impedances, labeled with that row, never a controlled target: Substrate.routing_structure() looks structures up by impedance. It is applied by a tag on the code-placed Route covering that part, above the parent rule's priority (same link). That Route is split from the rest of the route at a control point (a PairPoint for a pair; jitx-code-layout, narrowing). Builds have confirmed the tagged neck: a single-ended neck on tagged proof routes realized beside 0.4 mm and 0.5 mm pitch pads, where the parent structure reported Unrealizable Route: Insufficient space; a differential neck split at a code PairPoint realized 0.08 mm traces with a 0.1 mm gap (under that design's 0.127 mm fab floors, which a structure overrides) inside a BGA field where the parent structure found no path, and the full 0.2 mm traces with a 0.2 mm gap outside it. Do not use RoutingStructure.NeckDown or DifferentialRoutingStructure.NeckDown for a neck: a DifferentialRoutingStructure.NeckDown did not activate on a code pair route, and RoutingStructure.NeckDown was not tested.H_L1_L3 = 0.100 + 0.150, the dielectrics between L1 and L3), then write 2: 3 * H_L1_L3, # skill default: 3x dielectric height. Strict source-only: omit .reference(), docstring the planes and name the omission as an open item; never pass None widths.symmetric_routing_layers cannot mirror a fence whose via is not symmetric about the board center: list each fenced layer explicitly.FabricationConstraints fields are mandatory; a missing one fails translation. Only the four min_copper_* fields are engine-enforced, and not everywhere: spacing is not enforced between copper of one net, and land-pattern pads sit as drawn even at the board edge (jitx-code-layout, fab floors). A routing structure's trace width and pair gap take precedence over them, so a structure row the report quotes below its floors is kept as quoted and listed as an open item for the user, never raised to the floor or passed silently. Each capability limit with no JITX field goes in the rules class docstring with its unit (N mm, N:1, N stacked levels); a length may instead be a custom mm attribute on the rules class; a ratio or count is never an attribute.jitx skill's check.py on the substrate's directory, then, with the project's interpreter, check_labels.py on the substrate file and the design file, and via_order.py --layers <copper layer count> on the substrate file. via_order.py exits 1 on a via written bottom to top or one it cannot check; fix the via, not the check.Design binds your substrate (jitxexamples.patterns.fenced_pour_outline is a minimal one), never a SampleDesign subclass or SampleSubstrate. Its own numbers (pad sizes, gaps, coordinates) take the same call-site labels as the substrate's. Run jitx build; with no runtime, jitx build --dry --no-dependency-check still translates, but passes no build gate.jitx.test.TestCase (outside its context most reads of a design fail silently), assert the layer count first, and pass strict=True to every zip. Test default widths against their formula, not the source.## Substrate check
Source: <document + revision/date | user spec>
Stackup: <N> copper layers, soldermask included; summed <x.xxx> mm vs stated <x.xxx> mm under the source's inclusions and precision: reconciles | MISMATCH | not performed: <unstated row>
Materials: <N> dielectrics, <N> conductors, one class per distinct row; Dk/Df, frequency, thickness, roughness; no-field values docstringed
Units: one converted row's arithmetic (mil x 0.0254): <row>
Vias: <N> defined / <N> in source: <ids>; spans (top to bottom), pad/hole, fill/cap/tent; annular rings and aspect ratios on the stated depth basis
Routing structures: <N> / <N> controlled rows and how they collapse; target impedance; layer entries <list>; velocity from eps_eff; pair gap edge-to-edge; uncoupled regions; neck structures; reference planes
Fab rules: <N>/<N> mapped; capability limits documented: <list>; contended fields, held vs hand-checked: <list | none>
No-field walk: every section walked; docstringed: <list>
Provenance: values with no source row: NONE | <list + labeled rule>
Checks: check.py, check_labels.py and via_order.py lines verbatim; source-driven tests <N passed | failures | n/a>; build <clean | not run: reason>
Verdict: complete | open items: <list>
Derive the Verdict from the rows: a mismatch, an unsupported claim, or a failed, skipped or unavailable check is an open item, and "complete" with a caveat is "open items". A thickness solved as the balancing term is an open question, and the Stackup row reads "not performed".
evals/cases/fenced-rf-substrate.json (opens in a new tab)evals/cases/fixtures/QCW-HDI12_Fab-Stackup_RevB.csv (opens in a new tab)evals/cases/fixtures/pdf_TIC-8L_Stackup-Report_RevC.pdf (opens in a new tab)evals/cases/fixtures/pdf_TIC-8L_Stackup-Report_RevC_twin.csv (opens in a new tab)evals/cases/fixtures/rf_PC-6L_Fab-Stackup_RevA.csv (opens in a new tab)evals/cases/fixtures/rf_fence_spec.txt (opens in a new tab)evals/cases/hdi-substrate-from-csv.json (opens in a new tab)evals/cases/stackup-from-pdf-report.json (opens in a new tab)evals/cases/substrate-api-retrieval.json (opens in a new tab)evals/cases/symmetric-4-layer-no-report.json (opens in a new tab)evals/eval-contract.yaml (opens in a new tab)evals/routing.jsonl (opens in a new tab)scripts/check_labels.py (opens in a new tab)scripts/test_check_labels.py (opens in a new tab)scripts/test_via_order.py (opens in a new tab)scripts/via_order.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pcb-design, substrate-modeling, stackup, impedance-control, jitx
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-interactive-layoutUse when the user asks to place components, route nets, drop vias, add pair insertions or route points, or draw pours in the open board layout from a script, so the result stays editable in the board editor: place and route a board or circuit, fan out a BGA, route DDR byte lanes, change a layout the user edited by hand, fix blocked routes, report layout issues or skew margin. Runs Python against a live design through jitx design session and jitx design exec, with the rd.layout requests (place, route, via, route_point, pair_insertion, region, modify, delete), and reads the result back through route status, rd.issues() and the bundled checks. Assumes the layout constraints are already in the design. Design rules, net classes, tags and escape-width rules in code belong to jitx-layout-constraints; decoupling modules to jitx-circuit-builder; copper, code-placed vias, code Route objects and control points in code to jitx-code-layout; topology, timing and skew constraints to jitx-interconnect-constraints.Other plugins' skills for the same job