Skip to main content
ClaudeWave
Skill649 repo starsupdated today

matlab-sharing

matlab-sharing enables users to share MATLAB code by uploading files to GitHub, MATLAB Drive, or File Exchange and generating direct "Open in MATLAB Online" links. Use this skill when users need shareable browser links that launch MATLAB code, want to share locally-generated MATLAB files, or require "Open in MATLAB Online" buttons or badges for documentation.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-sharing && cp -r /tmp/matlab-sharing/skills-catalog/cloud-solutions/matlab-sharing ~/.claude/skills/matlab-sharing
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Sharing MATLAB Content

Share MATLAB content by uploading to GitHub, MATLAB Drive, or File Exchange, then generating "Open in MATLAB Online" URLs that let recipients open the content directly in a browser.

## When to Use

- User has local MATLAB files and wants to open them in MATLAB Online
- User wants to share MATLAB code via a link that opens in MATLAB Online
- AI agent generated MATLAB code locally and user wants to run/open it in MATLAB Online
- User asks for an "Open in MATLAB Online" link, button, or badge
- User has content on GitHub/MATLAB Drive/File Exchange and wants the direct-open URL

## When NOT to Use

- User wants to try out MATLAB code without needing to upload anywhere
- User is asking about MATLAB Online features, licensing, or account setup
- User wants to run MATLAB code interactively in MATLAB Online without generating a shareable link

## Workflow

### 1. Identify the starting point

Ask what the user has:
- **Local files only** → they need to upload first, then generate the URL
- **Already on GitHub** → skip to URL generation (GitHub path)
- **Already on MATLAB Drive with a share link** → skip to URL generation (Drive path)
- **Already on File Exchange** → skip to URL generation (File Exchange path)

### 2. Help choose a path

If the user hasn't uploaded yet, recommend based on their goal:

| Goal | Recommended Path | Why |
|------|-----------------|-----|
| Quick sharing or personal use | GitHub | Fully automated via CLI; works for public repos |
| Share with specific people (private) | MATLAB Drive | Supports access control; no public repo needed |
| Share with the MATLAB community | File Exchange | Discoverable by all MATLAB users; includes ratings/reviews |
| Embed in documentation/README | GitHub | Supports badge images in markdown |

### 3. Guide the upload

Follow the appropriate path below.

### 4. Generate the URL

Use the exact templates in the URL Templates section. Present the final URL to the user.

If the user has multiple files, generate a separate URL for each file they want to open. To open all files at once:
- **GitHub:** omit the `file` param — clones the entire repo without opening a specific file
- **MATLAB Drive:** set `file=/` — opens the shared folder
- **File Exchange:** omit the `file` param — opens the full submission

### 5. Optionally generate a badge (GitHub path only)

If the user wants a clickable button for a README:

```markdown
[![Open in MATLAB Online](https://www.mathworks.com/images/responsive/global/open-in-matlab-online.svg)](URL_HERE)
```

## URL Templates

### GitHub

```
https://matlab.mathworks.com/open/github/v1?repo=<owner>/<repo>&file=<relative-path>
```

| Parameter | Required | Description |
|-----------|----------|-------------|
| `repo` | Yes | `owner/reponame` (no `https://github.com/` prefix) |
| `host` | No | GitHub host (default: `github.com`). Required for GitHub Enterprise (e.g., `github.mathworks.com`) |
| `file` | No | Specific file to open after clone |
| `project` | No | MATLAB project file to open (e.g., `myProject.prj`) |
| `line` | No | Line number to navigate to |
| `focus` | No | Set to `true` to open in focused editor view |

There is NO `branch` or `tag` parameter. The URL always clones the default branch.

**URL generator tool:** Users can also generate these URLs interactively at `https://www.mathworks.com/products/matlab-online/git.html`

### MATLAB Drive

```
https://matlab.mathworks.com/open/matlabdrive/v1?namespace=SHARED&id=<share-uuid>&file=<filename>
```

| Parameter | Required | Description |
|-----------|----------|-------------|
| `namespace` | Yes | Always `SHARED` for shared content |
| `id` | Yes | UUID from the share link |
| `file` | Yes | Filename from the share link |

The `host` parameter is optional — it defaults to `gds.mathworks.com` if omitted.

### File Exchange

```
https://matlab.mathworks.com/open/fileexchange/v1?id=<submission-id>
```

| Parameter | Required | Description |
|-----------|----------|-------------|
| `id` | Yes | Numeric submission ID from the File Exchange URL |
| `file` | No | Specific file to open after download |
| `project` | No | MATLAB project file to open |
| `version` | No | Specific version of the submission |
| `line` | No | Line number to navigate to |
| `focus` | No | Set to `true` to open in focused editor view |

## GitHub Path: Step-by-Step

This is the only path with full CLI automation.

**Before running any commands**, verify the `gh` CLI is installed and authenticated:

1. Check installation: `gh --version`
2. Check authentication: `gh auth status`

If `gh` is not installed, guide the user to install it (e.g., `brew install gh` on macOS, or visit https://cli.github.com). If not authenticated, have the user run `gh auth login` before proceeding.

**If the user has local files not yet on GitHub**, run these commands for them:

```bash
# 1. Initialize and commit
git init my-project
cd my-project
cp /path/to/your/file.m .
git add .
git commit -m "Add MATLAB code"

# 2. Create public repo and push
gh repo create my-project --public --source=. --push
```

**Before running step 2**, warn the user explicitly: creating a `--public` repo makes the code visible to anyone on the internet. Ask them to confirm they are comfortable making the code public and to review the files being pushed. Only proceed with their explicit permission.

**Once the repo exists** (either just created or already on GitHub), construct the Open in MATLAB Online URL using the repo name and file path:

```
https://matlab.mathworks.com/open/github/v1?repo=<owner>/<repo>&file=<filename>
```

Present this final URL to the user.

## MATLAB Drive Path: Step-by-Step

There is no CLI for MATLAB Drive. MATLAB Drive sharing only works at the **folder level** — individual files cannot be shared directly. The user uploads all files into a folder, shares the folder, and the resulting share link targets a specific file within that folder.

**Give the user these instructions:**

1.
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.