matlab-export-session-script
Installation
SKILL.md
Exporting a Session to a MATLAB Script
Extracts all MATLAB code executed during the current conversation, assembles it into a well-documented, runnable .m script, and saves it to the working directory.
Quick Reference
| Step | Action |
|---|---|
| 1. Scan | Walk assistant messages chronologically; extract each executed MATLAB code block |
| 2. Deduplicate | Keep only the final successful version of repeated blocks |
| 3. Order | Arrange into logical workflow order (setup, model, config, analysis, visualization) |
| 4. Format | Add %% section headers, consolidate parameters at top |
| 5. Save | Write to Results/<descriptive_name>.m under the working directory |