Skip to main content
ClaudeWave
Skill618 estrellas del repoactualizado 8d ago

matlab-install-products

This Claude Code skill automates the installation of MATLAB, Simulink, toolboxes, and support packages using MATLAB Package Manager (mpm) from the command line with deterministic, repeatable behavior. Use it when setting up scripted MATLAB installations for CI/CD pipelines, containerized environments, fleet provisioning, or adding products to existing installations via the OS command line.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-install-products && cp -r /tmp/matlab-install-products/skills-catalog/matlab-core/matlab-install-products ~/.claude/skills/matlab-install-products
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Installing MATLAB Products with MATLAB Package Manager (mpm) - Deterministic Protocol

Use this skill when asked to install MathWorks products using MATLAB Package Manager (mpm) from the OS command line.

$ARGUMENTS

## When to Use

- User asks to install MATLAB, Simulink, toolboxes, or support packages via the command line
- User wants a scripted, repeatable MATLAB installation (CI/CD, containers, fleet provisioning)
- User asks about mpm, MATLAB Package Manager, or non-interactive MATLAB installs
- User needs to add products to an existing MATLAB installation using mpm

## When NOT to Use

- User wants to install via the graphical MATLAB installer or MathWorks website
- User is asking about MATLAB licensing or activation (separate workflow)
- User wants to manage MATLAB Add-Ons from within MATLAB (use the Add-On Manager)
- User needs to install MATLAB Engine API for Python, Java, or C++ (different process)

## Non-Negotiable Determinism Contract (follow exactly)
- Follow the steps in **Protocol** in order. Do not add extra steps or checks.
- Use **only** the canonical shell for the OS. Do not switch shells.
- Use **absolute paths** to `mpm` / `mpm.exe`. Never rely on relative paths.
- Retry downloads at most **once**. Otherwise stop and report the error.
- If security software blocks execution: **stop** and instruct escalation. Do not bypass.

## Safety Gate (Windows) — MANDATORY, NO EXCEPTIONS

**STOP. Read this entire section before executing ANY Windows step.**

1. **NEVER** use `powershell.exe -Command` for ANY reason. Bash mangles `$`, backticks, quotes, arrays, and script blocks before PowerShell sees them. This WILL cause `unexpected EOF` or syntax errors.
2. **NEVER** use bash heredoc syntax (`cat > file <<'EOF'`) or bash redirection (`echo ... >`) to create PowerShell scripts.
3. **ALWAYS** write `.ps1` files using the **Write file tool**, then invoke with:
   `powershell.exe -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File <absolute-script-path>`
4. Do not emit CMD-only syntax (`if not exist`, `set VAR=`, `%USERPROFILE%`). Use PowerShell equivalents (`Test-Path`, `$env:USERPROFILE`).

5. **ASCII only** in all `.ps1` file content. No em dashes (`—`), en dashes (`–`), curly quotes, or other non-ASCII characters. They cause PowerShell parse errors (broken string terminators, missing brace errors) when file encoding doesn't preserve them.

**If you are about to type `powershell.exe -Command` — STOP. You are violating this rule. Use the Write file tool to create a .ps1 file instead.**

Windows script authoring pattern:
- **WRONG**: `powershell.exe -Command "$script = @'...`  (bash corrupts `$` and heredocs)
- **WRONG**: `cat > C:/Windows/Temp/script.ps1 <<'PS1' ... PS1`  (bash heredoc, breaks on Windows)
- **CORRECT**: create a unique temp folder, use the **Write file tool** to write `.ps1` files into it, then run with `-File`

Unique temp folder:
- Before Step 1, create a timestamped working folder using the Bash tool:
  - Windows: `mkdir -p "C:/Users/<username>/AppData/Local/Temp/mpm-<YYYYMMDD-HHMMSS>"`
  - Linux/macOS: `mkdir -p "/tmp/mpm-<YYYYMMDD-HHMMSS>"`
- Use this folder for ALL generated scripts and input files throughout the protocol
- Because the folder is new, the Write file tool can always create files in it without needing to delete anything first
- Delete the entire folder during the final cleanup step

Windows PowerShell syntax reminders:
- Bad: `if not exist C:\Users\name\Downloads mkdir C:\Users\name\Downloads` (CMD syntax)
- Good: `if (-not (Test-Path -LiteralPath 'C:\Users\name\Downloads')) { New-Item -ItemType Directory -Path 'C:\Users\name\Downloads' | Out-Null }`

Do not ask the user for the exact product name or identifier. Look it up using the appropriate mpm input file from https://www.mathworks.com/products/mpm.html
Do not ask the user whether to install dependencies or not. mpm will take care of it. Just install whatever the user asked for, and let mpm do the rest.
If a user types the shortname of MATLAB releases, automatically use the correct expanded full name. e.g. 25a is R2025a, 25b is R2025b

## Required Inputs (ask only if missing)
1. Operating system (Windows, Linux, macOS)
2. MATLAB release (for example `R2025b`)
3. Installation destination (absolute path)
4. Requested products / toolboxes / support packages

## Confirmation Rule
Before executing any steps, always confirm the user's choices:
- Release
- Destination folder
- Products
- Support packages

Ask for confirmation in one message. The user can reply `yes to all` to confirm everything at once. If they reply with specific changes, update the selections and confirm again.
Display each value to be confirmed in its own new line.
Note at the bottom of the confirmation message: "Required dependencies will be installed automatically by mpm."

## Plan Display (after confirmation, before execution)

Once the user confirms their inputs, display a clear installation plan before running any commands. Adapt the template below for the target OS (use forward slashes and `/tmp/` for Linux/macOS, omit `.ps1` script references, and omit the UAC note). Use this format:

```
Here's what I'll do:

Working folder: <C:\Users\<username>\AppData\Local\Temp\mpm-YYYYMMDD-HHMMSS>

Step 1 — Download mpm
  Check for mpm at <canonical mpm path>
  Download from <URL> if not present
  Script: <working folder>\mpm_download.ps1

Step 2 — Prepare input file
  Download release template for <release> from mathworks.com
  Set destination folder: <destination>
  Enable products: <comma-separated list>
  Input file: <working folder>\mpm_input_<releaselower>.txt
  Script: <working folder>\mpm_prepare_input.ps1

Step 3 — Run installation
  Execute mpm install using the prepared input file
  <Windows only: note that elevated permissions (UAC prompt) will be required>

Step 4 — Verify
  Confirm MATLAB binary exists: <completion artifact path>
  Verify products via: <DESTINATION>/appdata/prodcontents.json
  <if sup
matlab-train-networkSkill

>

matlab-driving-data-importerSkill

Import recorded driving sensor data (GPS, camera, lidar, actor tracks, lanes) into scenariobuilder.* objects (GPSData, CameraData, LidarData, ActorTrackData, Trajectory, laneData) and run preprocessing — synchronize, offset correction, crop, normalizeTimestamps, convertTimestamps. Also: compute actor tracks from lidar when no annotations exist, attach camera/lidar mounting + intrinsics, export to MAT/workspace/timetable/script. Use for raw driving dataset files (KITTI, nuScenes, Waymo, Pandaset, ROS/ROS2 bags, .mat, .csv, .mp4) or driving/vehicle/sensor logs that need wrapping. drivingLogAnalyzer (DLA) is OPT-IN ONLY — invoke only on explicit user request ('DLA', 'open in DLA', 'inspect/explore/analyze the recording') or reported sensor problem (sync drift, timestamp mismatch, overlay misalignment). NEVER auto-launch DLA after wrapping (Rule 0). For 'build scenario / export to RoadRunner / drivingScenario / OpenSCENARIO / Unreal / simulate', hand off to matlab-scenario-builder.

matlab-scenario-builderSkill

Generate driving scenes, scenarios, road surfaces, and 3D content from already-wrapped scenariobuilder.* sensor data (GPS, camera, lidar, actor tracks) using Scenario Builder for Automated Driving Toolbox. Use to BUILD, EXPORT, or AUGMENT a virtual scenario/scene/map: ego or actor trajectories, trajectory smoothing, OpenCRG road-surface extraction, 3D asset generation, static-object placement, point-cloud georeferencing + elevation, lane-based ego localization, sensor-fusion tracking, scenario-event extraction (cut-ins, hard brakes, near-misses, ADAS disengagements), or export to RoadRunner, drivingScenario, OpenDRIVE, OpenCRG, OpenSCENARIO, or Unreal Engine. Also: log-to-scenario, scenario harvesting, accident/near-miss reconstruction, SOTIF (ISO 21448) and ISO 26262 scenario coverage, USGS-aerial-lidar scene augmentation, traffic-sign placement from camera+lidar logs. NOT for raw-data import or multi-sensor sync/crop/offset/timestamp normalization — route those to matlab-driving-data-importer.

roadrunner-asset-mappingSkill

>

roadrunner-convert-lanelet2-to-rrhdSkill

>

roadrunner-import-sceneSkill

>

roadrunner-rrhd-authoringSkill

>

matlab-build-simbiology-modelSkill

Build, modify, and diagram SimBiology models — API reference, helper functions, and layout patterns. Use when constructing or editing models programmatically or visually.