Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Matlab Modernize Code

skill · matlab/matlab-agentic-toolkitNOASSERTION licenceAudited 14 Oct 2026 · source 58967e6f32b5

★ 1,164pushed 5 days agoversion 1.3
!CAUTIONGrade C · 79/100 · 1 finding · 58967e6
1,164repo stars · whole matlab/matlab-agentic-toolkit

Is it safe? With care — CAUTION, grade C (79/100). We read this skill's source at commit 58967e6f32b5 and found no filesystem, network or shell access and no hard-coded secrets. The audit raised 1 finding, 1 critical or high. What it does: Modernize 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…

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Matlab Modernize Code (matlab/matlab-agentic-toolkit)”. Retrieved 14 Oct 2026. https://modelsatlas.com/skills/matlab/matlab-modernize-code

Trust audit

Audit 0.4.1 · source read 14 Oct 2026

Trust score79/100!CAUTION C
0 critical1 high0 medium0 low0 info

CAUTION means the audit found things worth knowing before you trust this skill. Grade C is shared by 105 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesFAIL1
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: instruction override, no behavioural pass.

Findings (1)

HIGHPrompt injectionprompt.hide_from_user · SKILL.md:164
F-01 Prompt injectionCWE-94 · CWE-1427Layer L2
- **`subplot` is *not* deprecated or discouraged.** It is fully supported and is never flagged by `check_matlab_code`. `tiledlayout`/`nexttile` is a *preferred alternative for new code, not a required
Why
asks the agent to act without the user's knowledge
Fix
—

Audit 0.4.1 · source sha 58967e6f32b5 · 14 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

What it tells the agent

Full source on GitHub ↗

Its description: Modernize 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…

---
name: matlab-modernize-code
description: >
  Modernize 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.
license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md
metadata:
  author: MathWorks
  version: "1.3"
---

# Code Modernization

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:**
- **Removed** — the function is no longer in MATLAB; calling it errors.
- **Discouraged** — the function still works, but a better API exists. It may or may not be slated for removal in a future release.

## When to Use

- `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)
- Code uses a discouraged pattern Code Analyzer does *not* flag — e.g. `containers.Map`, `bsxfun`, `str2num`, `eval`, `clear all` — scan the source, not just the diagnostics (see Conventions)
- User asks to modernize, migrate, or update old MATLAB code
- Code uses functions listed in the quick reference table below
- After static analysis reveals removed or discouraged API usage
- Writing new code in a domain that has known removed or discouraged patterns

## When NOT to Use

This skill swaps removed or discouraged APIs for modern equivalents. It does not:

- Review code quality broadly
- Debug runtime behavior (removed-function errors excepted — those are modernization fixes)
- Optimize already-correct code for speed → hand off to `matlab-optimize-performance`
- Write or migrate function input/output validation (`arguments` blocks, `inputParser`/`validateattributes` → `mustBe*` validators, repeating args, name-value forwarding) → hand off to `matlab-validate-function-arguments`

## Quick Reference: Removed, Discouraged & Anti-Patterns

| 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 |
| `eval` / `evalc` / `evalin` | Dynamic field names `s.(name)`, function handles / `feval`, cells for sequential names | — | Anti-pattern | Not compiled (slow); can overwrite workspace vars; hard to debug; injection risk |
| `str2num` | `str2num(text, Evaluation="restricted")` | R2022a | Security | Unrestricted form runs input via `eval` (injection risk); see references |
| `uicontrol` | `uibutton`, `uidropdown`, etc. | R2016a | UI/App | |
| `guide` | `appdesigner` | R2025a | UI (Removed) | |
| `strmatch` | `startsWith`, `matches` | R2019b | Strings | |
| `clear all` | `clearvars` | — | Workspace | Clears functions from memory; forces recompilation |

> **`datestr` nuance:** `datestr`'s job was to format a date as *text*, so its modern replacement is
> `string(dt)` / `char(dt)` or setting `dt.Format` — not a bare `datetime(...)` call. Use `datetime`
> to replace `datenum`/`now` (the numeric/serial-date path). Neither is removed; both are Code
> Analyzer "not recommended" as of R2022b.
>
> ```matlab
> s = datestr(t, 'yyyy-mm-dd HH:MM:SS');          % old
> s = string(t, 'yyyy-MM-dd HH:mm:ss');           % new — note the specifiers change:
>                                                 % datetime uses MM=month, mm=minute (datestr had mm=month, MM=minute)
> ```

## Modern Design Patterns

Prefer these in all new code:

### Table-Based Workflows
```matlab
data = readtable('sensors.csv');
data.Timestamp = datetime(data.Timestamp);
data.Status = categorical(data.Status);
recentData = data(data.Timestamp > datetime('today') - days(7), :);
summary = groupsummary(recentData, 'SensorID', 'mean', 'Value');
```

### String Arrays (not char arrays)
```matlab
name = "John";                        % not 'John'
names = ["John", "Jane", "Bob"];      % not {'John','Jane','Bob'}
fullName = firstName + " " + lastName; % not [first,' ',last]
idx = contains(names, "Jo");          % not cellfun + strfind
```

### Arguments Block (not nargin/varargin)
```matlab
function result = processData(data, options)
    arguments
        data (:,:) double
        options.Method (1,1) string {mustBeMember(options.Method, ["fast","accurate"])} = "fast"
        options.Verbose (1,1) logical = false
    end
end
```

## Key Migrations

### File I/O: csvread/xlsread → readmatrix/readtable

```matlab
% Old                          → Modern
M = csvread('data.csv');       % M = readmatrix("data.csv");
M = dlmread('data.txt','\t'); % M = readmatrix("data.txt", Delimiter="\t");
[n,t,r] = xlsread('f.xlsx');  % T = readtable("f.xlsx");
csvwrite('out.csv', M);       % writematrix(M, "out.csv");
xlswrite('out.xlsx', data);   % writetable(T, "out.xlsx");
```

### eval → Structured Alternatives

Avoid `eval`/`evalc`/`evalin`: the text isn't compiled (slower), can silently overwrite workspace
variables, and is hard to r

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 58967e6

Download folder ↗
git clone https://github.com/matlab/matlab-agentic-toolkit
git -C matlab-agentic-toolkit checkout 58967e6f32b5

The author documents no install command, so this uses the repository directly. Our verdict covers commit 58967e6f32b5 only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. !CAUTION C 79 / 100

    first audit · source 58967e6f32b5

README badge

For maintainers · shows the latest audit

ModelsAtlas: CAUTION CMODELSATLASCAUTION · C
[![ModelsAtlas: CAUTION C](https://modelsatlas.com/skills/matlab/matlab-modernize-code/badge.svg)](https://modelsatlas.com/skills/matlab/matlab-modernize-code/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Similar skills

Matlab Add Awgn✓SAFE

matlab/matlab-agentic-toolkit

Read BEFORE writing any code that adds Additive White Gaussian Noise (AWGN) to signals and converts between SNR, Eb/No, Es/No, and per-subcarrier SNR for communications simulations, using awgn(), convertSNR(),…

★ 1.2kGrade B
Matlab Agentic Toolkit Setup✓SAFE

matlab/matlab-agentic-toolkit

The MATLAB Agentic Toolkit brings proven MATLAB capabilities to AI agents, making engineering and scientific workflows agent-ready.

★ 1.2kGrade B
Matlab Analyze Data✓SAFE

matlab/matlab-agentic-toolkit

Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, row filtering, sorting, cleaning,…

★ 1.2kGrade B
Matlab Analyze Em✓SAFE

matlab/matlab-agentic-toolkit

S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or…

★ 1.2kGrade B
Matlab Analyze Pcb Pdn✓SAFE

matlab/matlab-agentic-toolkit

PDN DC voltage/current analysis, IR drop, design rule checking, and multi-net batch analysis on imported PCB layouts. TRIGGER: user asks about power integrity, PDN analysis, IR drop, voltage distribution, current…

★ 1.2kGrade B
Matlab Analyze Rf Amplifier✓SAFE

matlab/matlab-agentic-toolkit

The MATLAB Agentic Toolkit brings proven MATLAB capabilities to AI agents, making engineering and scientific workflows agent-ready.

★ 1.2kGrade B

Add this badge to your README

[![ModelsAtlas: CAUTION C](https://modelsatlas.com/skills/matlab/matlab-modernize-code/badge.svg)](https://modelsatlas.com/skills/matlab/matlab-modernize-code/)

Questions about Matlab Modernize Code

What does the Matlab Modernize Code skill do?
The MATLAB Agentic Toolkit brings proven MATLAB capabilities to AI agents, making engineering and scientific workflows agent-ready.
Is Matlab Modernize Code safe to install?
With care. The audit graded it C (79/100) and found 1 thing worth knowing before you trust this skill, listed below with the exact line each was found on.
What can Matlab Modernize Code access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (58967e6f32b5), read on 2026-10-14. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.