matlab-export-session-script
Export conversation MATLAB code to a clean, runnable .m script. Use when asked to save or export session work. TRIGGER: user asks to save, export, or generate a script from the current session's MATLAB code. Also when asked for a reproducible script or clean version of what was run.
npx skills add matlab/matlab-agentic-toolkit --skill matlab-export-session-script --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 | ## When to Use - User says "export this session as a script" - User says "create a script from what we did" - User says "save the MATLAB code from this conversation" - At the end of any MATLAB workflow session when deliverables are requested ## When NOT to Use - Writing new MATLAB code from scratch — just write the code directly - Exporting non-MATLAB content (Python, shell scripts, etc.) - Creating Live Scripts (.mlx) — this skill produces plain .m files only ## Extraction Rules ### Include - All MATLAB co
- Quick Reference
- When to Use
- When NOT to Use
- Extraction Rules
- Include
- Exclude
- Deduplicate
- Script Assembly
- 1. Scan the Conversation
- 2. Order Logically
- 3. Format as Sections
- Formatting Conventions
- Output
- File Naming
What does the matlab-export-session-script skill do?
Export conversation MATLAB code to a clean, runnable .m script. Use when asked to save or export session work. TRIGGER: user asks to save, export, or generate a script from the current session's MATLAB code. Also when asked for a reproducible script or clean version of what was run.
How do I install it?
Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-export-session-script --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.
