> Share MATLAB content by guiding users through uploading to GitHub, MATLAB Drive, or File Exchange, then generating "Open in MATLAB Online" URLs. Covers the full for GitHub, manual for MATLAB Drive and File Exchange), and constructing the correct URL. Use when a user wants to share MATLAB code with others, open local files in MATLAB Online, generate an open-in-MATLAB-Online button or badge, or when an AI agent has generated MATLAB code locally and the user wants to share it or run it in MATLAB Online.
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-sharing
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.
Ask what the user has:
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 |
Follow the appropriate path below.
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:
file param — clones the entire repo without opening a specific filefile=/ — opens the shared folderfile param — opens the full submissionIf the user wants a clickable button for a README:
[](URL_HERE)
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
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.
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 |
This is the only path with full CLI automation.
Before running any commands, verify the gh CLI is installed and authenticated:
gh --versiongh auth statusIf 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:
# 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.
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:
https://drive.mathworks.com/Once the user provides the share link, extract the UUID and filename from it. The share link format is:
https://drive.matlab.com/sharing/<uuid>/<filename>
Then construct the Open in MATLAB Online URL:
https://matlab.mathworks.com/open/matlabdrive/v1?namespace=SHARED&id=<uuid>&file=<filename>
The same UUID can be used to open other files in the shared folder — just change the file parameter. To open the entire folder, set file=/.
Present this final URL to the user.
There is no CLI for File Exchange.
Give the user these instructions:
https://www.mathworks.com/matlabcentral/fileexchange/Once the user provides the submission ID or URL, extract the numeric ID. The File Exchange URL format is:
https://www.mathworks.com/matlabcentral/fileexchange/<ID>-<title-slug>
Then construct the Open in MATLAB Online URL:
https://matlab.mathworks.com/open/fileexchange/v1?id=<ID>
To open a specific file within the submission, add the file parameter:
https://matlab.mathworks.com/open/fileexchange/v1?id=<ID>&file=<filename>
Omitting file opens the full submission.
Present this final URL to the user.
| Mistake | Why It's Wrong | Correct Approach |
|---------|---------------|-----------------|
| Adding &branch=main to GitHub URL | Parameter doesn't exist; URL always clones default branch | Omit branch — only repo, file, and project are valid |
| Using /open/drive/v1 for MATLAB Drive | Wrong path segment | Use /open/matlabdrive/v1 |
| Using ?sharing=<uuid> for MATLAB Drive | Wrong parameter format | Use ?namespace=SHARED&id=<uuid>&file=... |
| Omitting namespace for Drive URLs | URL won't resolve without it | Always include namespace=SHARED |
| Including https://github.com/ in the repo param | Format is owner/repo only | Strip the domain: aanithap/my-project not https://github.com/aanithap/my-project |
| Suggesting email or cloud storage | Doesn't give an "Open in MATLAB Online" experience | Use one of the 3 supported paths |
--public for shareable links (private repos require auth)branch or tag parameter for GitHub URLsMy File.m → My%20File.m)----
Copyright 2026 The MathWorks, Inc.
----
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take matlab/matlab-sharing from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference brew.
Without those the skill loads but fails at the first command.