By matlab
Invoke MATLAB slash commands to analyze code quality with fixes, generate standard docs/READMEs/Live Scripts, create/run property and unit tests, optimize performance, explain logic, add error handling, detect toolboxes, and execute code/tests via local MCP server. Requires MATLAB installation.
Run MATLAB Code Analyzer on files or code
Document MATLAB function with help text
Create MATLAB Live Script with proper formatting and structure
Generate project README for MATLAB projects
Execute MATLAB code or files via MCP
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Slash commands for MATLAB development workflows across multiple AI coding agents. Provides documentation generation, testing, optimization, code analysis, and live execution via MCP.
| Agent | Format | Commands | Install |
|---|---|---|---|
| Claude Code | Plugin | All 13 | /plugin install github:matlab/slash-commands |
| GitHub Copilot | .prompt.md | 6 key commands | Copy copilot/prompts/ to .github/prompts/ |
| Cursor IDE | .mdc rules | Rules (always-on) | Copy cursor/rules/ to .cursor/rules/ |
| Any MCP agent | MCP server | Via MATLAB MCP Core Server | See MCP Guide |
When the MATLAB MCP Core Server is connected, commands gain live capabilities:
| MCP Tool | What It Enables |
|---|---|
check_matlab_code | Real Code Analyzer diagnostics |
evaluate_matlab_code | Execute MATLAB expressions, benchmark code |
run_matlab_file | Run .m files and return output |
run_matlab_test_file | Execute test suites and report results |
detect_matlab_toolboxes | List installed toolboxes |
All commands work without MCP. They generate code and instructions as before. MCP adds validation, execution, and measurement. See MCP Integration Guide.
/plugin install github:matlab/slash-commands
cp -r copilot/prompts/ .github/prompts/
mkdir -p .cursor/rules
cp cursor/rules/matlab-development.mdc .cursor/rules/
git clone https://github.com/matlab/slash-commands.git
| Command | Description | MCP Enhanced |
|---|---|---|
/matlab-readme | Generate project README | Yes |
/matlab-docs | Document MATLAB functions | Yes |
/matlab-livescript | Create formatted Live Scripts | Yes |
/matlab-check | Run Code Analyzer on code | MCP |
/matlab-run | Execute MATLAB code or files | MCP |
| Command | Description | MCP Enhanced |
|---|---|---|
/matlab-test | Generate unit tests | Yes |
/matlab-property-test | Create property-based tests | Yes |
/matlab-run-tests | Run test suite and report results | MCP |
| Command | Description | MCP Enhanced |
|---|---|---|
/matlab-optimize | Optimize code performance | Yes |
/matlab-errors | Add error handling and validation | Yes |
| Command | Description | MCP Enhanced |
|---|---|---|
/matlab-explain | Explain code functionality | Yes |
/matlab-refine | Refine requirements into specs | Yes |
/matlab-toolboxes | Detect installed toolboxes | MCP |
MCP Enhanced = works without MCP but gains live capabilities with it MCP = primarily designed for MCP, with static fallback
/matlab-test myFunction # Generate tests
/matlab-run-tests # Run them via MCP, see pass/fail
/matlab-optimize # Optimizes and benchmarks before/after
/matlab-refine "process sensor data" # Clarify requirements
/matlab-test processData # Generate tests
/matlab-check processData.m # Run Code Analyzer
/matlab-optimize # Optimize performance
/matlab-errors # Add error handling
/matlab-docs processData # Generate documentation
/matlab-readme # Generate project README
See CONTRIBUTING.md for guidelines on adding commands, improving existing ones, and maintaining cross-agent formats.
BSD 3-Clause License. See LICENSE.
Copyright (c) 2025, The MathWorks, Inc.
npx claudepluginhub matlab/slash-commands --plugin matlab-slash-commandsDetects MATLAB, installs the MCP server, registers with your AI coding agent, and verifies the environment.
Foundational Model-Based Design capabilities for the Simulink product family
Detects MATLAB, installs the MCP server, registers with your AI coding agent, and verifies the environment.
Toolbox-specific knowledge and template scripts for accurate MATLAB R2025b code generation. Covers Medical Imaging, Deep Learning, Image Processing, Stats-ML, and Wavelet toolboxes.
Foundational Model-Based Design capabilities for the Simulink product family
Claude on Rails Tooling System
Hand token-heavy mechanical work (batch edits, scaffolding, refactors, test generation, plotting scripts) from Claude to Codex CLI.
PHP debugging and analysis tools using Xdebug. Trace execution, step debug, profile performance, and analyze code coverage.