Agent skill · DevOps & Cloud

matlab-deploy-ai-model

Generate C/C++ or CUDA code from an AI model (PyTorch, LiteRT) using MATLAB Coder or GPU Coder. Use when the user wants to integrate an AI model into an application with code generation as the end goal — generating MEX, CUDA MEX, static library, dynamic library, or executable — or using the model in Simulink for simulation and code generation. This skill currently documents the PyTorch ExportedProgram (.pt2) workflow via loadPyTorchExportedProgram; LiteRT is already supported by the product (loadLiteRTModel, R2026a+) but detailed guidance has not yet been added to this skill. invoke, codegen,

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

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

Facts
Files in the skill folder: 13
SKILL.md size: 9 KB
Bundled scripts: none
Version: 1.1
Declared author: MathWorks
Path: skills-catalog/code-generation/matlab-deploy-ai-model/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 C/C++/CUDA Code from an AI Model Generate deployable C/C++ or CUDA code from an AI model using MATLAB Coder or GPU Coder. The workflow follows a common pattern regardless of model framework: load, inspect, write entry-point, generate MEX, verify, then generate production code. ## When to Use - User wants to generate C/C++/CUDA code from an AI model (PyTorch, LiteRT) - User has a model file (.pt2, .tflite) and wants to load it into MATLAB - User wants MEX acceleration for an AI model - User wants to generate CUDA code or GPU-accelerated MEX from an AI model - User wants to deploy an AI model to hardware - User wants to use a PyTorch or LiteRT model in Simulink (simulation or code generation) - User wants to verify AI model numerics between the source framework and MATLAB ## When NOT to Use - **General MATLAB Coder usage** (codegen syntax, config tuning, writing codegen-ready code) - **Editable dlnetwork for Deep Learning Toolbox workflows** (quantization, compression, transfer learning) — use `importNetworkFromPyTorch` which returns a `dlnetwork` for PyTorch models. For deployment of an editable `dlnetwork` with model compression (INT8 quantization via `dlquantizer`, prun

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Supported Frameworks
  4. Generic Workflow
  5. 1. Load and Inspect
  6. 2. Write Entry-Point Function
  7. 3. Verify Numerics
  8. 4. Generate MEX (First!)
  9. 5. Verify MEX Output
  10. 6. Generate Library/Executable
  11. 7. Use in Simulink
  12. 8. Deploy to Hardware (Optional — requires Embedded Coder)
  13. Key Functions
  14. Conventions
Ships with 12 files
  • manifest.yaml
  • references/codegen-performance-options.md
  • references/dnn-codegen-options.md
  • references/export-pytorch-models.md
  • references/pytorch-api-reference.md
  • references/pytorch-data-layout.md
  • references/pytorch-export-gotchas.md
  • references/pytorch-export-patterns.md
  • references/pytorch-numeric-verification.md
  • references/pytorch-supported-models.md
  • references/pytorch-workflow.md
  • references/simulink-workflow.md
More from matlab-agentic-toolkit
All skills →
About this skill
What does the matlab-deploy-ai-model skill do?

Generate C/C++ or CUDA code from an AI model (PyTorch, LiteRT) using MATLAB Coder or GPU Coder. Use when the user wants to integrate an AI model into an application with code generation as the end goal — generating MEX, CUDA MEX, static library, dynamic library, or executable — or using the model in Simulink for simulation and code generation. This skill currently documents the PyTorch ExportedProgram (.pt2) workflow via loadPyTorchExportedProgram; LiteRT is already supported by the product (loadLiteRTModel, R2026a+) but detailed guidance has not yet been added to this skill. invoke, codegen,

How do I install it?

Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-deploy-ai-model --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