Create, edit, and run plain-text MATLAB live scripts (.m files) with rich text formatting, LaTeX equations, section breaks, and inline figures.
SkillScore95Maintained
Automatic
◆Coding pack
Last verified 8/16/2026
What it changes
Passed 21 of 22 test cases with the skill, and 9 of 22 without it.
Without skill41%
With skill95%
Checks it passed that the model alone missed
The script avoids using `mfilename`
Table rows are bounded by `%[text:table]` directives
The final item of the numbered list ends with a trailing backslash `\`
and 17 more in the full report
12 fixed9 passed either way1 still failing0 broke
Pass-rate lift
+55 pp
Tokens
+130%
Agent turns
0%
Response time
-11%
Model gemini-3.6-flashMeasured 8/16/2026v121 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 12
Prompt
I have a binary live script `dft_demo.mlx` in my working folder and need to convert it into a version-control-friendly `.m` live script called `dft_demo.m`. Can you run the MATLAB Command Window instructions to save this document into the plain-text format without leaving editor prompts open?
What was checked, without and with the skill
Checked
Without skill
With skill
The command opens the document invisibly using `Visible=0` in the editor open call
Missed
Passed
The command calls `editor.closeNoPrompt` to suppress prompt dialogs upon closing
Missed
Passed
case-02 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md221 lines2 filesincludes scripts
Live Scripts
Plain-text .m files that render as rich documents in the MATLAB Live Editor. Version-control friendly — never use binary .mlx.
When to Use
Tutorials, reports, analysis notebooks, or documentation
Interactive exploration with inline figures and equations
Version-controlled content (plain-text .m, not binary .mlx)
Converting an existing binary .mlx file to plain-text .m
When NOT to Use
Regular scripts without rich formatting
Function files
MATLAB older than R2025a
Converting from .mlx
To convert a binary .mlx file to a plain-text .m live script, run the following at the MATLAB Command Window. The recipe is not part of the resulting .m file:
editor = matlab.desktop.editor.openDocument(mlxPath, Visible=0);
editor.saveAs(newMPath); % use .m extension
editor.closeNoPrompt;
Rules
Text lines use %[text] — NOT bare %
One paragraph = one %[text] line — do not hard-wrap; let the Live Editor handle line width
No empty %[text] lines — they render as unwanted blank space
Section headers: %% on its own line, then %[text] ## Title on next line
No blank lines in the file, except a single blank line directly before %[appendix]
No figure command — implicit figure creation only
No more than one plot per section (unless using tiled layouts)
No close all or clear
No mfilename — does not work as intended in live scripts. Hardcode filenames or use pwd.
Escape these characters when used as literal text (not as markdown syntax): *, _, [, ], `, \. Also escape . after a digit and # at line start.
Equations use single-$ inline form only: $ a = \\pi r^2 $ (no $$ ... $$). For a centered/display equation, wrap the line: %[text]{"align":"center"} $ X(k) = \\sum\_{n=0}^{N-1} x(n) e^{-j2\\pi kn/N} $
Diagnose MATLAB errors and unexpected behavior. Breakpoints, workspace inspection, try-catch diagnostics, and common error patterns. Use when debugging functions, tracing errors, inspecting variables, or diagnosing runtime failures.