| Creates a MATLAB project for an existing folder of MATLAB files using the matlab.project.* APIs via MCP. Adds all existing files, configures the project path, generates a project name/description, and creates a README.md with a function table. Prompts the user before creating any new folders. Never overwrites existing files. project", "make this a MATLAB project", "configure project".
npx skills add https://github.com/matlab/matlab-agentic-toolkit --skill matlab-create-project
Creates a fully configured MATLAB project from an existing folder of MATLAB code using matlab.project.* APIs via the MATLAB MCP server.
matlab-create-buildfile — a project must exist first.prj file with resources/project/ folder) — use openProject insteadmatlab-define-toolbox-apimatlab-create-buildfile (after the project exists)| Function | Purpose |
|----------|---------|
| matlab.project.createProject | Create a new project with specified definition type |
| openProject | Open an existing project (fallback if one already exists) |
| addFile | Add files to the project |
| addPath | Add folders to the project path |
| genpath | Generate path string for folder tree (excludes +pkg, @class, private) |
mkdir.| Input | Required | Description |
|-------|----------|-------------|
| Project path | Yes | Absolute path to the folder to make into a project |
| Project name | No | Override auto-detected name (default: inferred from code) |
.prj file exists, ask the user — it could be a MATLAB project or a legacy deploytool file:> A) This is a MATLAB project — open it with openProject instead of creating a new one
> B) This is a legacy deploytool file — proceed with creating a new MATLAB project
Contents.m if present — it provides authoritative function descriptions and categorizationContents.m, read the H1 line (first % comment) of each .m file to understand purpose.m (functions/scripts), data (.mat, .dat, .csv), text (.txt), images (.png, .jpg), otherBased on the code analysis:
Contents.m title line, folder name, or dominant theme of functionsUse MATLAB MCP (mcp__matlab__evaluate_matlab_code) to execute:
proj = matlab.project.createProject("Folder", '<projectFolder>', ...
"Name", "<inferred name>", ...
"DefinitionType", "FixedPathMultiFile");
proj.Description = "<generated description>";
Why FixedPathMultiFile: Produces a .prj + resources/project/ structure that is SCM-friendly (isolated XML files, no merge conflicts). This is the target format for toolbox projects.
Add every file in the project folder to the project. Process by extension category:
% Add .m files
mFiles = dir(fullfile(proj.RootFolder, '*.m'));
for i = 1:numel(mFiles)
addFile(proj, fullfile(mFiles(i).folder, mFiles(i).name));
end
% Repeat for data/text/image/other file extensions found
% Also recursively add files from any existing subfolders
Important: Use dir(..., '**', '*.<ext>') for recursive discovery in subfolders.
Add folders to the project path based on layout:
% Determine path root based on project layout
if isfolder(fullfile(proj.RootFolder, "toolbox"))
% toolbox/ layout — only toolbox content goes on path
% (project root, tests/, buildUtilities/ stay OFF the path)
pathRoot = fullfile(proj.RootFolder, "toolbox");
else
% Flat layout — all subfolders go on path
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. The filter above ensures internal/ is never added via addPath. When toolbox/ exists, only its contents should be on the MATLAB path — this matches what end users get when the toolbox is installed. If toolbox/ doesn't exist yet (flat layout), adding root and subfolders is correct since the user's code lives at root.
If the user later adopts toolbox/ (via Step 7), the path should be reconfigured — suggest re-running this skill or manually adjusting path entries.
Only if README.md does not already exist at the project root.
Generate a README.md containing:
| function_name | one-line description |license.txt or copyright info existsAdd the README.md to the project after creation:
addFile(proj, fullfile(proj.RootFolder, 'README.md'));
Based on mathworks/toolboxdesign conventions, present the user with a table of recommended folders:
| 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 which (if any) they want created. Do not create them without confirmation. Present as lettered options:
> A) All — create all recommended folders
> B) Select — pick specific folders (e.g., "tests and examples")
> C) Skip — don't create any new folders
When confirmed, create the folders and add them to the project path:
mkdir(fullfile(proj.RootFolder, '<folderName>'));
addPath(proj, fullfile(proj.RootFolder, '<folderName>'));
Run a summary check:
proj = currentProject;
disp("Name: " + proj.Name);
disp("Files: " + numel(proj.Files));
disp("Path entries: " + numel(proj.ProjectPath));
Report the final state to the user.
matlab.project.createProject fails because a project already exists, use openProject instead and inform the useraddFile fails for a specific file (e.g., it's already tracked), catch and continueaddPath fails for a folder, catch the error and report which folder was skippedProvide the user with:
.prj file for opening in MATLAB/matlab-document-toolbox — generate README, function signatures, GettingStarted guide, and examples/matlab-create-buildfile — define the build plan with code checks, tests, and packaging tasks----
Copyright 2026 The MathWorks, Inc.
----
Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning
Comprehensive technology-agnostic prompt for analyzing and documenting project folder structures. Auto-detects project types (.NET, Java, React, Angular, Python, Node.js, Flutter), generates detailed blueprints with visualization options, naming conventions, file placement patterns, and extension templates for maintaining consistent code organization across diverse technology stacks.
Use when complex problems require systematic step-by-step reasoning with ability to revise thoughts, branch into alternative approaches, or dynamically adjust scope. Ideal for multi-stage analysis, design planning, problem decomposition, or tasks with initially unclear scope.
Multi-agent workflow examples to work together on the OpenServ Platform. Covers agent discovery, multi-agent workspaces, task dependencies, and workflow orchestration using the Platform Client. Read reference.md for the full API reference. Read openserv-agent-sdk and openserv-client for building and running agents.
> Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md.
API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.
Patterns for automating GitHub workflows with AI assistance, inspired by [Gemini CLI](https://github.com/google-gemini/gemini-cli) and modern DevOps practices.
Groups existing components into logical business domains to plan service-based architecture. Use when asking "which components belong together?", "group these into services", "organize by domain", "component-to-domain mapping", or planning service extraction from an existing codebase. Do NOT use for identifying new domains from scratch (use domain-analysis) or analyzing coupling (use coupling-analysis).
Take matlab/matlab-create-project from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.