matlab/matlab-agentic-toolkit/matlab-assemble-pcb-layout
Claude Code and agent skill by matlab/matlab-agentic-toolkit
- community
Checking that the SKILL.md file is still in the repository.
Build custom PCB structures with pcbComponent, shapes, Boolean ops, feeds, and multi-layer stackups for non-catalog geometries. TRIGGER: user asks to build, modify, or customize a pcbComponent — add/remove shapes, edit polygons, place feeds, add metal layers, cut slots, or create non-catalog RF structures. Also when modifying geometry of an existing catalog-designed component (e.g., adding pads, removing elements, editing vertices). Invoke BEFORE writing pcbComponent code — layer/shape/feed API…
Install
npx vskill@latest install matlab/matlab-agentic-toolkit/matlab-assemble-pcb-layoutSKILL.md
Assembling Custom PCB Components
When to Use
- Building custom PCB structures that aren't covered by catalog objects (microstripLine, coupledMicrostripLine, etc.)
- Constructing multi-layer stackups with custom metal shapes on each layer
- Combining shape primitives with Boolean operations (union, subtract, intersect)
- Creating defected ground structures (DGS) by etching patterns into ground planes
- Placing feed ports, vias, or using advanced FeedDefinitions (coaxial, edge, delta-gap)
- Assembling stripline or shielded enclosure structures
When NOT to Use
- Designing standard transmission lines — use
matlab-design-pcb-transmission-line - Importing layouts from Gerber, ODB++, or Allegro — use
matlab-read-pcb-layout - Defining dielectric or metal materials — use
matlab-manage-pcb-material - Running EM analysis after assembly — use
matlab-analyze-em - Cascading or connecting multiple pcbComponents — use
matlab-integrate-pcb-circuit
Typical Workflow
- Before:
matlab-manage-pcb-material— set up substrate and conductor - This skill: Build the custom PCB structure using pcbComponent, shapes, and feeds
- After:
matlab-analyze-em— validate S-parameters →matlab-optimize-pcb-design— tune dimensions →matlab-write-pcb-layout— export Gerber
Quick Reference
| Task | Code | |
|---|---|---|
| Create pcbComponent | pcb = pcbComponent | |
| Assign layers | pcb.Layers = {signal, substrate, ground} | |
| Set board shape | pcb.BoardShape = ground | |
| Set thickness | pcb.BoardThickness = 1.6e-3 | |
| Place feeds | pcb.FeedLocations = [x1 y1 1 3; x2 y2 1 3] | |
| Feed diameter | pcb.FeedDiameter = W/2 | |
| Set conductor | pcb.Conductor = metal("Copper") | |
| Add vias | pcb.ViaLocations = [x y topLayer botLayer] | |
| Visualize | show(pcb) | |
| Layout view | layout(pcb) | |
| Boolean union | shape = s1 + s2 | |
| Boolean subtract | shape = s1 - s2 | |
| Boolean intersect | shape = s1 & s2 |
pcbComponent Anatomy
pcbComponent is the universal container for custom RF PCB structures.
Minimal 2-Layer Microstrip
5-Layer Stripline Structure
Key Properties
| Property | Format | Description | |
|---|---|---|---|
Layers | Cell array | Alternating: metal shape, dielectric, metal shape, ... | |
BoardShape | Shape object | Outer boundary of the PCB | |
BoardThickness | Scalar (m) | Must equal sum of dielectric thicknesses | |
FeedLocations | N×4 matrix | [x, y, signalLayer, groundLayer] per port | |
FeedDiameter | Scalar (m) | Diameter of feed via/probe | |
ViaLocations | M×4 matrix | [x, y, topLayer, bottomLayer] per via | |
ViaDiameter | Scalar (m) | Via barrel diameter | |
FeedViaModel | String | 'strip', 'square', 'octagon', 'hexagon' | |
Conductor | metal object | Conductor for all metal layers | |
SolverType | String | 'MoM' or 'FEM' |
Shape Primitives
Rectangular Traces
Line Traces (multi-segment with bends)
Point-Defined Traces
Spiral Traces
Tapered Traces
Bends
Bend Width is a 2-element vector [w1 w2] for the two arms:
U-Bends
U-bend Width is a 3-element vector [arm1 bottom arm2]:
Other Shapes
Boolean Operations
Combine shapes using operators to build complex geometries.
Union (+)
Subtraction (-)
Create slots, gaps, or etched patterns:
Intersection (&)
Complex Example: U-CSRR Filter
Feed Placement
FeedLocations Format
Each row: [x, y, signalLayerIndex, groundLayerIndex]
- Layer indices are odd numbers (1, 3, 5, ...) for metal layers in the
Layerscell array - Layer 1 = first metal (top), Layer 3 = second metal, etc.
4-Port Coupled Trace
Feed Diameter
Internal Ports (for lumped elements)
Define extra feed locations for internal connections to lumped components (see matlab-integrate-pcb-circuit skill for pcbElement with PortNumber/PortValue).
DGS — Defected Ground Structures
Etch patterns into the ground plane using the dgs method:
DGS adds bandstop characteristics and can improve coupler directivity or filter rejection.
Shielded Enclosures
Add a conductive lid for shielded analysis:
For filter-in-enclosure problems, shielding affects resonant frequencies and coupling.
Shape Manipulation
For catalog objects, extract shapes by layer with shapes():
For pcbComponent, shapes are in Layers and BoardShape:
Discovering Available Methods
Use methods(obj) to list all available operations on any object:
Visualization
Advanced Feed Setup (FeedDefinitions API)
By default, pcbComponent uses FeedLocations (XY coordinates + layer) for simple probe feeds. For advanced feed types — coaxial, edge, delta-gap, finite-gap — switch to the FeedDefinitions API:
Feed Types
| Feed Type | Use When | Key Properties | |
|---|---|---|---|
ProbeFeed | Vertical via probe (patch antennas) | SignalLocations, SignalLayers, GroundLayers, ViaDiameter, ViaModel | |
CoaxialFeed | Probe with explicit pad/antipad geometry | PadShape, AntipadShape, SignalLayers, GroundLayers | |
EdgeFeed | Stripline-style edge excitation | SignalLocations, SignalLayers, GroundLayers, SignalWidths | |
DeltaGapFeed | Internal port with current direction | SignalLocations, SignalLayers, SignalWidths, CurrentDirection | |
FiniteGapFeed | Internal gap port (signal + ground) | SignalLocations, GroundLocations, SignalLayers, SignalWidths | |
ArbitraryFiniteGapFeed | Coplanar port with full control | SignalLocations, GroundLocations, SignalWidths, GroundWidths, SignalLayers, GroundLayers |
ProbeFeed (Most Common)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills-catalog/rf-and-mixed-signal/matlab-assemble-pcb-layout/SKILL.md
Popularity
- Repository stars
- 1,029
- Repository forks
- 128
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 25 Aug 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/matlab/matlab-agentic-toolkit/matlab-assemble-pcb-layout)