matlab-create-live-script
Skill8 starsChanged 5 months agoMITView on GitHub
Create plain-text MATLAB Live Scripts (.m files) with rich text formatting, LaTeX equations, section breaks, and inline figures. Use when generating tutorials, analysis notebooks, reports, documentation, or educational content. Requires R2025a+.
In this repository58 other files it gives its agents.
- skills/writing-polish/humanizer/AGENTS.mdAGENTS.md
- frontend-designSkill
- ask-mattSkill
- codebase-designSkill
- code-reviewSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- github-codex-keySkill
- github-ssh-key-pushSkill
- implementSkill
- improve-codebase-architectureSkill
- prototypeSkill
- setup-matt-pocock-skillsSkill
- tddSkill
- to-issuesSkill
- to-prdSkill
- triageSkill
- huggingface-accelerateSkill
- quantizing-models-bitsandbytesSkill
- gpuboxSkill
- evaluating-llms-harnessSkill
- ml-training-recipesSkill
- peft-fine-tuningSkill
- experiment-tracking-swanlabSkill
- unslothSkill
- matlab-add-awgnSkill
- matlab-agentic-toolkit-setupSkill
- matlab-build-appSkill
- matlab-debuggingSkill
- matlab-design-digital-filterSkill
- matlab-display-imageSkill
- matlab-install-productsSkill
- matlab-list-productsSkill
- matlab-map-database-objectsSkill
- matlab-model-serdes-systemsSkill
- matlab-modernize-codeSkill
- matlab-read-databaseSkill
- matlab-review-codeSkill
- matlab-testingSkill
- matlab-use-duckdbSkill
- matlab-write-databaseSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- teachSkill
- writing-great-skillsSkill
- ara-compilerSkill
- ara-research-managerSkill
- research-paper-notesSkill
- ara-rigor-reviewerSkill
- brainstorming-research-ideasSkill
- creative-thinking-for-researchSkill
- academic-plottingSkill
- ml-paper-writingSkill
- paper-spineSkill
- humanizerSkill
- prompt-optimizerSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
No empty %[text] lines — they render as unwanted blank space
- Distinctive: line 32
No blank lines anywhere in the file
- Distinctive: line 34
No more than one plot per section (unless using tiled layouts)
- Distinctive: line 38
Every file ends with the required appendix
- Very specific: line 39
Avoid fprintf — drop the semicolon or use disp() for output
- Distinctive: line 44
Every Live Script must end with:
- Very specific: line 56
When reading a Live Script file, ignore everything below the %[appendix] marker.
- Distinctive: line 139
Use only when side-by-side comparison is important to the illustration:
- Distinctive: line 161
Before finishing a Live Script, verify:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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)
When NOT to Use
- Regular scripts without rich formatting
- Function files
- MATLAB older than R2025a
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] ## Titleon next line - No blank lines anywhere in the file
- No
figurecommand — implicit figure creation only - No more than one plot per section (unless using tiled layouts)
- No
close allorclear - Double all LaTeX backslashes:
\\sin,\\frac,\\sum - Last bulleted list item ends with
\ - Every file ends with the required appendix
- Avoid
fprintf— drop the semicolon or usedisp()for output - Outputs should serve the reader's understanding, not verify execution — run the script via MCP to confirm correctness
Required Appendix
Every Live Script must end with:
%[appendix]{"version":"1.0"}
%---
%[metadata:view]
% data: {"layout":"inline"}
%---Reading Live Scripts (Token Optimization)
When reading a Live Script file, ignore everything below the %[appendix] marker. The appendix contains embedded images and metadata that consume tokens without adding useful information. All code and text content appears before it.
Format Reference
| Syntax | Renders as | ||
%[text] # Title | H1 heading | ||
%[text] ## Section | H2 heading | ||
%[text] **bold** | Bold | ||
%[text] _italic_ | Italic | ||
| `%[text] | code | ` | Monospace |
%[text] $ x^2 $ | Inline equation | ||
%[text] - item | Bullet | ||
%[text] - last \ | Last bullet | ||
%% | Section break |
Tables
%[text:table]
%[text] | Method | Result |
%[text] | --- | --- |
%[text] | Trapezoidal | 1.9998 |
%[text:table]Example
%[text] # Sinusoidal Signals
%[text] Examples of sinusoidal signals in MATLAB.
%[text] - sine waves
%[text] - cosine waves \
x = linspace(0,8*pi);
%%
%[text] ## Sine Wave
plot(x,sin(x))
title('Sine Wave')
xlabel('x (radians)')
ylabel('sin(x)')
grid on
%%
%[text] ## Cosine Wave
plot(x,cos(x))
title('Cosine Wave')
xlabel('x (radians)')
ylabel('cos(x)')
grid on
%%
%[text] ## Summary
%[text] The sine and cosine functions are $ \\pi/2 $ radians out of phase.
%[appendix]{"version":"1.0"}
%---
%[metadata:view]
% data: {"layout":"inline"}
%---Common Patterns
Mathematical Explanations with Equations
%[text] ## Theory
%[text] The discrete Fourier transform is defined as:
%[text] $ X(k) = \\sum_{n=0}^{N-1} x(n)e^{-j2\\pi kn/N} $Code with Inline Comments
%%
%[text] ## Data Processing
%[text] Load and filter the data, then visualize the results.
data = load('measurements.mat');
filtered = lowpass(data, 0.5); % Apply lowpass filter
plot(filtered)
title('Filtered Data')Tiled Layouts for Comparison
Use only when side-by-side comparison is important to the illustration:
%%
%[text] ## Comparison of Methods
tiledlayout(1,2)
nexttile
plot(method1)
title('Method 1')
nexttile
plot(method2)
title('Method 2')Workflow
- Plan — Title, setup, analysis sections, summary
- Write —
%[text]for text,%%for sections, appendix at end - Verify — Run via MCP to confirm code executes
Checklist
Before finishing a Live Script, verify:
- File has .m extension
- Sections use
%%followed by%[text] ## - No blank lines or empty
%[text]lines - Each paragraph is a single
%[text]line (no hard-wrapping) - One plot per section (unless tiled layout)
- Bulleted lists end with backslash on last item
- LaTeX uses double backslashes
- No
figurecommands - No
close allorclearat start - Appendix is present and correctly formatted
- Outputs serve the reader, not the developer
Copyright 2026 The MathWorks, Inc.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

