Optimize RF PCB dimensions for bandwidth, return loss, or area via patternsearch and surrogateopt with constraints. TRIGGER: user asks to optimize an RF PCB component for performance (bandwidth, return loss, insertion loss, area) or apply constraints to a design. Invoke BEFORE writing optimization code — RF PCB Toolbox has a built-in optimize() function that differs from generic fmincon/ga approaches. SKIP: designing a component from scratch without an optimization objective (use the specific ma
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/17/2026
What it changes
Passed 20 of 20 test cases with the skill, and 5 of 20 without it.
Without skill23%
With skill100%
Checks it passed that the model alone missed
Calls area on GroundPlane shape
Passes BoardShape to area function
Passes objective string "maximizeSLL"
and 22 more in the full report
17 fixed5 passed either way0 still failing0 broke
Pass-rate lift
+77 pp
Tokens
+108%
Agent turns
0%
Response time
-52%
Model gemini-3.6-flashMeasured 8/17/2026v222 of 22 cases passed with skill · 20 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 15 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 15
Prompt
If an optimized RF design has been converted to a pcbComponent object named pcbObj, how do you extract the board shape area in MATLAB?
What was checked, without and with the skill
Checked
Without skill
With skill
Accesses BoardShape on pcbObj
Passed
Passed
Passes BoardShape to area function
Missed
Passed
case-21 · gemini-3.6-flash · 8/17/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md389 linessingle file
Optimizing RF PCB Designs
Critical: Always Use optimize() First
The RF PCB Toolbox provides a built-in optimize() function that handles all standard optimization scenarios. Always use it as the first approach — do NOT write manual optimization loops with patternsearch, surrogateopt, fmincon, or ga called directly unless optimize() is demonstrably insufficient for the specific problem.
When to Use
Tuning filter, coupler, or splitter dimensions for return loss, bandwidth, or area
Running optimize() on catalog objects with bounds and constraints
Using SADEA/TR-SADEA, patternsearch, or surrogateopt via the optimize() interface
Defining custom objective functions over S-parameter responses
When NOT to Use
Designing components from scratch — use matlab-design-pcb-filter, matlab-design-pcb-coupler, etc. first, then optimize
Running EM analysis without optimization — use matlab-analyze-em
Parameter sweeps without an objective — just loop over sparameters calls directly
Antenna-only optimization without PCB context — use Antenna Toolbox docs
Typical Workflow
Before: A design skill (matlab-design-pcb-filter, matlab-design-pcb-transmission-line, etc.) — create the initial component; matlab-analyze-em — baseline S-parameters
This skill: Define objective, bounds, constraints; run optimize()
After:matlab-analyze-em — validate optimized design → matlab-integrate-pcb-circuit — cascade into system → matlab-write-pcb-layout — export Gerber