Generate, verify, refine, and accelerate C/C++ or CUDA code from MATLAB with MATLAB Coder, Embedded Coder, GPU Coder, or MATLAB Test. Also covers writing codegen-ready MATLAB code: language constraints, coder.* directives, and optimization patterns.
SkillScore88Maintained
Automatic
◆Coding pack
Last verified 8/17/2026
What it changes
Passed 22 of 25 test cases with the skill, and 11 of 25 without it.
Without skill44%
With skill88%
Checks it passed that the model alone missed
Recommends coder.noImplicitExpansionInFunction.
Recommends coder.nullcopy when allocating the buffer.
Sets cfg.EnableMemcpy = false on the configuration object.
and 12 more in the full report
11 fixed11 passed either way3 still failing0 broke
Pass-rate lift
+44 pp
Tokens
+158%
Agent turns
0%
Response time
-42%
Model gemini-3.6-flashMeasured 8/17/2026v222 of 25 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 11 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 11
Prompt
I want to stop MATLAB Coder from generating `memcpy` calls in C code. Setting `cfg.MemcpyThreshold = 0` did not work. What property turns off `memcpy`?
What was checked, without and with the skill
Checked
Without skill
With skill
Sets cfg.EnableMemcpy = false on the configuration object.
Missed
Passed
case-13 · 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.md198 lines14 files
Generate Code with MATLAB Coder
Umbrella skill for the MATLAB Coder workflow: generate code, verify it, refine the config, and accelerate with profiled MEX.
When to Use
Generating C/C++ or CUDA code from MATLAB functions (MEX, lib, dll, exe)
Writing new MATLAB code that must be compatible with code generation
Reviewing existing MATLAB code for codegen readiness or fixing codegen errors
Configuring codegen settings for specific targets (embedded, speed, readability, safety)
Generating code for target languages that are not C, C++, or CUDA
Fixed-Point Designer conversion workflows
Hand-written MEX C files (not generated by MATLAB Coder)
General MATLAB programming unrelated to code generation
Route to a more specific skill
Generating code from an AI model (PyTorch .pt2 / LiteRT .tflite via loadPyTorchExportedProgram / loadLiteRTModel) → use matlab-deploy-ai-model. Return here for the underlying coder.* directives, config tuning, and screener/verification.
Deploying to physical embedded hardware (on-target PIL, ERT hardware configs, board selection — STM32 / Raspberry Pi / ARM Cortex) → use matlab-deploy-embedded-code. This skill covers host-side codegen, SIL, and config tuning up to hardware targeting.
Speeding up interpreted MATLAB by rewriting the M-code (vectorization, preallocation, caching) → use matlab-optimize-performance. This skill's acceleration path assumes you want to compile to MEX/C, not restructure the algorithm.
General MATLAB test authoring (parameterized tests, fixtures, mocking, coverage, CI/CD, App Designer) → use matlab-write-test. This skill covers only codegen-equivalence tests (coder.runTest, matlabtest.coder.TestCase).
Modernizing deprecated APIs for currency/maintainability when code generation is not the goal → use matlab-modernize-code. This skill rewrites source only to satisfy codegen constraints, with explicit authorization.
Routing — load the matching reference file on demand
Pick the workflow that matches the user's intent and read the corresponding references/*.md. Each reference file is a deep, self-contained guide; load only what you need rather than carrying all four in context.
User intent
Load
Writing new codegen-compatible MATLAB; reviewing MATLAB for codegen readiness; fixing codegen errors; %#codegen; language constraints; type/size rules
references/write-codegen-ready.md
Understanding a specific coder.* directive (coder.varsize, coder.const, coder.inline, coder.unroll, coder.extrinsic, etc.)
references/write-coder-directives.md
Using MATLAB classes in codegen; class limitations; coder.classSignature; handle vs value class restrictions
Generate standard-compliant IEEE 802.11 waveforms using MATLAB WLAN Toolbox. Use when creating WLAN waveforms, PPDU packets, or the transmit side of a link-level simulation. Covers all formats: Non-HT (802.11a/g), HT (802.11n), VHT (802.11ac), HE-SU/HE-MU/HE-TB (802.11ax), EHT-MU/EHT-TB (802.11be), UHR-MU/UHR-TB/UHR-ELR (802.11bn). Handles single-user, MU-MIMO, OFDMA, trigger-based uplink, extended range, preamble puncturing, UEQM, and DRU. Use when asked to generate test waveforms, create packe