Train, evaluate, and export neural networks to Simulink in MATLAB. Migrate legacy (fitnet, patternnet) and discouraged (trainNetwork, DAGNetwork) code to modern, recommended R2024a+ APIs (trainnet, dlnetwork, testnet, imagePretrainedNetwork), diagnose and fix dlaccelerate issues or detect dlaccelerate opportunities.
SkillScore95Maintained
Automatic
◆AI Engineer pack
Last verified 8/16/2026
What it changes
Passed 21 of 22 test cases with the skill, and 11 of 22 without it.
Without skill50%
With skill95%
Checks it passed that the model alone missed
Avoids manual layer graph surgery using replaceLayer.
Uses trainnet with crossentropy loss rather than trainNetwork.
Uses exportNetworkToSimulink to export the dlnetwork to Simulink.
and 9 more in the full report
10 fixed11 passed either way1 still failing0 broke
Pass-rate lift
+45 pp
Tokens
+178%
Agent turns
0%
Response time
-51%
Model gemini-3.6-flashMeasured 8/16/2026v121 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 10 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 10
Prompt
I need to train a neural network regression model on tabular sensor data stored in a MATLAB table to predict temperature. What function from Statistics and Machine Learning Toolbox should I use?
What was checked, without and with the skill
Checked
Without skill
With skill
Uses fitrnet to fit the tabular regression neural network.
Passed
Passed
Evaluates the fitted tabular model using the loss function associated with fitrnet objects.
Missed
Passed
case-07 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md377 lines13 files
matlab-train-network
Train, evaluate, and export neural networks to Simulink in MATLAB using the
recommended dlnetwork-based API (trainnet, dlnetwork, minibatchpredict,
scores2label, testnet, imagePretrainedNetwork) or, for tabular data, the
Statistics and Machine Learning Toolbox functions fitcnet and fitrnet.
When to Use
Activate this skill when a user asks to:
Train any neural network (classifier, regression, multi-output, LSTM, CNN, etc.)
Fine-tune or use a pretrained model for transfer learning
Evaluate a trained network on test data
Run inference / predict with a trained network
Export a trained network to Simulink
Migrate existing legacy (patternnet, fitnet, narxnet, gensim) or discouraged
(trainNetwork, DAGNetwork, classify) code to recommended APIs
Create a "pattern recognition network", "function fitting network", "NARX
network", or any task historically associated with the Neural Network Toolbox
shallow nets API
Speed up or optimize any deep learning code (even without mentioning dlaccelerate by name)
Make existing deep learning code faster using dlaccelerate
Diagnose and fix dlaccelerate issues (low HitRate, retracing, code is slower after using dlaccelerate)
Accelerate custom training (code that uses dlfeval/dlgradient)
Accelerate a function that supports dlarray input and is long running
Accelerate a custom loss function passed to trainnet (R2026a+)
Connect to and acquire images from cameras in MATLAB using Image Acquisition Toolbox. Use this skill when the user wants to: use a webcam, acquire images, capture video, stream from a camera, connect to a GigE Vision camera, preview live video, list available cameras, configure camera properties, use a CoaXPress frame grabber, or use a Camera Link frame grabber. Covers USB webcams, GigE Vision, USB3 Vision, CoaXPress, Camera Link, and GenICam-compliant cameras. Always prefer videoinput from Imag