Agent skill · Workflow & Productivity

matlab-optimize-performance

Read BEFORE optimizing any MATLAB code for speed. Without this workflow, agents commonly optimize the wrong target, fabricate speedup claims without measurement, or introduce regressions. Guides the 7-step workflow: baseline, profile, identify, optimize, measure, verify, report.

matlabgithub.com/matlabGitHub ↗
claude-codecodexcopilotNOASSERTION
Install
npx skills add matlab/matlab-agentic-toolkit --skill matlab-optimize-performance --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 4
SKILL.md size: 8 KB
Bundled scripts: none
Version: 1.0
Declared author: MathWorks
Path: skills-catalog/matlab-software-development/matlab-optimize-performance/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 868
Language: MATLAB

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# MATLAB Performance Optimization Workflow Systematic 7-step workflow for finding and fixing performance bottlenecks in MATLAB code. ## When to Use - User asks to speed up or optimize MATLAB code - User wants to find why their MATLAB code is slow - User has a function or script that takes too long to run - User asks to benchmark or time MATLAB code - User wants to compare performance before and after a change - User asks about MATLAB performance best practices ## When NOT to Use - Optimizing Simulink model simulation speed (use Simulink Profiler) - The bottleneck is in compiled C/MEX code that can't be changed at the M-code level - The performance issue is purely I/O-bound (file reads, network, database) - User wants to write performance *tests* (use the `writing-matlab-perf-tests` skill) ## The 7-Step Workflow ### Step 1: Establish Baseline Measure current performance so you have a number to improve against. **For a single function:** ```matlab f = @() targetFunction(input1, input2); baseline = timeit(f); fprintf('Baseline: %.4f s\n', baseline); ``` **For GPU code:** ```matlab f = @() gpuFunction(gpuInput); baseline = gputimeit(f); ``` **For a script or multi-step workflow:** ```m

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. The 7-Step Workflow
  4. Step 1: Establish Baseline
  5. Step 2: Profile and Analyze
  6. Step 3: Identify Optimization Opportunities
  7. Step 4: Implement Optimizations
  8. Step 5: Measure Optimized Performance
  9. Step 6: Verify Correctness
  10. Step 7: Report Results
  11. Key Rules
  12. Common Mistakes
  13. Reference Files
Ships with 3 files
  • manifest.yaml
  • references/measurement-templates.md
  • references/optimization-patterns.md
More from matlab-agentic-toolkit
All skills →
About this skill
What does the matlab-optimize-performance skill do?

Read BEFORE optimizing any MATLAB code for speed. Without this workflow, agents commonly optimize the wrong target, fabricate speedup claims without measurement, or introduce regressions. Guides the 7-step workflow: baseline, profile, identify, optimize, measure, verify, report.

How do I install it?

Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-optimize-performance --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.

Keep going