matlab-modernize-code
Modernize deprecated MATLAB functions and patterns. Use when check_matlab_code or checkcode reports "not recommended" or "to be removed" warnings, when migrating legacy code, or when replacing deprecated APIs (trainNetwork, csvread, xlsread, datenum, eval, subplot, guide, optimset, wavread, svmtrain, uicontrol) with current equivalents.
npx skills add matlab/matlab-agentic-toolkit --skill matlab-modernize-code --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Code Modernization Replace deprecated MATLAB functions and anti-patterns with modern equivalents. This skill is the resolver — `check_matlab_code` is the detector. ## When to Use - `check_matlab_code` or `checkcode` returns "not recommended" or "to be removed" warnings - User asks to modernize, migrate, or update old MATLAB code - Code uses functions listed in the quick reference table below - After static analysis reveals deprecated API usage - Writing new code in a domain that has known deprecated patterns ## When NOT to Use - Reviewing code quality broadly — use `matlab-review-code` (which may then trigger this skill) - Debugging runtime errors — use `matlab-debugging` - Performance profiling — use performance skills (though anti-patterns below overlap) ## Quick Reference: Top Deprecated Functions | Deprecated | Use instead | Since | Category | |------------|------------|-------|----------| | `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` | `datetime` |
- When to Use
- When NOT to Use
- Quick Reference: Top Deprecated Functions
- Critical Anti-Patterns
- Modern Design Patterns
- Table-Based Workflows
- String Arrays (not char arrays)
- Arguments Block (not nargin/varargin)
- Vectorization (not loops)
- Preallocation
- Key Migrations
- File I/O: csvread/xlsread → readmatrix/readtable
- Deep Learning: trainNetwork → trainnet
- eval → Dynamic Field Names / Function Handles
What does the matlab-modernize-code skill do?
Modernize deprecated MATLAB functions and patterns. Use when check_matlab_code or checkcode reports "not recommended" or "to be removed" warnings, when migrating legacy code, or when replacing deprecated APIs (trainNetwork, csvread, xlsread, datenum, eval, subplot, guide, optimset, wavread, svmtrain, uicontrol) with current equivalents.
How do I install it?
Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-modernize-code --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
