Skip to content

matlab/agent-skills-playground / demos/mbse-with-agentic-ai/skills/matlab-project

matlab-project

Verified

Use this skill for any work involving a MATLAB Project (.prj file) — creating a new project, tracking files, managing the project path, configuring Simulink cache and code-generation folders, running project health checks, or writing build scripts that keep the project in sync with the file system. Trigger phrases include "set up a MATLAB project", "create a .prj", "track this file in the project", "project health check", "build script conventions". This skill is the generic foundation; domain-specific skills (e.g. `mbse-workflow`) build on it.

FileKindSize
SKILL.mdskill md9.3 KB
code/registerWithProject.mother1.0 KB
code/setupProject.mother2.7 KB
templates/decisions.mdmarkdown1.3 KB
templates/plan.mdmarkdown1.3 KB

code/setupProject.m

View on GitHub
function setupProject(projectName, projectFolder, subfolders, derivedSubfolders)
% SETUPPROJECT Create a new MATLAB Project with standard folder structure.
%   Creates the project, tracked subfolders (also added to the MATLAB path),
%   and derived subfolders for build outputs (untracked). Closes the project
%   at the end so the caller can re-open it at the right time.
%
%   Inputs:
%     projectName       - Name for the MATLAB project (string or char)
%     projectFolder     - Full path to the folder where the project will be
%                         created (string or char)
%     subfolders        - Cell array of folder names to create, track, and
%                         add to the project path. E.g. {'src','tests'}
%     derivedSubfolders - Cell array of folder names for build outputs.
%                         Created but NOT tracked. The first entry is used
%                         as the Simulink cache folder and the second as
%                         the code generation folder, if present.
%                         E.g. {fullfile('derived','cache'), fullfile('derived','codegen')}
%
%   Example:
%     setupProject("MySystem", "C:\work\MySystem", ...
%         {'requirements','architecture','scripts'}, ...
%         {fullfile('derived','cache'), fullfile('derived','codegen')});

    if nargin < 3 || isempty(subfolders),        subfolders = {}; end
    if nargin < 4 || isempty(derivedSubfolders), derivedSubfolders = {}; end

    proj    = matlab.project.createProject(Name=projectName, Folder=projectFolder);
    rootDir = proj.RootFolder;

    % Tracked folders: created, added as project files, and on the project path.
    % IMPORTANT: tracked folders that are on the MATLAB path must also be
    % registered via addPath, or runChecks fails with Project:Checks:ProjectPath.
    for i = 1:numel(subfolders)
        folderPath = fullfile(rootDir, subfolders{i});
        mkdir(folderPath);
        addFolderIncludingChildFiles(proj, folderPath);
        addPath(proj, folderPath);
    end

    % Derived folders: created but NOT tracked (build outputs).
    for i = 1:numel(derivedSubfolders)
        mkdir(fullfile(rootDir, derivedSubfolders{i}));
    end

    % Point Simulink cache/codegen at the first two derived folders if supplied.
    % CRITICAL: use absolute paths — these properties resolve relative to the
    % current working directory, not the project root.
    if numel(derivedSubfolders) >= 1
        proj.SimulinkCacheFolder = fullfile(rootDir, derivedSubfolders{1});
    end
    if numel(derivedSubfolders) >= 2
        proj.SimulinkCodeGenFolder = fullfile(rootDir, derivedSubfolders{2});
    end

    close(proj);
    fprintf("Project created: %s\n", rootDir);
    fprintf("Open with: openProject('%s')\n", rootDir);
end
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall