From matlab-skills
Generates MATLAB plain text Live Scripts (.m files) with rich text formatting, sections, bulleted lists, tables, LaTeX equations, and plots. Use for MATLAB scripts, tutorials, or educational content.
npx claudepluginhub matlab/skills --plugin matlab-skillsThis skill uses the workspace's default tool permissions.
This skill provides comprehensive guidelines for creating properly formatted MATLAB plain text Live Scripts. These scripts combine executable MATLAB code with rich text documentation in a single .m file.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
This skill provides comprehensive guidelines for creating properly formatted MATLAB plain text Live Scripts. These scripts combine executable MATLAB code with rich text documentation in a single .m file.
Every Live Script must end with this exact formatting:
%[appendix]{"version":"1.0"}
%---
%[metadata:view]
% data: {"layout":"inline"}
%---
When reading a Live Script file to pass back to the language model, you can save significant token count by ignoring everything below the appendix marker (which begins with %[appendix]). This optimization avoids passing large embedded images that are stored in the appendix section. All working code and text content appears before the appendix, so no functional information is lost.
CORRECT format:
%%
%[text] ## Section Title
INCORRECT format (DO NOT USE):
%% Section Title
%[text] prefix%[text]Bulleted lists must have a backslash on the last item:
%[text] - bullet 1
%[text] - bullet 2
%[text] - bullet 3 \
%[text:table]
%[text] | Column A | Column B |
%[text] | --- | --- |
%[text] | Value 1 | Value 2 |
%[text] | Value 3 | Value 4 |
%[text:table]
Format equations with double backslashes:
%[text] $ e = \\sum_{\\alpha=0}^\\infty \\alpha^n/n! $
Note: All backslashes in LaTeX must be doubled.
DO NOT use fprintf for reader comments:
fprintf('This is a comment') % WRONG
Instead use rich text:
%[text] This is a comment % CORRECT
figure command to create new figuresclose all or clear commands%[text] # Sinusoidal Signals
%[text] Examples of sinusoidal signal 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]
%[appendix]{"version":"1.0"}
%---
%[metadata:view]
% data: {"layout":"inline"}
%---
A typical Live Script follows this pattern:
Title and Introduction
%[text] # Main Title
%[text] Brief description of what this script does.
Setup Code (if needed)
variable = value;
data = load('file.mat');
Sections with Explanations
%%
%[text] ## Section Name
%[text] Explanation of what this section does.
code_goes_here();
plot(results)
Required Appendix
%[appendix]{"version":"1.0"}
%---
%[metadata:view]
% data: {"layout":"inline"}
%---
%[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} $
%%
%[text] ## Data Processing
%[text] First, we load and filter the data.
data = load('measurements.mat');
filtered = lowpass(data, 0.5); % Apply lowpass filter
%[text] Then we visualize the results.
plot(filtered)
title('Filtered Data')
Only when necessary for comparison:
%%
%[text] ## Comparison of Methods
tiledlayout(1,2)
nexttile
plot(method1)
title('Method 1')
nexttile
plot(method2)
title('Method 2')
Before finishing a Live Script, verify:
%% followed by %[text] ##figure commandsclose all or clear at startfprintf for comments (use %[text] instead)Issue: Script doesn't display rich text properly
%[text] is at the start of each text lineIssue: Equations not rendering
Issue: Sections not appearing correctly
%% on its own line, then %[text] ## on the next lineIssue: Script won't save with outputs