跳到正文
cccskills
免费在 GitHub 公开

setup-custom-libraries

Register, add, or update existing custom Simulink block libraries and configure block policy and knowledge index. Use when a user wants to register, set up, configure, or add existing .slx library files for agent-assisted model building. Do NOT use when the user wants to create or author a new library from scratch — that requires building-simulink-models.

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

查看安装方法

包含的文件(3)

  • SKILL.md5.9 KB
  • manifest.yaml848 B
  • references/library-setup.md6.1 KB

SKILL.md(原文)

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

Setup Custom Libraries

Register or update custom Simulink block libraries so the agent prefers them over built-in blocks during model building.

When to Use

  • User asks to set up, register, add, or configure custom libraries
  • User wants to add new .slx files to an existing library configuration
  • User says "setup custom libraries", "add my library", "configure libraries", "add a new library file"
  • building-simulink-models routes here via the policy gate (gatePass: false)
  • Never invoke when found: false — that means no custom libraries are configured and the user hasn't asked for them

When NOT to Use

  • User wants to create a custom library from scratch (author new blocks, build a new .slx library file) → use building-simulink-models skill with model_edit directly. This skill only registers existing libraries; it cannot create library content.
  • Only configuring block exclusions or parameter protection (libraries already declared) → configuring-block-policy
  • Only curating block descriptions/categories (libraries already declared) → simulink-curating-library-kg

Workflow

Do this FIRST and ALONE — no other tool calls in the same message.

Call library.settingsLookup() — returns a struct with resolved absolute paths:

  • found — whether a libraries file was located (satk-libraries.json or legacy reuse-libraries.json)
  • enabled — whether custom libraries are configured
  • gatePass — whether the gate is satisfied
  • dataRoot — absolute path to the directory containing .satk/
  • kgIndexPath, librariesPath, policyPath — absolute paths to data files

Interpret the result:

  • found: false → no custom libraries configured. Do NOT proceed with setup unless the user explicitly asked. Return control to the calling skill.
  • gatePass: true, found: true → all data files present and KB populated. Offer management menu (below).
  • gatePass: false, found: true → libraries declared but KB needs population. Skip Gate 1 (libraries already exist). Start from Gate 2 below using dataRoot as the target.

Follow references/library-setup.md for all gate API details — it is the single source of truth for API calls, examples, and options at each gate.

Gate 1 — Library declaration: Only when the user explicitly asked to set up custom libraries and no libraries file exists yet. STOP and ask the user about reusable libraries. Present two options: Yes (declare libraries) or None (no libraries right now). Do not read reference files, open models, or plan blocks until they respond.

  • If user provides libraries (Yes) → save to prefdir via library.LibraryConfig.save(prefdir(), libraries).
  • If user says "none" → do not create any files. The gate remains open (no config = use standard blocks).

Gate 2 — Block policy: If .satk/block-policy.json is missing, STOP and ask the user about policy setup by following references/library-setup.md. Do not proceed until policy is resolved.

Gate 3 — Library blocks knowledge index: If the KB is empty (index.md contains populated: false) or missing, STOP and ask the user whether to index their library blocks so the agent knows which blocks are available during model building. Offer two options: Automatic (agent infers categories/descriptions autonomously) or Guided setup (interactive curation). Both invoke the simulink-curating-library-kg skill. Follow references/library-setup.md for details. Do not proceed until KG generation completes.

Management menu (config already complete)

Retrieve and display the user's current configuration status using the APIs in references/library-setup.md § "Status Display (Management Menu)". Show library names/paths, policy mode with fallback, and KG block/category counts. Then offer:

  • (a) Add or remove libraries — load existing config via library.LibraryConfig.load(dataRoot), append/remove entries, save via library.LibraryConfig.save(dataRoot, allLibs), then invoke simulink-curating-library-kg skill (automatic mode) to regenerate KG.
  • (b) Update block policy — load configuring-block-policy skill.
  • (c) Promote config to prefdir — only show if tier is project or legacy. Copy .satk/ folder to prefdir/.satk/ (expand relative paths to absolute). See references/library-setup.md § "Gate 1" for the promote API.
  • (d) Regenerate knowledge index — load simulink-curating-library-kg skill.

Adding files to existing config

When satk-libraries.json already exists with declared libraries: read the existing config, append the new library entries, save via library.LibraryConfig.save(), then invoke the simulink-curating-library-kg skill (automatic mode) to infer categories/descriptions for the new blocks and regenerate the knowledge index.

Guardrails

  • Never write config files or .satk/ JSON manually. Always follow the instructions and APIs in references/library-setup.md for each case.
  • Do not use find_system, load_system to discover, validate, or enumerate library contents. All library operations must go through the specified APIs in references/library-setup.md.
  • Each gate requires explicit user input before proceeding. Do not assume anything, wait for the response before moving to the next gate.
  • Paths at prefdir must be absolute. (Project-level paths can be relative to project root.)

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 的全部技能

报告此技能的问题