Matlab Configure Toml Project
MathWorksOfficialCreated by MathWorks
- Skill
- Tool integration
- Software development
- BSD-2-Clause
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides guidance for creating, editing, and configuring MATLAB projects via the matlab.toml file. It covers project structure, path management, dependencies, lifecycle scripts, and deployment settings. The skill ensures that configuration files are authored correctly according to the R2026b schema, helping users define project metadata, test suites, and compiler targets while avoiding common pitfalls like silent schema violations.
What it does
- Generates draft matlab.toml files based on existing project folder structures.
- Configures MATLAB path and test folder inclusions.
- Defines project dependencies, including MATLAB packages and reference projects.
- Sets up lifecycle scripts, shortcuts, and custom project metadata.
- Maps deployment targets for MATLAB Compiler and Compiler SDK.
- Validates configuration changes against the official schema rules.
When to use it
- When creating a new MATLAB project configuration.
- When modifying existing project settings like paths, dependencies, or build targets.
- When setting up project-specific shortcuts or lifecycle scripts.
- When auditing a matlab.toml file for schema correctness.
Advantages
- Ensures configuration files follow the correct R2026b schema.
- Prevents silent failures caused by unrecognized keys or invalid paths.
- Provides a structured approach to project organization.
- Maintains consistency across project definitions.
Usage examples
- “Create a new matlab.toml for my project named SignalProcessor.”
- The agent will ask for the project name and scan the current directory to propose path and test folders, then generate a minimal matlab.toml draft.
- “Add a new dependency to my matlab.toml for my toolbox version 2.1.”
- The agent will read the existing file, append the dependency in the correct format, and present the updated configuration for review.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/matlab/matlab-configure-toml-project/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip matlab-configure-toml-project.zip -d .agents/skills
Documentation by MathWorks
matlab.toml Projects
matlab.toml is a TOML-based configuration file for MATLAB projects. It defines project structure, dependencies, lifecycle scripts, shortcuts, labels, packaging, deployment, and Simulink settings. Every section is optional — the schema mandates no top-level field — but always set name, which supplies the project's display name.
matlab.toml must be placed at the project root folder — the same folder that would contain a .git/ folder or be the top-level working folder for the project.
For MATLAB R2026b and later, prefer matlab.toml for new projects. Existing .prj
projects remain supported and can be converted in either direction with:
matlab.project.convertDefinitionFiles(pwd, "Toml")Opening a project with openProject, buildtool, or runtests activates its
configuration. The project's [folders].path entries then control the MATLAB path,
so do not spread addpath calls through source and test files.
Use
matlab-use-package-managerfor MATLAB packages.Use
matlab-package-toolboxto author and build.mltbxMATLAB packages.@references/format-reference.md — complete field documentation with examples, plus the validation rules that govern the whole file
@references/deployment-reference.md — the
[compiler]deployment targets
When to Use
The user mentions
matlab.toml, or "project" in a MATLAB context (creating, editing, or inspecting a MATLAB project's configuration).Setting up MATLAB path folders, test folders, lifecycle scripts, shortcuts, package dependencies, reference projects, file labels, export profiles, MATLAB package metadata, deployment targets, or Simulink project settings.
Auditing an existing
matlab.tomlfor schema violations before they cause silent failures.
When NOT to Use
The user wants to drive project state through the MATLAB object API directly (
matlab.project.createProject,proj.addPath, etc.) rather than author or edit the file — that is a legitimate but different task; this skill's workflows assume the file is the artifact being produced.The task is editing a
.prj-format project definition. Do not carry.prjkeys or concepts over intomatlab.toml— the schemas are not equivalent. A reference project may still target a.prjproject.The task only concerns
[compiler.*]deployment target internals in depth — read @references/deployment-reference.md directly rather than following the Creation/Editing workflows below, which are file-level, not per-target.
Key Functions
| Function | Purpose |
|---|---|
openProject | Loads a matlab.toml (or .prj) as the current project. Does not validate the schema — unrecognized keys, missing files, and wrong types all load silently. Use it to confirm the file parses, never as a correctness check. |
currentProject | Returns the currently open Project object; use its Name, PathFolders, TestFolders, StartupFiles, etc. properties to verify a round-trip after writing the file. |
matlab.project.createProject | Creates a new project through the imperative API instead of authoring the file. Avoid this as the mechanism for producing matlab.toml — write the TOML directly (see Creation Workflow, step 3). |
Creation Workflow
When a user wants to create a new matlab.toml (no existing file), follow this scan-first approach:
Ask for the project name. This is the only required field.
Scan the current folder for existing structure:
Find subfolders containing
.m,.mlx,.slx, or.mlappfiles. Propose these as[folders].pathentries.Identify folders whose names contain "test" (e.g.,
tests/,test/,unitTests/). Propose these as[folders].testentries.Look for scripts matching
*startup*or*setup*patterns — propose asstartup-files.Look for scripts matching
*shutdown*or*cleanup*or*teardown*patterns — propose asshutdown-files.Exclude hidden folders (
.git,.svn, etc.) and common output folders (derived/,results/,build/).
Generate a draft starting minimal — name, folders, and any discovered lifecycle scripts. Present it to the user.
Ask about optional sections as needed, not as a checklist:
MATLAB packages (not MathWorks products) and reference projects
Shortcuts to frequently-used scripts
File labels and export profiles (only if used in code or explicitly requested)
MATLAB package metadata (
[[package]]) if the project ships as an.mltbxDeployment targets (
[compiler.*]) if the project builds a standalone app, library, or language packageSimulink settings (if
.slxfiles are present)
After generating the TOML file, ask the user if they want the folders listed in
[folders]to be created on disk (for nonexistent folders in new projects).
Start minimal and let the user add sections incrementally. One focused question at a time is better than a long questionnaire.
Editing Workflow
When a matlab.toml already exists and the user wants to modify it:
Read the existing
matlab.tomlto understand the current configuration.Map the user's request to schema sections. Identify which section(s) need changes — refer to @references/format-reference.md for valid fields and formats.
Make targeted edits. Modify only the sections the user asked about. Do not restructure, reformat, or reorder untouched sections. Preserve any user comments (
#lines) in the file.Validate against the schema yourself.
openProjectdoes not report schema violations — unknown keys, missing files, and wrong value types all load silently and are simply ignored. A successfulopenProjectis not evidence the file is correct, so check every key against @references/format-reference.md rather than relying on MATLAB errors and warnings:Dependency values must use one of the three supported formats (package version string, package version with ID, or reference-project path).
Array-of-tables (
[[project.profile]],[[package]],[[matlab.test.test-suite]],[[compiler.*]]) syntax must be correct.No unknown keys. Every table except
[user]is closed. Do not invent keys or carry over keys from.prjfiles.Path keys must resolve. Most path values must point at files that exist and live inside the project root. Few paths (
startup-folder, dependencypath) can be outside the project root. Output paths (cache folders, build output) do not need to exist. The reference annotates each key. Confirming a path means listing the folder and seeing the entry — a truncated, filtered, orhead-limited listing that fails to show it is not a confirmation, and neither is alsof a guessed name that returns nothing.Required fields must be present:
idandpackage-rootin[[package]],namein[[compiler.standalone]],pathin project-path dependencies and shortcuts,versionin version-with-ID dependencies, and bothcategoryandlabelin every label filter.
Present the change — show the user what will be modified before writing the file.
Conventions
Author the TOML directly. Do not produce
matlab.tomlby drivingmatlab.project.createProjectand reading back what MATLAB wrote — write the file yourself, with the sections in the order given above.Tables are closed. Every table except
[user]rejects unrecognized keys. Never invent a key or carry one over from a.prjfile; check every key against @references/format-reference.md.openProjectis not a validator. A file that opens cleanly may still contain silently-ignored schema violations — the only way to be sure a key is correct is to look it up.Path values must be confirmed, not guessed. Listing a folder and seeing the entry is a confirmation; a truncated, filtered, or
head-limited listing that fails to show it is not, and neither is anlsof a guessed name that returns nothing.MathWorks products are never
[dependencies]entries.[dependencies]accepts any key, so a product name loads silently and wrongly. Record product requirements elsewhere (e.g.[project].summary,[[package]].product-dependencies, or a comment).Preserve what the user didn't ask you to touch. Comments and section order in an existing file survive an edit unless the user's request required changing them.
Quick Reference
| Section | Purpose | Key Fields |
|---|---|---|
name | Project name (always set it) | string |
[user] | Free-form custom data | any keys/nested tables |
[folders] | MATLAB path and test folders | path, test (arrays) |
[dependencies] | Declare MATLAB packages (not MathWorks products) or reference projects | packages: version string or {version, id}; references: {path, absolute} |
[project] | Lifecycle and metadata | summary, startup-folder, startup-files, shutdown-files, custom-tasks |
[project.dependency-analyzer] | Dependency analysis cache | cache-file |
[project.shortcuts] | Named script shortcuts | {path, icon} per shortcut; can be grouped |
[project.labels.Category] | File categorization | LabelName = ["file.m", "dir/"] |
[[project.profile]] | Export/filter profiles | name, included-files, excluded-files, excluded-labels |
[project.dashboards] | Dashboard label groupings | component, unit (label references) |
[project.digital-thread] | Traceability settings | tool-output-tracking, ignore |
[[package]] | Build a MATLAB package | id (required), package-root (required), name, version, summary, description, folders, apps, provider |
[compiler.*] | Deployment build targets | 10 targets: standalone (name required), web-app, excel-add-in, dot-net-assembly, c-shared-library, cpp-shared-library, production-server-archive, com-component, java-package, python-package — see @references/deployment-reference.md |
[matlab.test] | Test runner configuration | coverage-setting, test-suite |
[simulink] | Simulink settings | start-simulink, cache-folder, codegen-folder, refresh-customizations |
[simulink.process-advisor] | Process Advisor settings | incremental-build, enable-model-caching, 9 more string properties |
[[package]] can include MATLAB code, Simulink models, apps, documentation, and other
project content in the resulting MATLAB package. Use matlab-package-toolbox for the
authoring and build workflow, or matlab-use-package-manager to install a completed
package.
Package Dependencies and Reference Projects
Each key under [dependencies] names either a MATLAB package or a reference project.
MathWorks products are not packages and must not be listed here.
Package dependency: version string — for a MATLAB package:
mytoolbox = "3.*"Package dependency: version with ID — when the package ID is available:
motor = {version = "*", id = "9b9e5bc2-a583-4d79-98c5-d2b9af135697"}Reference project — for a project at a filesystem path (absolute is optional and
defaults to relative):
shared-utils = {path = "../shared_utils_lib"}The referenced project can use either a legacy .prj definition or a matlab.toml
definition. The key is a display label chosen by the user and is unrelated to the folder
on disk. Confirm path by listing the candidate parent folder — never derive it from the
dependency name or from the other project's name.
Examples
Minimal
name = "My Project"Typical
name = "Signal Analyzer"
[folders]
path = [
"src",
"utilities",
]
test = [
"tests",
]
[dependencies]
signal-processing = "2.*"
[project]
startup-files = [
"setup/initialize.m",
]
[project.shortcuts]
"Run Analysis" = {path = "scripts/analyze.m"}Copyright 2026 The MathWorks, Inc.
Files
- ATTRIBUTION.mdAdded by AutoGineer1.1 KiB
- LICENSELicence file added by AutoGineer1.4 KiB
- SKILL.md12.2 KiB
- manifest.yaml475 B
- references/deployment-reference.md13.9 KiB
- references/format-reference.md15.4 KiB
references/deployment-reference.md
matlab.toml Deployment Reference — [compiler]
The [compiler] table configures MATLAB Compiler and MATLAB Compiler SDK build targets. It
holds ten target types, each an array of tables, so a project can define several builds of
the same kind:
[[compiler.standalone]]
name = "analyzer"
[[compiler.standalone]]
name = "analyzerDebug"Every key in [compiler] is optional except name on [[compiler.standalone]] — the only
required key in the entire deployment schema.
Path values follow the same iri rules described in @format-reference.md: input files must
exist and sit inside the project root, output paths need not exist. Each key below is annotated
accordingly.
Shared Property Groups
Three groups of keys are shared across targets. Rather than repeat them ten times, they are defined once here and referenced per target as common, files, and installer.
common — build properties
Available on all ten targets.
[[compiler.standalone]]
name = "analyzer"
auto-detect-data-files = true
obfuscate-archive = false
secrets-manifest = "deploy/secrets.json"
support-packages = "autodetect"
verbose = true
[compiler.standalone.external-encryption-key]
key-file = "deploy/keys/build.key"
runtime-loader-file = "deploy/keys/loader.m"auto-detect-data-files(boolean) — include data files discovered by dependency analysisobfuscate-archive(boolean) — obfuscate the embedded archivesecrets-manifest(path, must exist, within root) — secrets manifest filesupport-packages(string or array of strings) — support packages to include. Single-string values:"autodetect","none". An array names specific support packages. (Not validated in R2026b.)verbose(boolean) — verbose build outputexternal-encryption-key(table) — external encryption key configuration:key-file(path, must exist, within root)runtime-loader-file(path, must exist, within root)
files — function and additional files
Available on every target except standalone and web-app, which declare their own
entry-point keys instead.
[[compiler.python-package]]
package-name = "myanalysis"
function-files = [
"src/analyze.m",
"src/report.m",
]
additional-files = [
"data/coefficients.mat",
]function-files(array of paths, must exist, within root) — exported entry-point functionsadditional-files(array of paths, must exist, within root) — extra files to include
installer — packaging properties
Available on standalone, excel-add-in, dot-net-assembly, c-shared-library,
cpp-shared-library, com-component, java-package, and python-package. Not available on
web-app or production-server-archive, which produce archives rather than installers.
[[compiler.standalone]]
name = "analyzer"
application-name = "Signal Analyzer"
summary = "Interactive signal analysis"
description = "Full-featured signal analysis application."
installation-notes = "Requires 2 GB of free disk space."
author-name = "Jane Doe"
author-email = "[email protected]"
author-company = "Acme Corp"
installer-name = "SignalAnalyzerSetup"
installer-version = "1.2.0"
installer-output-folder = "release/installer"
default-installation-folder = "/opt/SignalAnalyzer"
installer-icon-file = "resources/installer.png"
installer-logo-file = "resources/logo.png"
installer-splash-file = "resources/splash.png"
add-remove-programs-icon-file = "resources/arp.png"
installer-additional-files = [
"doc/README.txt",
]
package-type = "auto"
runtime-delivery = "web"
shortcut = "Signal Analyzer"application-name(string) — application name shown by the installersummary(string) — short summarydescription(string) — long descriptioninstallation-notes(string) — notes displayed during installationauthor-name,author-email,author-company(strings) — author details. Noteauthor-emailis a plain string here — unlike[[package]].provider.email, it carries noemailformat annotation.installer-name(string) — installer file nameinstaller-version(string, semver) — installer versioninstaller-output-folder(path, output — need not exist) — where the installer is writtendefault-installation-folder(path, output — need not exist) — default install locationinstaller-icon-file,installer-logo-file,installer-splash-file(paths, must exist, within root) — installer artworkadd-remove-programs-icon-file(path, must exist, within root) — Add/Remove Programs iconinstaller-additional-files(array of paths, must exist, within root) — files bundled with the installerpackage-type(string) —"auto"or"zip". (Not validated in R2026b.)runtime-delivery(string) — how MATLAB Runtime is delivered:"web","installer", or"none". (Not validated in R2026b.)shortcut(string) — shortcut name created by the installer
Target Summary
| Target | common | files | installer | Required |
|---|---|---|---|---|
[[compiler.standalone]] | ✅ | — | ✅ | name |
[[compiler.web-app]] | ✅ | — | — | — |
[[compiler.excel-add-in]] | ✅ | ✅ | ✅ | — |
[[compiler.dot-net-assembly]] | ✅ | ✅ | ✅ | — |
[[compiler.c-shared-library]] | ✅ | ✅ | ✅ | — |
[[compiler.cpp-shared-library]] | ✅ | ✅ | ✅ | — |
[[compiler.production-server-archive]] | ✅ | ✅ | — | — |
[[compiler.com-component]] | ✅ | ✅ | ✅ | — |
[[compiler.java-package]] | ✅ | ✅ | ✅ | — |
[[compiler.python-package]] | ✅ | ✅ | ✅ | — |
[[compiler.standalone]]
Standalone desktop application. Groups: common + installer. Uses app-file rather
than function-files.
[[compiler.standalone]]
name = "analyzer"
executable-name = "SignalAnalyzer"
app-file = "app/SignalAnalyzer.mlapp"
additional-files = [
"data/defaults.mat",
]
executable-version = "1.2.0"
executable-icon-file = "resources/app.png"
executable-splash-screen-file = "resources/splash.png"
custom-help-text-file = "doc/helpText.txt"
runtime-log-file = "derived/analyzer.log"
build-output-folder = "derived/standalone"
embed-archive = true
treat-inputs-as-numeric = false
suppress-windows-cmd-prompt = truename(string) — required; identifies this build configurationexecutable-name(string) — name of the generated executableapp-file(path, must exist, within root) — entry-point app or scriptadditional-files(array of paths, must exist, within root) — extra files to includeexecutable-version(string, semver) — executable versionexecutable-icon-file,executable-splash-screen-file(paths, must exist, within root) — executable artworkcustom-help-text-file(path, must exist, within root) — custom-helptextruntime-log-file(path, output — need not exist) — runtime log destinationbuild-output-folder(path, output — need not exist) — build output directoryembed-archive(boolean) — embed the archive in the executabletreat-inputs-as-numeric(boolean) — parse command-line inputs as numberssuppress-windows-cmd-prompt(boolean) — hide the Windows console window
[[compiler.web-app]]
MATLAB Web App Server archive. Groups: common only.
[[compiler.web-app]]
app-file = "app/Dashboard.mlapp"
additional-files = [
"data/lookup.mat",
]
archive-name = "Dashboard"
output-folder = "derived/webapps"app-file(string) — entry-point app. Note this is a plain string in the schema, not aniri— it is not existence-checked, unlikestandalone'sapp-file.additional-files(array of paths, must exist, within root)archive-name(string) — name of the generated.ctfarchiveoutput-folder(path, output — need not exist)
[[compiler.excel-add-in]]
Microsoft Excel add-in. Groups: common + files + installer.
[[compiler.excel-add-in]]
add-in-name = "SignalTools"
add-in-version = "1.0.0"
class-name = "SignalClass"
function-files = ["src/smooth.m"]
generate-visual-basic-file = true
embed-archive = true
debug-build = false
runtime-log-file = "derived/addin.log"
build-output-folder = "derived/excel"add-in-name(string) — add-in nameadd-in-version(string, semver) — add-in versionclass-name(string) — generated class namegenerate-visual-basic-file(boolean) — emit a.basVisual Basic fileembed-archive(boolean) — embed the archive in the add-indebug-build(boolean) — build with debug symbolsruntime-log-file(path, output — need not exist)build-output-folder(path, output — need not exist)
[[compiler.dot-net-assembly]]
.NET assembly. Groups: common + files + installer.
[[compiler.dot-net-assembly]]
assembly-name = "SignalTools"
assembly-version = "1.0.0"
class-name = "SignalClass"
function-files = ["src/smooth.m"]
framework-version = "4.8"
interface = "matlab-data"
enable-remoting = false
debug-build = false
embed-archive = true
sample-generation-files = ["samples/useSmooth.m"]
strong-name-key-file = "deploy/signing.snk"
build-output-folder = "derived/dotnet"assembly-name(string) — assembly nameassembly-version(string, semver) — assembly versionclass-name(string) — generated class nameframework-version(string) — target .NET framework versioninterface(string) — API style:"mwarray"or"matlab-data". (Not validated in R2026b.)enable-remoting(boolean) — enable .NET remotingdebug-build(boolean) — build with debug symbolsembed-archive(boolean) — embed the archive in the assemblysample-generation-files(array of paths, must exist, within root) — MATLAB files used to generate sample driver codestrong-name-key-file(path, within root — need not exist) — strong-name key filebuild-output-folder(path, output — need not exist)
[[compiler.c-shared-library]]
C shared library. Groups: common + files + installer.
[[compiler.c-shared-library]]
library-name = "libsignal"
function-files = ["src/smooth.m"]
debug-build = false
embed-archive = true
build-output-folder = "derived/clib"library-name(string) — library namedebug-build(boolean) — build with debug symbolsembed-archive(boolean) — embed the archive in the librarybuild-output-folder(path, output — need not exist)
[[compiler.cpp-shared-library]]
C++ shared library. Groups: common + files + installer.
[[compiler.cpp-shared-library]]
library-name = "libsignal"
library-version = "1.0.0"
function-files = ["src/smooth.m"]
interface = "matlab-data"
sample-generation-files = ["samples/useSmooth.m"]
debug-build = false
build-output-folder = "derived/cpplib"library-name(string) — library namelibrary-version(string, semver) — library versioninterface(string) — API style:"mwarray"or"matlab-data". (Not validated in R2026b.)sample-generation-files(array of paths, must exist, within root)debug-build(boolean) — build with debug symbolsbuild-output-folder(path, output — need not exist)
[[compiler.production-server-archive]]
MATLAB Production Server deployable archive. Groups: common + files. No installer
group — this target produces a .ctf archive.
[[compiler.production-server-archive]]
archive-name = "signalService"
function-files = ["src/smooth.m"]
function-signatures = "deploy/signatures.json"
routes-file = "deploy/routes.json"
output-folder = "derived/mps"archive-name(string) — archive namefunction-signatures(string) — function signatures file. A plain string in R2026b; later releases tighten this to a path that must exist inside the project root.routes-file(path, within root — need not exist) — HTTP routes fileoutput-folder(path, output — need not exist)
[[compiler.com-component]]
COM component. Groups: common + files + installer.
[[compiler.com-component]]
component-name = "SignalTools"
component-version = "1.0.0"
class-name = "SignalClass"
function-files = ["src/smooth.m"]
debug-build = false
embed-archive = true
build-output-folder = "derived/com"component-name(string) — component namecomponent-version(string, semver) — component versionclass-name(string) — generated class namedebug-build(boolean) — build with debug symbolsembed-archive(boolean) — embed the archive in the componentbuild-output-folder(path, output — need not exist)
[[compiler.java-package]]
Java package. Groups: common + files + installer.
[[compiler.java-package]]
package-name = "com.acme.signal"
class-name = "SignalClass"
function-files = ["src/smooth.m"]
interface = "matlab-data"
sample-generation-files = ["samples/UseSmooth.java"]
debug-build = false
build-output-folder = "derived/java"package-name(string) — Java package nameclass-name(string) — generated class nameinterface(string) — API style:"mwarray"or"matlab-data". (Not validated in R2026b.)sample-generation-files(array of paths, must exist, within root)debug-build(boolean) — build with debug symbolsbuild-output-folder(path, output — need not exist)
[[compiler.python-package]]
Python package. Groups: common + files + installer.
[[compiler.python-package]]
package-name = "myanalysis"
function-files = [
"src/analyze.m",
"src/report.m",
]
additional-files = [
"data/coefficients.mat",
]
sample-generation-files = [
"samples/use_analyze.py",
]
build-output-folder = "derived/python"
application-name = "My Analysis"
author-name = "Jane Doe"
installer-version = "1.0.0"
runtime-delivery = "installer"
verbose = truepackage-name(string) — Python package namesample-generation-files(array of paths, must exist, within root)build-output-folder(path, output — need not exist)
Copyright 2026 The MathWorks, Inc.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Python
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- MathWorks
- Publisher
- MathWorks (Official)
- Source
- matlab/matlab-agentic-toolkit · skills-catalog/matlab-software-development/matlab-configure-toml-project · commit 2a7f215
- Licence
- BSD 2-Clause License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE.md)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by MathWorks.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download matlab-configure-toml-project.zip