SkillAgentSearch skills...

matlab-model-via

Via modeling: pads, antipads, ground return vias, GRV placement, and signal integrity for high-speed layer transitions. TRIGGER: user asks to model a via, design a via transition, place ground return vias, analyze via performance, or check signal integrity through layer transitions.

Install / Use

npx skills add matlab/matlab-agentic-toolkit --skill matlab-model-via

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

93/100

Supported Platforms

Universal

Our assessment of matlab-model-via

matlab-model-via scores 93/100 on our quality scale, 234th of 1,156 Content & Media skills we index (top 21%).

Its SKILL.md is 22 KB long, well organised into 44 sections with 25 code examples: a thorough specification that gives an agent plenty to work with.

With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
13/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 2 months ago, so matlab-model-via is actively maintained.
  • Our last check on 2026-11-17 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-04. Automated pattern scan on 2026-10-04. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

matlab-model-via compared with similar skills

All 4 of these similar skills score higher than matlab-model-via; compare them before choosing.

SkillScoreStarsUpdatedFormat
matlab-model-via (this skill)by matlab931.1k2mo agoSKILL.md
taste-skillby Leonxlnx100117.6k9d agoCLAUDE.md
Claude-Code-Game-Studiosby Donchitos10039.9k8d agoCLAUDE.md
siyuanby siyuan-note10047.3ktodayMCP Server
x402by browser-use100121.0k4d agoSKILL.md

Frequently asked questions

How do I install matlab-model-via?
Run npx skills add matlab/matlab-agentic-toolkit --skill matlab-model-via. The install tabs above show the steps for each supported agent.
Which AI agents does matlab-model-via work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is matlab-model-via safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is matlab-model-via still maintained?
The repository was last updated about 2 months ago, so matlab-model-via is actively maintained.

name: matlab-model-via description: "Via modeling: pads, antipads, ground return vias, GRV placement, and signal integrity for high-speed layer transitions. TRIGGER: user asks to model a via, design a via transition, place ground return vias, analyze via performance, or check signal integrity through layer transitions. Invoke BEFORE writing code — only viaSingleEnded exists (no viaDifferential), and the location format is non-obvious. SKIP: general signal integrity without vias (use matlab-analyze-em), transmission line design (use matlab-design-pcb-transmission-line), PDN analysis (use matlab-analyze-pcb-pdn), material/stackup setup only (use matlab-manage-pcb-material)." license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md metadata: author: MathWorks version: "1.0"

Modeling Vias

When to Use

  • Modeling signal vias through multi-layer PCB stackups (viaSingleEnded)
  • Configuring pad and antipad geometry per layer
  • Placing ground return vias for signal integrity
  • Analyzing via S-parameters and identifying barrel resonances
  • Evaluating GRV placement with criticalwavelength and gapratedistance

When NOT to Use

  • Designing transmission lines or impedance control — use matlab-design-pcb-transmission-line
  • Building custom PCB structures from shapes — use matlab-assemble-pcb-layout
  • Setting up substrate or conductor materials — use matlab-manage-pcb-material
  • Running full-wave EM analysis on non-via structures — use matlab-analyze-em
  • PDN analysis on imported boards — use matlab-analyze-pcb-pdn

Typical Workflow

  1. Before: matlab-manage-pcb-material — set up substrate and conductor for the stackup
  2. This skill: Model the via, place GRVs, check signal integrity
  3. After: matlab-integrate-pcb-circuit — cascade via model with trace/connector models → matlab-optimize-pcb-design — optimize GRV placement or pad geometry

Quick Reference

| Task | Code | |------|------| | Create via | via = viaSingleEnded | | Set signal layers | via.SignalLayer = [1 5] | | Set ground layers | via.GroundLayer = [3 7 9] | | Set substrate | via.Substrate = dielectric(...) | | Place signal via | via.SignalViaLocations = [x y startLayer stopLayer] | | Place ground return vias | via.GroundReturnViaLocations = [x y start stop; ...] | | Define ports | via.SignalTable = {viaNum layer traceWidth direction; ...} | | View pads | padsTable(via) | | View antipads | antipadsTable(via) | | Customize pads | pads = getpads(via); pads{k}.Radius = r; via.SignalViaPad = pads | | Customize antipads | ap = getantipads(via); ap{k}.Radius = r; via.SignalViaAntipad = ap | | Visualize | show(via) | | S-parameters | sp = sparameters(via, freq) | | Resonance risk check | cw = criticalwavelength(via, freq) | | Max GRV distance | gapratedistance(via, freq) |

viaSingleEnded Object

The viaSingleEnded object models signal vias through multi-layer PCB stackups with configurable pads, antipads, and ground return vias.

Basic Setup

via = viaSingleEnded;
via.SignalLayer = [1 5];
via.GroundLayer = [3 7 9];
via.Substrate = dielectric("Name","FR4","EpsilonR",4.8,...
    "LossTangent",0.026,"Thickness",1.27e-4,"Frequency",1e8);
via.Conductor = metal("Copper");
show(via);

Key Properties

| Property | Format | Description | |----------|--------|-------------| | SignalLayer | Vector | Layer indices where signal traces connect (odd numbers) | | GroundLayer | Vector | Layer indices for ground/return planes | | Substrate | dielectric | Dielectric between layers | | Conductor | metal | Via barrel and pad conductor | | SignalViaLocations | N×4 matrix | [x, y, startLayer, stopLayer] per via | | SignalViaDiameter | Scalar (m) | Via barrel diameter | | SignalViaFinishedDiameter | Scalar (m) | Finished hole diameter (after plating) | | SignalViaPad | Shape or cell | Pad shape(s) on signal via | | SignalViaAntipad | Shape or cell | Antipad (clearance) shape(s) | | RemoveUnusedPads | Logical | Remove pads on non-signal layers (default: true) | | GroundReturnViaLocations | M×4 matrix | [x, y, startLayer, stopLayer] per GRV | | GroundReturnViaDiameter | Scalar or vector | GRV barrel diameter | | GroundReturnViaFinishedDiameter | Scalar or vector | GRV finished hole diameter | | SignalTable | Cell array | Port definitions: {viaNum, layer, traceWidth, direction} |

Signal Via Configuration

Placing a Signal Via

via = viaSingleEnded;
via.SignalLayer = [1 5];
via.GroundLayer = [3 7 9];

X = 0; Y = 0;
startLayer = 1;
stopLayer = 7;
via.SignalViaLocations = [X Y startLayer stopLayer];

The via barrel spans from startLayer to stopLayer. Signal connections occur on layers listed in SignalLayer that fall within this range.

Via Diameter

via.SignalViaDiameter = 0.25e-3;          % Drill diameter
via.SignalViaFinishedDiameter = 0.20e-3;  % After copper plating

Unit Conversion Helper

The object provides a built-in mils-to-meters conversion:

via.SignalViaDiameter = 10 * via.mils2meters;   % 10 mils

Port Definition (SignalTable)

The SignalTable property defines which layers become ports for S-parameter extraction.

Format

Each row: {signalViaNumber, layerIndex, traceWidth, direction}

  • signalViaNumber: Which signal via (1-based index into SignalViaLocations)
  • layerIndex: The layer where the port is placed
  • traceWidth: Width of the connecting trace (meters)
  • direction: Angle in degrees (0 = +x direction, 90 = +y, etc.)

Example: Two-Port Via

via.SignalTable = {1, 1, 3e-4, 45;   % Port 1: via 1, layer 1, 0.3mm trace, 45 deg
                   1, 5, 3e-4, 0};    % Port 2: via 1, layer 5, 0.3mm trace, 0 deg

Using Table Syntax for Clarity

vPorts = table('Size', [2 4], ...
    'VariableTypes', ["cell","cell","cell","cell"], ...
    'VariableNames', ["Signal Via Num","Layer","Trace Width","Direction"]);
vPorts(1,:) = {{1} {1} {3e-4} {45}};
vPorts(2,:) = {{1} {5} {3e-4} {0}};
via.SignalTable = vPorts.Variables;

Ground Return Vias

Ground return vias provide a low-impedance return path near the signal via, critical for signal integrity.

Placement

via.GroundReturnViaLocations = [
    1.0015  2.001  1  9;
    1.0015  1.999  1  9;
    0.999   1.999  1  9;
    1.000   2.0015 1  9;
    0.999   2.001  1  9;
    1.0001  1.9987 1  9];

Each row: [x, y, startLayer, stopLayer]. Ground return vias typically span from the topmost to the bottommost ground layer.

GRV Diameter

via.GroundReturnViaDiameter = 0.25e-3;
via.GroundReturnViaFinishedDiameter = 0.20e-3;

These can be scalars (same for all GRVs) or vectors (one per GRV).

Pad and Antipad Customization

Viewing Pad/Antipad Tables

padsTable(via)       % Rows = signal vias, Columns = conductive layers; cells are pad shape objects (e.g. antenna.Circle) or []. Scalar SignalViaPad is expanded across all positions.
antipadsTable(via)            % Signal via antipads: rows = signal vias, columns = connected layers
antipadsTable(via, "ground")  % Ground return via antipads: rows = GRVs, columns = power planes

Default Pad Shape

By default, SignalViaPad is a circle:

via.SignalViaPad.Radius = 3e-4;    % Set pad radius

Per-Layer Pad Customization

Use getpads to get a cell array of pad shapes (one per layer), modify individual entries, then reassign:

pad_temp = getpads(via);
pad_temp{3}.Radius = 4.5e-4;   % Customize pad on the 3rd layer
via.SignalViaPad = pad_temp;

Antipad Customization

via.SignalViaAntipad.Radius = 5e-4;   % Clearance radius on ground layers

% Per-layer antipad customization (cell array: SignalViaLocations × GroundLayer)
antipad_temp = getantipads(via);
antipad_temp{1,2}.Radius = 6e-4;   % Customize antipad on 2nd ground layer
via.SignalViaAntipad = antipad_temp;

RemoveUnusedPads

When RemoveUnusedPads = true (default), pads are only placed on layers in SignalLayer. Set to false to place pads on all layers the via passes through:

via.RemoveUnusedPads = false;
padsTable(via)   % Now shows pads on all layers

Via Arrays

For modeling multiple signal vias (e.g., BGA breakout or bus routing):

Grid-Based Via Array

obj = viaSingleEnded;
obj.SignalLayer = [1 3];
obj.GroundLayer = [1 3];   % Mixed signal/ground layers
obj.Conductor = metal('Name','Copper','Thickness',3*obj.mils2meters,'Conductivity',10e9);
obj.Substrate = dielectric('EpsilonR',3.7,'LossTangent',0.03,'Thickness',12*obj.mils2meters);
obj.SignalViaDiameter = 10 * obj.mils2meters;
obj.SignalViaPad.Radius = 1.00001 * obj.SignalViaDiameter/2;
obj.SignalViaAntipad.Radius = 15 * obj.mils2meters;

% Create grid of all via positions
[X,Y] = meshgrid(1:8, 1:8);
allXYs = [X(:) Y(:)];

% Signal via subset
[X,Y] = meshgrid([1 3 5 8], [1 2 4 6 8]);
SVXYs = [X(:) Y(:)];

% Ground via locations = everything else
GRVXYs = setdiff(allXYs, SVXYs, 'rows');

Assigning Multiple Signal Vias

startLayer = 1; stopLayer = 3;
obj.SignalViaLocations = [SVXYs, repmat([startLayer stopLayer], size(SVXYs,1), 1)];
obj.GroundReturnViaLocations = [GRVXYs, repmat([startLayer stopLayer], size(GRVXYs,1), 1)];

Open Signal Vias (No Ports)

To model signal vias without assigning ports (open-circuited), leave SignalTable empty or assign ports only to specific vias:

% Only port via #1 on layers 1 and 3
obj.SignalTable = {1, 1, 5*obj.mils2meters, 0;
                   1, 3, 5*obj.mils2meters, 0};

All other signal vias remain as open (unported) stubs — useful for studying coupling in dense via fields.

Multi-Layer Stackup

Layer Numbering Convention

Layers alternate metal and dielectric, numbered sequentially:

Layer 1:  Metal (signal or ground)
Layer 2:  Dielectric
Layer 3:  Metal (signal or ground)
Layer 4:  Dielectric
Layer 5:  Metal (signal or ground)
...

Only odd-numbered layers are metal. SignalLayer and GroundLayer use these odd indices.

Example: 10-Layer Board

via = viaSingleEnded;
via.SignalLayer = [1 7];         % Signal on layers 1 and 7
via.GroundLayer = [3 5 9];      % Ground on layers 3, 5, and 9
via.Substrate = dielectric("Name","FR4","EpsilonR",4.4,...
    "LossTangent",0.02,"Thickness",0.1e-3);

The substrate Thickness is the thickness of each dielectric layer (uniform). For non-uniform stackups, use a multi-element dielectric.

Analysis

S-Parameters

freq = linspace(1e9, 20e9, 51);
sp = sparameters(via, freq, 'Behavioral', true);
rfplot(sp);

% Verify insertion loss meets threshold across band
S21_dB = 20*log10(abs(squeeze(sp.Parameters(2,1,:))));
idx = find(S21_dB <= -1, 1);
if isempty(idx), fprintf('PASS: IL < 1 dB across band\n');
else, fprintf('FAIL: IL exceeds 1 dB at %.1f GHz\n', sp.Frequencies(idx)/1e9); end

TDR (Time Domain Reflectometry)

Use the tdr function from the Signal Integrity Toolbox. Thumb rules for parameters: RiseTime = 1/fmax, SampleTime = 1/(100*fmax), EndTime = 0.1e-9, where fmax is the maximum frequency of the S-parameter sweep:

fmax = 20e9;
tdrObj = tdr(sp, RiseTime=1/fmax, SampleTime=1/(100*fmax), EndTime=0.1e-9);
plot(tdrObj)

SI Analysis Functions

Two functions help evaluate whether ground return vias are close enough to the signal via at a target frequency:

| Function | Syntax | Returns | |----------|--------|---------| | criticalwavelength | cw = criticalwavelength(via, freq) | Number of wavelengths between the signal via and its nearest ground return via at freq. Values approaching 0.25 or 0.5 indicate resonance risk. | | gapratedistance | gapratedistance(via, freq) | Maximum allowable center-to-center distance between signal via and nearest ground return via for a default critical-wavelength threshold of 0.25. |

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars1.1k
CategoryContent
Updated2mo ago
Forks134

Languages

MATLAB

Trust signals

88/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium