跳到正文
cccskills
免费在 GitHub 公开

managing-simulink-projects

Manages MATLAB projects for Simulink workflows: path management, file registration, labels, source control configuration, and project lifecycle. Use when creating projects, adding models/dictionaries/requirements to projects, configuring labels for automation, fixing broken model references, or setting up source control for Simulink artifacts.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(7)

  • SKILL.md5.2 KB
  • manifest.yaml798 B
  • references/data-dictionaries.md1.3 KB
  • references/labels-and-automation.md2.1 KB
  • references/model-references.md1.5 KB
  • references/path-and-file-management.md3.2 KB
  • references/source-control-and-caching.md1.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Managing Simulink Projects

MATLAB projects coordinate Simulink workflows — they manage the MATLAB path (which Simulink uses to resolve model references, data dictionaries, and requirements), track file membership for source control, and provide label-based automation for selecting targets in CI/CD pipelines.

When to Use

  • Creating a new MATLAB project for Simulink models
  • Adding models, data dictionaries, or requirements to an existing project
  • Configuring project paths so Simulink can resolve references
  • Setting up labels for automation (test selection, code generation targets)
  • Configuring source control and cache folders
  • Diagnosing broken model references, missing dictionaries, or failing project health checks

When NOT to Use

  • Building or editing model structure (blocks, connections) → use building-simulink-models
  • Writing or running tests → use testing-simulink-models
  • Drafting requirements content → use generate-requirement-drafts
  • Running simulations for analysis → use simulating-simulink-models

Mental Model

Four principles that prevent the most common failures:

  1. Registration ≠ path. addFile registers a file with the project for source control tracking. addPath puts a folder on the MATLAB path so Simulink can resolve artifacts by filename. These are independent operations — you almost always need both.

  2. Filename-only resolution. Data dictionaries (set_param(...,'DataDictionary',...), addDataSource), model references, and requirements all resolve via MATLAB path using filename only — never full paths. The containing folder must be on the project path.

  3. addPath is not recursive. Each subfolder containing resolvable artifacts needs its own addPath call.

  4. Single-project constraint. Only one project can be open at a time. Creating or opening a new project silently closes the current one (running its shutdown scripts). currentProject throws an error when no project is open — it does not return empty.

Guardrails

Always:

  • Use addPath(proj, folder) for every folder containing dictionaries, referenced models, requirements, or profiles
  • Pass filename only (not full paths) to addDataSource, set_param(...,'DataDictionary',...), and slreq.createLink
  • Use absolute paths for SimulinkCacheFolder and SimulinkCodeGenFolder: proj.SimulinkCacheFolder = fullfile(proj.RootFolder, 'work')
  • Call updateDependencies(proj) before querying proj.Dependencies
  • Close the current project before creating or opening another
  • Use .graphml extension for DependencyCacheFile
  • Use .gitignore for excluding derived files from source control
  • Add requirements folder to project path when linking requirements to models
  • Register .slmx link-store files with the project (guarded by isfile check)

Ask First:

  • Deleting files from a project (removeFile then disk delete)
  • Modifying startup/shutdown scripts (affects all users who open the project)
  • Changing project references (affects dependent projects)

Never:

  • Use proj.IgnoredFilePatterns — throws "Feature not supported" for all project types from createProject
  • Use cat.Labels — the correct property is cat.LabelDefinitions
  • Use 'string' as a label DataType — valid types are 'none', 'char', 'double', 'integer', 'logical'
  • Use findFile (singular) for label queries in R2024a+ — use findFiles (plural). ONLY use findFile with R2023a/b
  • Pass full file paths to filename-only APIs
  • Attempt to open two projects simultaneously
  • Use clear all in startup scripts — it wipes the proj variable

Task Routing

IntentReference
Add files/folders to project, manage project pathreferences/path-and-file-management.md
Set up labels for automation pipelinesreferences/labels-and-automation.md
Link data dictionaries to modelsreferences/data-dictionaries.md
Configure model references across foldersreferences/model-references.md
Configure source control, cache folders, .gitignorereferences/source-control-and-caching.md
Configure startup/shutdown scriptsreferences/path-and-file-management.md (Startup and Shutdown Scripts section)
Diagnose broken references or health check failuresStart with Verification below, then route to the relevant reference

Verification

Run after every project modification:

results = runChecks(proj);
updateDependencies(proj);
deps = proj.Dependencies;  % digraph

If runChecks reports issues, inspect which folders are missing from the project path — this is the root cause of most failures.


Copyright 2026 The MathWorks, Inc.


评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Author or upgrade Model Advisor checks for Simulink and System Composer models. Covers the full lifecycle: guideline authoring, check specification, Model Advisor check implementation, and qualification testing. Use when creating new checks (edit-time, standard batch, config-parameter, auto-fix), converting legacy StyleOne/StyleTwo/StyleThree checks to modern DetailStyle, creating a guideline for modeling, enforcing a modeling rule, or testing/qualifying a check. Triggers on any modeling constraint (e.g., "blocks shall...", "signals must match...", "parameters shall be set to...").

中文简介正在准备中。当前显示原文说明。

matlab/simulink-agentic-toolkit12382026年10月15日 更新

Synthesize new waveforms from scratch for Simulink inports using createInputDataset. Use ONLY when the user asks to generate, create, or synthesize signals (step, ramp, sine, chirp, pulse, noise) to populate a Dataset for External Inputs or Signal Editor. Covers timeseries and timetable formats with correct data type, interpolation, units, and dimensions. Also covers function-call and trigger inport timing setup. Do NOT use when the user wants to load, import, or read existing data from files (MAT, CSV, spreadsheet) — even if that data will be used as model input. Do NOT use for running simulations or plotting outputs.

中文简介正在准备中。当前显示原文说明。

matlab/simulink-agentic-toolkit12382026年10月15日 更新

Common steps for building multi-layer system architecture models using System Composer. Use when implementing architecture models or when interacting with interface dictionaries, allocation sets, stereotypes, and requirements for architecture components.

中文简介正在准备中。当前显示原文说明。

matlab/simulink-agentic-toolkit12382026年10月15日 更新

Builds and edits Simulink, System Composer, Stateflow, and Simscape models. Use when modifying model structure, parameters, ports, connections, or Stateflow chart internals.

中文简介正在准备中。当前显示原文说明。

matlab/simulink-agentic-toolkit12382026年10月15日 更新

Use this skill when the user asks to check Simulink model compliance against a standard (MISRA, MAB, JMAAB, ISO, DO, IEC, EN, CERT C/CWE, AUTOSAR, Simulink Code Inspector (SLCI)), wants to run Model Advisor checks, or needs a compliance report with fix suggestions. For JMAAB/MAB, supplement deterministic checks with agentic review of uncheckable guidelines.

中文简介正在准备中。当前显示原文说明。

matlab/simulink-agentic-toolkit12382026年10月15日 更新

Guide users through creating and managing .satk/block-policy.json for controlling which blocks the agent can use, which are excluded, and which block parameters the agent should not modify. Use when setting up block usage policy for a project.

中文简介正在准备中。当前显示原文说明。

matlab/simulink-agentic-toolkit12382026年10月15日 更新

查看 matlab 的全部技能

报告此技能的问题