Logo van Matlab Project

Matlab Project

Organisatie
matlab
matlab-project

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.

Overzicht

Uitgevermatlab
Repositoryagent-skills-playground
Skillnaammatlab-project
Sterren
179
Forks
32
Meegeleverde bestanden
4
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 4

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door matlab op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Matlab Project in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/matlab/agent-skills-playground/tree/main/demos/mbse-with-agentic-ai/skills/matlab-project
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/matlab/agent-skills-playground.git /tmp/agent-skills-playground
mkdir -p .claude/skills
cp -r /tmp/agent-skills-playground/demos/mbse-with-agentic-ai/skills/matlab-project .claude/skills/matlab-project
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Matlab Project in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Matlab Project automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Matlab Project niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

MATLAB Project — Setup, Conventions, and Build-Script Patterns

A MATLAB Project (.prj) is a single file that manages path, tracked artifacts, shortcuts, derived-output locations, and health checks. This skill covers the mechanics so every downstream workflow (requirements, architecture, analysis, anything else) can rely on a predictable project shape.

Domain skills reuse this skill's helpers (setupProject, registerWithProject) and conventions (idempotent build scripts, removeFile before delete, runChecks at the end of buildAll). They may override the living-doc templates with domain-specific versions.


Creating a project

Use code/setupProject.m to create the project inline (not as a saved script — the scripts/ folder doesn't exist yet):

matlab
setupProject(projectName, projectFolder, subfolders, derivedSubfolders)
  • subfolders — cell array of folders that are created, added as tracked project files, and placed on the MATLAB path. Callers choose the layout.
  • derivedSubfolders — cell array of folders for build outputs. Created but not tracked. The first two entries are wired to SimulinkCacheFolder and SimulinkCodeGenFolder if supplied, so Simulink cache / codegen stays out of source control.

Example (MBSE shape):

matlab
setupProject("MySystem", "C:\work\MySystem", ...
    {'requirements','architecture','analysis','verification','scripts'}, ...
    {fullfile('derived','cache'), fullfile('derived','codegen')});

Path management rule

Every tracked folder that is supposed to be on the path must be registered with both addFolderIncludingChildFiles and addPath. If you only do the first, runChecks later fails with Project:Checks:ProjectPath ("a folder is on the MATLAB path but not registered as a project path folder"). setupProject handles this for the initial folder set; any folder added later must follow the same pattern.

Why no startup.m

A startup.m is unnecessary when build scripts are idempotent and self-cleaning (each script clears its own state at the top — see below). Adding one introduces hidden state that survives between runs and tends to mask bugs. Leave it out.


File lifecycle — tracking, shortcuts, removal

Tracking files as they're created

Use the code/registerWithProject.m helper from every build script. It is idempotent and a no-op if no project is open:

matlab
registerWithProject({fileA, fileB, ...}, {folderA, ...})

Each build script should call this at the end, passing the files it created. buildAll.m additionally registers all script files. This keeps the project in sync with the file system without any manual addFile bookkeeping.

Shortcuts

addShortcut(proj, filePath) (no label argument) adds a file to the project's Shortcuts panel. Add shortcuts progressively as key files are created — typical targets: the top-level build script, the main model, the primary data file.

Removing tracked files

Always call removeFile before delete when getting rid of a tracked file. A bare delete() removes the file from disk but leaves a broken reference in the project, causing runChecks failures:

matlab
proj = currentProject();
removeFile(proj, fullfile(archDir, 'OldArtifact.sldd'));  % untrack first
delete(fullfile(archDir, 'OldArtifact.sldd'));             % then remove from disk

This matters whenever a build script replaces an artifact with a new name — the old tracked entry must be removed explicitly.


Build-script idempotency conventions

Any build script that writes tracked artifacts should follow these rules so buildAll.m can run any phase in any order without accumulating stale state:

  1. Clear state at the top. For MATLAB it is often enough to clear nothing and rely on the delete-and-recreate step. For toolboxes with in-memory state (e.g. slreq.clear(), Profile.closeAll()), call their reset APIs as the first action.
  2. Delete the target artifacts before recreating them. Guard every file op with isfile / isfolder so the first run (when files don't exist) and later runs (when they do) take the same path.
  3. Recreate artifacts from scratch. Never mutate an existing file in place.
  4. Call registerWithProject at the end, passing every artifact the script produced. The helper is a no-op if a file doesn't exist, so conditional artifacts (link-store files that only appear when links are created) are safe to pass unconditionally.

This pattern is what lets users rebuild everything cleanly by calling buildAll() — there is no state to undo, just regenerate.


buildAll.m shape

The top-level orchestrator script calls each phase / build script in order, then registers the script files themselves, then runs project health checks:

matlab
%% Register all scripts with the project
scriptsDir = fileparts(mfilename('fullpath'));
scriptFiles = { ...
    fullfile(scriptsDir, 'buildAll.m'), ...
    % ... every other script the project uses ...
    fullfile(scriptsDir, 'registerWithProject.m'), ...
};
registerWithProject(scriptFiles);

%% Project health check
proj = matlab.project.currentProject();
if ~isempty(proj.Name)
    results = runChecks(proj);
    nFail = 0;
    fprintf('\nProject checks:\n');
    for i = 1:numel(results)
        if results(i).Passed
            fprintf('  [PASS] %s\n', results(i).Description);
        else
            fprintf('  [FAIL] %s\n', results(i).Description);
            for j = 1:numel(results(i).ProblemFiles)
                fprintf('           %s\n', results(i).ProblemFiles(j));
            end
            nFail = nFail + 1;
        end
    end
    if nFail == 0
        fprintf('All checks passed.\n');
    else
        fprintf('%d check(s) failed — review output above.\n', nFail);
    end
end

runChecks runs 8 built-in project checks including file existence, path consistency (Project:Checks:ProjectPath), unsaved files, and SLPRJ folder placement. The most common failure is Project:Checks:ProjectPath — fix with addPath(proj, folderPath) on the offending folder.


Living documentation: plan.md and decisions.md

Projects built with this skill carry two hand-curated markdown files at the project root. They are not build outputs — they preserve context a future reader otherwise couldn't recover from the code alone.

FilePurposeUpdate cadence
plan.mdCanonical overview: scope, source artifacts, milestone status, open questions, known risks.At each milestone and whenever scope or constraints change.
decisions.mdAppend-only log of non-obvious decisions — each with context, options, rationale, revisit trigger.Append at any checkpoint where the chosen approach wasn't forced by the inputs, and at every rollback.

Templates live at templates/plan.md and templates/decisions.md. Copy both into the project root during setup, fill placeholders, and register them with the project so they ship with the repo:

matlab
proj = currentProject();
addFile(proj, fullfile(proj.RootFolder, 'plan.md'));
addFile(proj, fullfile(proj.RootFolder, 'decisions.md'));

Override for domain skills. Any domain skill (e.g. mbse-workflow) may ship its own plan.md / decisions.md templates under its own templates/ folder and use those instead of the generic ones here. Overrides should keep the core section order (Overview → Source artifacts → Status → Open questions → Known risks) so readers moving between projects find familiar anchors. Add domain-specific sections below the core set.

When to append a decisions entry: only when a judgment call was made. Mechanical steps and input-forced decisions don't belong. Good examples: "shortened artifact prefix from full system name to make filenames manageable"; "split module X into four sub-modules per user preference"; "added property Y mid-project after initial scope excluded it". Bad examples: "created the .prj file"; "imported 27 rows from xlsx".

When to skip an entry: bug fixes, API iteration, rerunning a script after an error, or anything that reflects tooling friction rather than design judgment.


Quick reference

TaskCall
Create projectsetupProject(name, folder, subfolders, derivedSubfolders)
Track files/folders after creationregisterWithProject(files, folders)
Add a shortcutaddShortcut(proj, filePath)
Remove a tracked fileremoveFile(proj, path) then delete(path)
Ensure folder is on pathaddPath(proj, folderPath)
Health checkrunChecks(proj) (see buildAll.m shape above)

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Matlab Project?

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.

Waarom Matlab Project gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Matlab Project bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Matlab Project in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/matlab/agent-skills-playground/tree/main/demos/mbse-with-agentic-ai/skills/matlab-project. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Matlab Project gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Matlab Project gebruiken?

Zoveel als je wilt. Je kunt Matlab Project gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Matlab Project gratis?

Deze skill is door matlab op GitHub gepubliceerd. Bekijk de repository voor de licentievoorwaarden. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇