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/phase-3-project.md
View on GitHub# Phase 3: Create Project
Create a fully configured MATLAB project from the existing folder using `matlab.project.*` APIs via the MATLAB MCP server.
**Skip if:** A MATLAB project already exists (`.prj` file with `resources/project/` folder).
## Key Functions
| Function | Purpose |
|----------|---------|
| `matlab.project.createProject` | Create a new project with specified definition type |
| `openProject` | Open an existing project |
| `addFile` | Add files to the project |
| `addPath` | Add folders to the project path |
| `genpath` | Generate path string for folder tree |
## Critical Rules
1. **NEVER overwrite existing files.** Check before creating.
2. **ALWAYS prompt before creating new folders.** Present recommended folders and wait for confirmation.
3. **Do NOT move or rename any existing files.**
## Step 3.1 — Discover Existing Content
- List all files recursively
- If a `.prj` file exists, ask: (A) This is a MATLAB project → open it, (B) Legacy deploytool file → proceed
- Read `Contents.m` if present for function descriptions
- Identify file types and existing subfolders
## Step 3.2 — Determine Project Identity
- **Name**: From `Contents.m` title line, folder name, or dominant theme
- **Description**: 1–3 sentence summary
## Step 3.3 — Create the MATLAB Project
```matlab
proj = matlab.project.createProject("Folder", '<projectFolder>', ...
"Name", "<inferred name>", ...
"DefinitionType", "FixedPathMultiFile");
proj.Description = "<generated description>";
```
**Why FixedPathMultiFile:** Produces `.prj` + `resources/project/` structure that is SCM-friendly.
## Step 3.4 — Add All Existing Files
Add every file in the project folder. Use `dir(..., '**', '*.<ext>')` for recursive discovery.
## Step 3.5 — Configure Project Path
```matlab
if isfolder(fullfile(proj.RootFolder, "toolbox"))
pathRoot = fullfile(proj.RootFolder, "toolbox");
else
pathRoot = proj.RootFolder;
end
allFolders = strsplit(genpath(pathRoot), pathsep);
for i = 1:numel(allFolders)
if ~isempty(allFolders{i}) && ~contains(allFolders{i}, filesep + "internal")
addPath(proj, allFolders{i});
end
end
```
**Why this logic:** `genpath` already excludes `+pkg/`, `@class/`, `private/`, and dot-folders — but NOT `internal/` folders. The `internal/` folder uses MATLAB's scoping convention: functions inside are only visible from the parent folder, never from the global path. When `toolbox/` exists, only its contents should be on the MATLAB path.
## Step 3.6 — Create README.md
**Only if README.md does not already exist.** Generate with: title, description, function table grouped by category, Getting Started section.
## Step 3.7 — Suggest Best-Practice Folders
Present recommended folders based on [mathworks/toolboxdesign](https://github.com/mathworks/toolboxdesign):
| Folder | Purpose |
|--------|---------|
| `tests/` | Unit tests using the MATLAB Testing Framework |
| `examples/` | Live Script examples and tutorials |
| `doc/` | Documentation (e.g., `GettingStarted.m`) |
| `toolbox/` | Distributable content separated from dev infrastructure |
**ASK the user:**
> A) **All** — create all recommended folders
> B) **Select** — pick specific folders
> C) **Skip** — don't create any new folders
----
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: 322k | 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: 198k | 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 |