matlab/matlab-agentic-toolkit / skills-catalog/matlab-software-development/matlab-package-toolbox
matlab-package-toolbox
VerifiedTurn raw MATLAB code into a published .mltbx toolbox — full pipeline from scope definition through packaging and release. Drives 8 phases with human checkpoints, enforcing ordering and dependencies. Use when asked to package, create a toolbox, or run the files-to-package pipeline.
references/runtime-file-references.md
View on GitHub# Runtime File Reference Detection
`requiredFilesAndProducts` only traces code dependencies (.m, .mlx, MEX, p-code). It never returns data files, images, config files, or other non-code assets. A separate static scan is needed to detect runtime file references that must ship with the toolbox.
## Functions to Scan
Only scan for **input** (read) functions — output functions (save, writetable, imwrite) are not dependencies.
| Priority | Functions | Typical file types |
|----------|-----------|-------------------|
| High | `load`, `readtable`, `readmatrix`, `readcell`, `readtimetable`, `importdata` | .mat, .csv, .xlsx, .txt, .parquet |
| Medium | `imread`, `fileread`, `readlines`, `xmlread`, `audioread`, `VideoReader` | .png, .jpg, .json, .xml, .wav, .mp4 |
| Low | `dlmread`, `csvread` (legacy), `run`, `load_system` | tabular data, .m scripts, .slx |
## Detection Patterns
### 1. Function call with string literal (most common)
```matlab
pattern = '(load|readtable|readmatrix|readcell|readtimetable|importdata|fileread|readlines|xmlread|imread|audioread|VideoReader|run|load_system)\s*\(\s*[''"]([^''"]+)[''"]\s*[,\)]';
tokens = regexp(content, pattern, 'tokens');
```
### 2. Command syntax (load only)
```matlab
commandPattern = '(?<=^|\s)load\s+([^\s;%(]+)';
tokens = regexp(content, commandPattern, 'tokens');
```
Note: `load data.mat` is equivalent to `load('data.mat')`. Only `load` commonly uses command syntax for file paths.
### 3. fullfile with all-literal arguments
```matlab
fullfilePattern = 'fullfile\s*\(\s*([''"][^''"]+[''"](?:\s*,\s*[''"][^''"]+[''"])*)\s*\)';
tokens = regexp(content, fullfilePattern, 'tokens');
% Reconstruct path from quoted components
parts = regexp(tokens{1}{1}, '[''"]([^''"]+)[''"]', 'tokens');
resolvedPath = strjoin(cellfun(@(x) x{1}, parts, 'UniformOutput', false), filesep);
```
## Classification
For each detected file path, classify:
| Path type | Condition | Action |
|-----------|-----------|--------|
| Absolute external | Starts with drive letter (`C:\`), UNC (`\\`), or Unix root (`/`) | CRITICAL — will never resolve on end-user machine |
| Relative, in effective set | `fullfile(toolboxRoot, path)` exists and is in `effectiveFiles` | OK — ships with toolbox |
| Relative, excluded | File exists in toolbox root but not in `effectiveFiles` | CONFLICT — ignore file is blocking a needed file |
| Relative, not found | File does not exist on disk | SKIP — likely generated at runtime or user-supplied |
## Design Rules
- Only flag paths to files that **exist** but won't ship. Don't flag references to non-existent files (e.g., output paths, user-supplied at runtime).
- Exception: absolute paths to existing external files are always flagged — hardcoded paths will break on any other machine.
- Resolve relative paths from the directory of the `.m` file containing the reference.
- Group multiple references to same directory (same as external-code grouping logic).
----
Copyright 2026 The MathWorks, Inc.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |