/jitx-skills:jitx-code-reviewfrom jitx-skills
Performs an architectural self-critique of JITX Python code, catching failure modes like string-keyed models, reflection-as-iteration, and framework-boundary bypass. Produces severity-tagged findings (CRITICAL/WARNING/NOTE).
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.
Task-level architectural self-review for JITX Python code just written in the current workspace. The reviewer agent reads the code with a checklist-bound, evidence-anchored framing — different from the framing under which the code was written — which is what catches what the in-session author rationalized as fine.
This skill is the per-task same-model pre-pass in the Think Twice flow (see jitx-project-builder/references/task-execution.md Part A Step 4 and Same-model passes precede codex (two distinct pre-passes, two distinct scopes)). It catches architectural and code-craft smells (string-hacking, parallel models, naming hygiene). Codex outside-voice — which runs only for trigger-list task classes (MCU/FPGA, RF, power, safety, high-speed digital, battery) — catches the JITX-engineering-domain issues (datasheet-vs-code, impedance/return-path, voltage-divider math).
Phase 3b's same-model pre-pass is the four-pass design audit (not this skill) — see Phase 3b Design Audit Block (complete-board only). By the time Phase 3b runs, every Phase 1/2/3 task has already passed its per-task jitx-code-review and the findings live in the task acceptance blocks.
jitx-project-builder skill invokes this at the Think Twice step in task-execution.md Part A Step 4 (before the orchestrator's acceptance review). The task acceptance block's JITX code review (self): field carries the finding count + disposition; missing or not run defaults to block.jitx-project-builder/references/outside-voice-review.md).<ns>/ directory (everything just written for the current task). The orchestrator may scope tighter (single file) when invoking from Think Twice.jitx/SKILL.md Don'ts (always)jitx/references/architectural-patterns.md (always — this is the worked-counter-example source for the dominant failure modes)jitx-code-review/references/checklist.md (the pattern index over the architecture doctrine)The review is evidence-anchored: every finding cites file:line and quotes a rule sentence (from SKILL.md or a reference file). Findings without a citation are downgraded to NOTE.
<ns>/, but a scoped run can target a single file.references/checklist.md). For each pattern, look for instances; for each instance, capture severity and citation.jitx/references/architectural-patterns.md). The dominant failure modes are encoded there as worked counter-examples (Bad/Good + rationale); check each one against the code under review.jitx/references/architectural-patterns.md § 9 → Ownership test, already loaded at step 4. The pattern checklist names patterns; the ownership test catches the framework-boundary-bypass failure where the AI rationalizes a banned pattern as "OK because the framework does it."The skill does not modify code. Findings → caller → fix decision → next iteration.
The test itself is doctrine, not review procedure: the five questions live in jitx/references/architectural-patterns.md § 9 → Ownership test, which step 4 has already loaded.
Run them against two things:
getattr, type(...), _protected_method(), etc.).getattr is OK because…", "this is the boundary call into the framework…").A proposed carve-out that fails the test is not accepted. When the test resolves to "outside the owner, copying internals" — or to a banned pattern wrapped to look like a single boundary call — classify the finding as framework-boundary-bypass (CRITICAL; see references/checklist.md) and recommend the subclass-adapter fix.
This step exists because rule text alone wasn't sufficient: in a real review, the AI followed the no-getattr rule literally (one wrapped getattr call) but missed the rule's intent (don't replicate framework internals in design code) and produced a design coupled to a numbering scheme that the reviewer caught.
Same vocabulary as outside-voice-review.md for consistency:
jitx/SKILL.md Don'ts or architectural-patterns.md. Must be fixed before the task can be accepted. Examples: getattr(self, f"..."), module-level loop populating a global dict, design file with _SIGNAL_LAYER_TO_VIA that duplicates the substrate.list[dict] that might be a legitimate parameter-staging pattern, an f"X_{i}" that might be a log message). Each WARNING needs a disposition: fix or accept with rationale: <why>.from __future__ import annotations, named constant used exactly once, suboptimal naming).Combined with the codex outside-voice precedence rule: any CRITICAL or WARNING finding here changes the combined verdict to issues-pending even if codex says clean. Same rule, two same-tier reviewers.
## JITX code review — <scope, e.g., <ns>/circuits/<circuit>.py>
**Reviewer:** jitx-code-review (same-model self-critique)
**Scope:** <list of files reviewed, with revision/commit if relevant>
**Rule sources read:** jitx/SKILL.md, jitx/references/architectural-patterns.md, <subskill SKILL.mds if relevant>
### CRITICAL
- **<pattern tag>** at `<file>:<line>` — <one-line description>. Rule: "<verbatim quote>" (from <source>). Disposition required.
- ...
### WARNING
- **<pattern tag>** at `<file>:<line>` — <one-line description>. <Why this might be the failure mode vs. legitimate use.> Disposition: fix | accept with rationale: <why>.
- ...
### NOTE
- **<pattern tag>** at `<file>:<line>` — <one-line description>.
- ...
### Summary
CRITICAL: <count> | WARNING: <count> | NOTE: <count>
The <pattern tag> is from the checklist (e.g., string-keyed-model, reflection-as-iteration, owner-shaped-data-misplaced, parallel-data-model). Pattern tags are orthogonal to severity — a single pattern can produce CRITICAL or WARNING findings depending on the specific instance.
pyright and ruff check still run as part of the task acceptance block. They catch type / lint issues; this skill catches architectural smells they can't see.jitx build still runs. This skill is purely a code-quality pass.The skill can become ritual if the reviewer agent passes everything as clean without doing the work. Concrete signals the orchestrator should treat as suspicious:
CRITICAL: 0 | WARNING: 0 | NOTE: 0 on a parametric / generator task where the architectural patterns are likely to surface.file:line citations or rule quotes.NOTE when the pattern checklist named CRITICAL-eligible patterns.all accepted, all framework code) on review-required grep-gate hits — each hit needs a per-line rationale.fix/resolved/accepted with no cited evidence — no fix commit or file:line showing the change, and no stated acceptance rationale. "Resolved" with neither is the author-side form of compliance theater (e.g. a reviewer reopening a thread marked resolved with "not sure what the resolution is"). A resolved disposition must point at the diff that resolved it or say why it's accepted as-is.A valid review output should let a reader open the cited file at the cited line and verify the finding in under a minute.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
13 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-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./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.npx claudepluginhub jitx-inc/jitx-skills --plugin jitx-skillsOther plugins' skills for the same job