Agent skill · Testing & QA

matlab-generate-code

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. Triggers on: codegen, MEX, deploy MATLAB as C/C++, GPU Coder, coder.screener, coder.config, coder.gpuConfig, coder.typeof, coder.runTest, matlabtest.coder.TestCase, SIL, embedded config, no dynamic memory, EnableMexProfiling, coder.timeit, coder.perfCompare, %#codegen, writing codegen-ready MATLAB, code generation readiness, coder.varsize, coder.un

matlabgithub.com/matlabGitHub ↗
claude-codecodexcopilotNOASSERTION
Install
npx skills add matlab/matlab-agentic-toolkit --skill matlab-generate-code --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 15
SKILL.md size: 16 KB
Bundled scripts: none
Version: 1.0
Declared author: MathWorks
Path: skills-catalog/code-generation/matlab-generate-code/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 868
Language: MATLAB

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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) - Verifying generated code matches MATLAB output (coder.runTest, matlabtest.coder.TestCase) - Profiling and accelerating generated MEX functions - Using coder.* directives (coder.varsize, coder.const, coder.extrinsic, coder.ceval, etc.) ## When NOT to Use - Simulink Coder / Embedded Coder Simulink-model workflows - 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`) →

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Route to a more specific skill
  4. Routing — load the matching reference file on demand
  5. Out of scope
  6. Cross-cutting rules
  7. Class entry point — use coder.ClassSignature, not a wrapper function
  8. Ask for input types before writing codegen-ready functions
  9. One variable, one type, one size category
  10. Always capture coder.screener output — every time
  11. Verify with MEX before generating lib / dll / exe
  12. Never modify the user's source without authorization
  13. Booleans are logical, not char
  14. Don't add report flags unless the user asks
Ships with 14 files
  • manifest.yaml
  • references/accelerate-mex.md
  • references/config-properties.md
  • references/generate-code.md
  • references/refine-config.md
  • references/verify-code.md
  • references/write-c-interop.md
  • references/write-class-limitations.md
  • references/write-codegen-ready.md
  • references/write-coder-directives.md
  • references/write-core-constraints.md
  • references/write-numerical-style.md
  • references/write-performance.md
  • references/write-temporal-types.md
More from matlab-agentic-toolkit
All skills →
About this skill
What does the matlab-generate-code skill do?

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. Triggers on: codegen, MEX, deploy MATLAB as C/C++, GPU Coder, coder.screener, coder.config, coder.gpuConfig, coder.typeof, coder.runTest, matlabtest.coder.TestCase, SIL, embedded config, no dynamic memory, EnableMexProfiling, coder.timeit, coder.perfCompare, %#codegen, writing codegen-ready MATLAB, code generation readiness, coder.varsize, coder.un

How do I install it?

Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-generate-code --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going