Run MATLAB test suites, analyze results, collect code coverage, and configure CI/CD pipelines. Use for test filtering, parallel execution, failure diagnostics, coverage gap analysis, and buildtool CI setup.
Ships in matlab-software-development. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Run MATLAB test suites, analyze results, collect code coverage metrics, and configure CI/CD pipelines using matlab.unittest infrastructure.
matlab-write-testsmatlab-write-testsrun_matlab_test_file MCP tool or runtests with filteringTestRunner with CodeCoveragePlugin and CoverageResultcoverageSummary and present percentages to userTestTask with source and report optionsUse the run_matlab_test_file MCP tool to run test files directly. When you need filtering, parallel execution, or other options, use evaluate_matlab_code with runtests:
results = runtests('tests'); % all tests in folder
results = runtests('tests', Tag='Unit'); % by tag
results = runtests('tests', Name='*Calculator*'); % by name pattern
results = runtests('tests', UseParallel=true); % parallel execution
results = runtests('tests', Strict=true); % warnings = failures
disp(results);
for r = results([results.Failed])
fprintf('\nFAILED: %s\n', r.Name);
disp(r.Details.DiagnosticRecord.Report);
end
for r = results([results.Incomplete])
fprintf('\nINCOMPLETE: %s\n', r.Name);
disp(r.Details.DiagnosticRecord.Report);
end
import matlab.unittest.TestRunner
import matlab.unittest.plugins.CodeCoveragePlugin
import matlab.unittest.plugins.codecoverage.CoverageResult
runner = TestRunner.withTextOutput;
covFormat = CoverageResult;
runner.addPlugin(CodeCoveragePlugin.forFolder('src', ...
IncludingSubfolders=true, Producing=covFormat, MetricLevel='mcdc'));
results = runner.run(testsuite('tests'));
covResults = covFormat.Result;
summary = coverageSummary(covResults, "mcdc");
fprintf('Coverage: %d/%d (%.1f%%)\n', sum(summary(:,1)), sum(summary(:,2)), ...
100*sum(summary(:,1))/sum(summary(:,2)));
For detailed coverage workflows — gap analysis, justifications, generated C code coverage, and data type/size coverage — see references/code-coverage-guidance.md.
| Category | Functions | Purpose |
|---|---|---|
| Execution | runtests, TestSuite, TestRunner | Run and organize tests |
| Coverage | CodeCoveragePlugin, CoverageResult, coverageSummary | Measure test coverage |
| Reports | CoverageReport, generateStandaloneReport, generateCoberturaReport | Coverage output formats |
| CI/CD | buildtool, TestTask, addCodeCoverage | Pipeline automation |
| Scripts | printCoverageGaps | Print all uncovered items across metric levels — see references/code-coverage-guidance.md for interface |
Use buildtool with a buildfile.m for CI pipelines. See references/test-execution-guidance.md for buildfile.m templates and CI configs (GitHub Actions, Azure DevOps, GitLab CI).
For toolbox projects, matlab-package-toolbox generates a buildfile.m in which the packaging task depends on the test task.
Load these on demand — most test runs only need what's in this file.
| Load when... | Reference |
|---|---|
| Running tests in CI, buildtool config, filtering options, parallel execution details | references/test-execution-guidance.md |
| Collecting code coverage (MC/DC, statement, decision, condition), analyzing gaps, justifying uncovered code, generated C code coverage, type-size coverage | references/code-coverage-guidance.md |
| Creating or modifying filter rule XML for coverage justifications | references/justification-filter-rules.md |
| Extracting data type and size coverage results from hidden property | references/datatype-size-extraction.md |
run_matlab_test_file MCP tool when possibleforFolder with IncludingSubfolders=true as the default source specification for coverageCoverageResult as the only format — always use it as the primary programmatic formatCopyright 2026 The MathWorks, Inc.
manifest.yaml (opens in a new tab)references/code-coverage-guidance.md (opens in a new tab)references/datatype-size-extraction.md (opens in a new tab)references/justification-filter-rules.md (opens in a new tab)references/test-execution-guidance.md (opens in a new tab)scripts/printCoverageGaps.m (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/matlab-configure-toml-projectUse whenever "project" or "matlab.toml" is mentioned in a MATLAB context.
This includes creating, editing, organizing, or configuring MATLAB projects,
declaring MATLAB package dependencies or reference projects, setting up paths,
lifecycle scripts, shortcuts, MATLAB packages, or asking about project structure.
/matlab-instrument-opentelemetry-tracingAdd OpenTelemetry tracing to MATLAB code. Use when the user asks to "add tracing", "instrument with spans", "add OpenTelemetry", "trace my code", "add observability" (when about tracing), or mentions "spans", "distributed tracing", or "OTel tracing" in the context of MATLAB functions. Covers span creation, parent-child context propagation, error handling, attributes, events, and semantic conventions.
/matlab-modernize-codeModernize removed or discouraged MATLAB functions and patterns. Use when the check_matlab_code MCP tool reports that a function "is not recommended", "will be removed in a future release", or "has been removed" — at any severity (info, warning, or error) — when migrating legacy code, or when replacing removed or discouraged APIs with current equivalents. Also applies to discouraged patterns Code Analyzer does not flag (containers.Map, bsxfun, str2num, eval, clear all) and to removed or discouraged functions such as trainNetwork, csvread, xlsread, datenum, guide, svmtrain, ltln2val, webmap.
/matlab-optimize-memoryGuides the 7-step MATLAB memory optimization workflow: baseline, profile, identify, optimize, measure, verify, report. Use when asked to reduce MATLAB memory usage, find memory bottlenecks, fix out-of-memory errors, or optimize memory-intensive code./matlab-optimize-performanceUse when MATLAB code is too slow or the user wants it faster, or asks to profile it, find its hot line or where the time goes, count how many times a function runs, or benchmark or compare timings. Profiles before changing code (Sampling Profiler on R2026b+), checks the output against the original, and reports only measured speedups. Not for writing performance tests./matlab-package-toolboxTurn raw MATLAB code into a published .mltbx toolbox — full pipeline from scope definition through packaging and release. Drives 8 phases with human checkpoints, enforcing ordering and dependencies. Use when asked to package, create a toolbox, or run the files-to-package pipeline./matlab-software-development:matlab-run-testsfrom matlab-software-development
npx claudepluginhub matlab/matlab-agentic-toolkit --plugin matlab-software-developmentOther plugins' skills for the same job