$npx -y skills add matlab/matlab-agentic-toolkit --skill matlab-list-productsShow all installed MATLAB products and support packages for a given MATLAB installation folder. Use when listing, checking, or verifying what products or support packages are in a MATLAB installation.
| 1 | # Show Installed MATLAB Products |
| 2 | |
| 3 | Use this skill when asked to show, list, or check what MATLAB products or support packages are installed in a given MATLAB installation. |
| 4 | |
| 5 | $ARGUMENTS |
| 6 | |
| 7 | ## When to Use |
| 8 | |
| 9 | - User asks what products, toolboxes, or support packages are installed in a MATLAB installation |
| 10 | - User wants to verify a specific product is installed |
| 11 | - User asks to list or check their MATLAB installation contents |
| 12 | - User provides a matlabroot path or release name and wants to see what's there |
| 13 | |
| 14 | ## When NOT to Use |
| 15 | |
| 16 | - User wants to install new products (use `matlab-install-products` instead) |
| 17 | - User wants to check MATLAB license status or activation (different workflow) |
| 18 | - User wants to manage or update Add-Ons from within MATLAB |
| 19 | - User asks about MATLAB version/release info only (use `ver` or `version` in MATLAB) |
| 20 | |
| 21 | ## Input |
| 22 | |
| 23 | The user may provide a matlabroot path or a release name, and optionally a platform. Resolve the matlabroot as follows: |
| 24 | |
| 25 | - **Path provided** (e.g. `C:\Program Files\MATLAB\R2025a`, `/usr/local/MATLAB/R2025a`, `/Applications/MATLAB_R2025a.app`): use it as-is. Infer the platform from the path format (backslash / drive letter -> Windows; `/Applications/MATLAB_` prefix -> macOS; other Unix path -> Linux). |
| 26 | - **Release name provided** (e.g. `R2025a`, or shorthand like `25a`): expand shorthand to full form (`25a` -> `R2025a`, `26a` -> `R2026a`, etc.) and construct the default path for the detected or specified platform: |
| 27 | - **Windows:** `C:\Program Files\MATLAB\<release>` |
| 28 | - **Linux:** `/usr/local/MATLAB/<release>` |
| 29 | - **macOS:** `/Applications/MATLAB_<release>.app` |
| 30 | - **Nothing provided**: ask the user for the release name and, if ambiguous, the platform before proceeding. |
| 31 | |
| 32 | If the platform cannot be inferred from the path, assume Windows. |
| 33 | |
| 34 | ## Protocol |
| 35 | |
| 36 | > **Important:** Execute all steps below silently. Do not narrate, describe, or show progress to the user. Output only the final formatted result from Step 6. |
| 37 | |
| 38 | ### Step 1 -- Extract release name |
| 39 | |
| 40 | Take the last component of the matlabroot path as the release name. Strip any trailing `.app` suffix for macOS paths. |
| 41 | |
| 42 | Examples: |
| 43 | - `C:\Program Files\MATLAB\R2025a` -> release = `R2025a` |
| 44 | - `/usr/local/MATLAB/R2025a` -> release = `R2025a` |
| 45 | - `/Applications/MATLAB_R2025a.app` -> release = `R2025a` |
| 46 | |
| 47 | **Fallback:** If the last path component does not match `R20\d{2}[ab]` (e.g. custom installs like `L:\prod25b`), read `{matlabroot}/VersionInfo.xml` and extract the release from the `<release>` element. If that file is missing, ask the user for the release name. |
| 48 | |
| 49 | ### Step 2 -- Read installed products from matlabroot |
| 50 | |
| 51 | Read the file (use forward slashes on Linux/macOS, backslashes on Windows): |
| 52 | ``` |
| 53 | {matlabroot}/appdata/prodcontents.json |
| 54 | ``` |
| 55 | |
| 56 | This is a single-line JSON object. Parse it as JSON and extract the **keys** — these are the installed product names (e.g. `"MATLAB 25.1 win64"`, `"MATLAB 25.1 glnxa64"`, `"MATLAB 25.1 maca64"`). The values (XML paths) are not needed. |
| 57 | |
| 58 | ### Step 3 -- Read installed support packages |
| 59 | |
| 60 | Derive the support package root based on platform: |
| 61 | |
| 62 | - **Windows:** `C:\ProgramData\MATLAB\SupportPackages\{release}` |
| 63 | - **Linux:** `/usr/local/MATLAB/SupportPackages/{release}` |
| 64 | - **macOS:** `~/Library/Application Support/MathWorks/MATLAB/SupportPackages/{release}` |
| 65 | |
| 66 | Read the file: |
| 67 | ``` |
| 68 | {supportpkgroot}/appdata/prodcontents.json |
| 69 | ``` |
| 70 | |
| 71 | If the file does not exist, note that no support packages are installed and skip this section. |
| 72 | |
| 73 | ### Step 4 -- Clean up product names |
| 74 | |
| 75 | Each key in `prodcontents.json` looks like `"MATLAB 25.1 win64"` or `"MATLAB Support Package for USB Webcams 25.1.0 win64"`. |
| 76 | |
| 77 | Strip the trailing version number and platform token to get a clean display name: |
| 78 | - Remove the version suffix: one or two numeric segments followed by an optional third (e.g. `25.1`, `25.1.0`, `25.2`) |
| 79 | - Remove the platform token: `win64`, `glnxa64`, `maci64`, `maca64`, or `common` |
| 80 | - Trim any trailing whitespace |
| 81 | |
| 82 | Examples: |
| 83 | | Raw key | Display name | |
| 84 | |---|---| |
| 85 | | `MATLAB 25.1 win64` | `MATLAB` | |
| 86 | | `Simulink 25.1 win64` | `Simulink` | |
| 87 | | `Datafeed Toolbox 25.1 win64` | `Datafeed Toolbox` | |
| 88 | | `Motor Control Blockset 25.1 win64` | `Motor Control Blockset` | |
| 89 | | `MATLAB Documentation 25.1.0 win64` | `MATLAB Documentation` | |
| 90 | | `MATLAB Support Package for USB Webcams 25.1.0 win64` | `MATLAB Support Package for USB Webcams` | |
| 91 | |
| 92 | ### Step 5 -- Sort products |
| 93 | |
| 94 | Sort the cleaned product names using **MATLABabetical order**: |
| 95 | |
| 96 | 1. `MATLAB` |
| 97 | 2. `MATLAB Copilot` |
| 98 | 3. `Simulink` |
| 99 | 4. `Simulink Copilot` |
| 100 | 5. All remaining products in standard alphabetical order |
| 101 | |
| 102 | Any of the four anchor products that are not installed are simply omitted. Products not in the anchor list are sorted alpha |