Live survey315 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Matlab Export Session Script

skill · matlab/matlab-agentic-toolkitNOASSERTION licenceAudited 14 Oct 2026 · source 58967e6f32b5

★ 1,164pushed 5 days agoversion 1.0
✓SAFEGrade B · 89/100 · 14 Oct 2026 · 58967e6
1,164repo stars · whole matlab/matlab-agentic-toolkit

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 58967e6f32b5 and found no filesystem, network or shell access and no hard-coded secrets. What it does: 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…

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Matlab Export Session Script (matlab/matlab-agentic-toolkit)”. Retrieved 14 Oct 2026. https://modelsatlas.com/skills/matlab/matlab-export-session-script

Trust audit

Audit 0.4.1 · source read 14 Oct 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha 58967e6f32b5 · 14 Oct 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

What it tells the agent

Full source on GitHub ↗

Its description: 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…

---
name: matlab-export-session-script
description: "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."
license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md
metadata:
  author: MathWorks
  version: "1.0"
---

# 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 code that produced meaningful results (analysis, design, visualization)
- Variable assignments, function calls, plotting commands
- `addpath` calls needed for utility functions used during the session

### Exclude

- Shell commands: PowerShell, Bash, OS commands, `sbm` wrappers
- MCP tool call metadata and framework boilerplate
- Exploratory one-liners that were debugging dead ends
- Agent-only `fprintf` statements used to relay info back (keep user-facing ones)
- `'Visible','off'` on figures -- the exported script is for interactive use

### Deduplicate

When the same block was run multiple times (e.g., to fix an error), keep only the **final successful version**. Do not include intermediate failed attempts or parameter corrections -- use the values that worked.

## Script Assembly

### 1. Scan the Conversation

Walk through all assistant messages chronologically. For each MATLAB code block that was executed (via MCP, `-batch`, or similar), extract the MATLAB portion and note:
- What it accomplished (this becomes the section comment)
- Whether it succeeded or was superseded by a later version
- Its logical position in the workflow

### 2. Order Logically

Arrange extracted code into a natural workflow order, which may differ from execution order:
1. Setup (paths, parameters, imports)
2. Data loading / model creation
3. Configuration
4. Analysis / computation
5. Visualization / results

### 3. Format as Sections

```matlab
%% <Title> -- <One-line summary>
% <Multi-line description of what this script does.>
% <Key context: what design, what board, what analysis, etc.>
%
% Required toolboxes: <list only what was actually used>

%% Step 1: <Description>
% <Why this step matters>
<code>

%% Step 2: <Description>
<code>
```

### Formatting Conventions

- **`%%` section breaks** for each logical step (creates foldable sections in MATLAB Editor)
- **One comment line** before each section explaining intent
- **Consolidate parameters** into the setup section rather than scattering through the script
- **Preserve variable names** exactly as used in the session
- **Escape underscores** in `title()` / `xlabel()` TeX strings: `\_` not `_`

## Output

### File Naming

Derive from the session's primary task. Use lowercase with underscores:
- `openrex_core_rail_dc_analysis.m`
- `hairpin_filter_design_2p4ghz.m`
- `via_crosstalk_sweep.m`

### File Location

Save to `Results/` under the working directory. Create the folder if it doesn't exist.

### After Saving

Tell the user:
- The file name and path
- How many sections / lines the script contains
- That it is ready to run in MATLAB with the required toolboxes

## Common Patterns

- **One script per session** -- consolidate all related work into a single script, even if it spans multiple design iterations. Multiple scripts are only warranted for unrelated workflows in the same session.
- **Parameters at the top** -- gather all user-configurable values (`freq`, `substrate`, dimensions) into the setup section so the user can modify them without hunting through the script.
- **Suppress figures in batch** -- if the script may be run non-interactively, wrap plotting in `if ~exist('BATCH_MODE', 'var')` guards. But default to showing figures for interactive use.
- **Path management** -- if the script uses files (Touchstone, board files), place file paths in variables at the top of the setup section. Use `fullfile()` for cross-platform paths. Never hard-code absolute paths.
- **Batch mode header** -- for scripts that may be run via `matlab -batch`, add at the top:
  ```matlab
  %% Configuration
  BATCH_MODE = exist('BATCH_MODE', 'var') || ~usejava('desktop');
  if ~BATCH_MODE, close all; clc; end
  ```
- **Results directory** -- save outputs to a `Results/` subfolder:
  ```matlab
  resultsDir = fullfile(pwd, 'Results');
  if ~exist(resultsDir, 'dir'), mkdir(resultsDir); end
  ```

## Pitfalls

1. **Do not include shell commands.** Only MATLAB code belongs in the exported script. PowerShell, Bash, and `sbm` wrapper invocations must be stripped. If a shell step is essential (e.g., downloading a file), replace it with a comment noting the prerequisite.

2. **Do not keep failed iterations.** When a code block was re-run after fixing an error, only the final successful version should appear. Including intermediate failur

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 58967e6

Download folder ↗
git clone https://github.com/matlab/matlab-agentic-toolkit
git -C matlab-agentic-toolkit checkout 58967e6f32b5

The author documents no install command, so this uses the repository directly. Our verdict covers commit 58967e6f32b5 only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 58967e6f32b5

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/matlab/matlab-export-session-script/badge.svg)](https://modelsatlas.com/skills/matlab/matlab-export-session-script/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

Similar skills

Matlab Add Awgn✓SAFE

matlab/matlab-agentic-toolkit

Read BEFORE writing any code that adds Additive White Gaussian Noise (AWGN) to signals and converts between SNR, Eb/No, Es/No, and per-subcarrier SNR for communications simulations, using awgn(), convertSNR(),…

★ 1.2kGrade B
Matlab Agentic Toolkit Setup✓SAFE

matlab/matlab-agentic-toolkit

The MATLAB Agentic Toolkit brings proven MATLAB capabilities to AI agents, making engineering and scientific workflows agent-ready.

★ 1.2kGrade B
Matlab Analyze Data✓SAFE

matlab/matlab-agentic-toolkit

Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, row filtering, sorting, cleaning,…

★ 1.2kGrade B
Matlab Analyze Em✓SAFE

matlab/matlab-agentic-toolkit

S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or…

★ 1.2kGrade B
Matlab Analyze Pcb Pdn✓SAFE

matlab/matlab-agentic-toolkit

PDN DC voltage/current analysis, IR drop, design rule checking, and multi-net batch analysis on imported PCB layouts. TRIGGER: user asks about power integrity, PDN analysis, IR drop, voltage distribution, current…

★ 1.2kGrade B
Matlab Analyze Rf Amplifier✓SAFE

matlab/matlab-agentic-toolkit

The MATLAB Agentic Toolkit brings proven MATLAB capabilities to AI agents, making engineering and scientific workflows agent-ready.

★ 1.2kGrade B

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/matlab/matlab-export-session-script/badge.svg)](https://modelsatlas.com/skills/matlab/matlab-export-session-script/)

Questions about Matlab Export Session Script

What does the Matlab Export Session Script skill do?
The MATLAB Agentic Toolkit brings proven MATLAB capabilities to AI agents, making engineering and scientific workflows agent-ready.
Is Matlab Export Session Script safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Matlab Export Session Script access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (58967e6f32b5), read on 2026-10-14. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.