Install any skill in seconds. Free to start, no credit card required.
Get Started Free →matlab/matlab-modernize-code
Modernize deprecated MATLAB functions and patterns.
Passed 23 of 25 test cases with the skill, and 22 of 25 without it.
1 fixed22 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
A web service endpoint in MATLAB parses numeric array input strings using `str2num`. Security reviewers warned that this call can execute arbitrary workspace code. How should `str2num` be invoked to restrict expression evaluation?
| Checked | Without skill | With skill |
|---|---|---|
| Sets the Evaluation option to restricted when calling str2num | Missed | Passed |
The instructions your model reads when the skill loads.
Replace removed or discouraged MATLAB functions and anti-patterns with modern equivalents. This skill is the resolver — the MCP tool check_matlab_code (MATLAB's Code Analyzer) is the detector.
Terms used in this skill:
check_matlab_code reports a lifecycle diagnostic — any of these three
wordings, matched case-insensitively (STRMATCH is not recommended is the
same signal as the lowercase form):
'X' is not recommended... (severity: info)'X' will be removed in a future release... (severity: warning)'X' has been removed... (severity: error — the code errors today)containers.Map, bsxfun, str2num, eval, clear all — scan the source, not just the diagnostics (see Conventions)This skill swaps removed or discouraged APIs for modern equivalents. It does not:
matlab-optimize-performancearguments blocks, inputParser/validateattributes → mustBe* validators, repeating args, name-value forwarding) → hand off to matlab-validate-function-arguments| Topic | Recommendation | Since | Category | Rationale |
|---|---|---|---|---|
csvread / dlmread | readmatrix | R2019a | File I/O | |
csvwrite / dlmwrite | writematrix | R2019a | File I/O | |
xlsread | readtable, readmatrix | R2019a | File I/O | |
xlswrite | writetable, writematrix | R2019a | File I/O | |
datenum / datestr / now | datetime (use string/char to format) | R2022b | Date/Time (Not recommended) | Flagged by Code Analyzer |
test cases passed, vs 22 / 25 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.