본문으로 건너뛰기
cccskills
무료GitHub에 공개

simulink-curating-library-kg

Use this skill when the user wants to curate the SATK library knowledge index for a Simulink project — mark commonly used blocks, correct auto-assigned block categories, or improve block descriptions so the model-building agent picks better blocks from custom libraries. Triggered by phrases like "mark blocks common", "improve block descriptions", "correct block category", "make the agent prefer certain blocks", and from Gate 3 of building-simulink-models.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md8.1 KB
  • manifest.yaml550 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Curating the Library Knowledge Index

Curate .satk/library-kg/ for better agent block selection. Infer categories and descriptions from block metadata in .satk/library-cache/*.json, save curation to .satk/library-curation.json, then regenerate the KG.

When to Use

  • User wants to mark blocks as commonly used or important
  • User wants to correct auto-assigned categories
  • User wants to improve block descriptions for better selection
  • User asks "how do I make the agent prefer certain blocks?"
  • Called from building-simulink-models Gate 3.

When NOT to Use

  • Blocking, deprecating, or protecting blocks → configuring-block-policy
  • Actively building a model → building-simulink-models
  • Declaring which libraries exist → Library Setup gate in building-simulink-models

Prerequisites

  • satk-libraries.json or .satk/reuse-libraries.json must exist with libraries declared

Curation Rules

  1. Custom descriptions are mandatory for ALL metadataQuality: "low" and "medium" blocks across ALL declared libraries. These blocks have no useful information. Write a short intent-focused description for every such block to help with agent block selection. Do not skip blocks because a file is large or because they seem unrelated to the current task.
  2. Custom descriptions for "high" quality blocks are encouraged but optional.
  3. Write custom descriptions for as many blocks as possible. After covering low/medium, covering high blocks too improves the KG.
  4. Process in batches by category. Group blocks, infer descriptions together, present to user in digestible chunks.
  5. Never write template or mechanical descriptions. Descriptions like "Mathematical operation: gain" or "Signal routing utility: mux" are useless — they just restate the category and name. Every description MUST be thoughtful, intent-focused description explaining when to use the block and what modeling problem it solves (e.g., "Scale a signal by a constant factor — use for unit conversion, controller gains, or applying physical constants" instead of "Mathematical operation: gain").

Modes

  • Automatic (from Gate 3 "Automatic" option) — infer everything, commit without pausing per step, present final result for review.
  • Guided (from Gate 3 "Guided setup" or direct user invocation) — propose at each step, wait for user confirmation before proceeding.

Determine mode before starting. Do not proceed without mode selection.

Workflow

If .satk/library-kg/index.md already exists, start at step 1 (review existing state). If not, start at step 2.

  1. Review (only if KG exists) — Read index.md and common.md, summarize current state to user (libraries, block count, categories, common blocks).
  2. Mode selection — Determine Automatic or Guided. Do not proceed without completing this step.
  3. Descriptions — Ensure cache exists (see API), then read ALL .satk/library-cache/*.json files in full. If a file exceeds read limits, read it in chunks until every block has been processed. Apply Curation Rules above — write custom descriptions for blocks, prioritizing low/medium quality. Do NOT proceed to Step 4 until descriptions exist for every low/medium quality block across ALL cache files. Save to customDescriptions.
  4. Common blocks — Propose which blocks should be marked as commonly used. Consider blocks covering diverse categories and frequent modeling workflows. Save to commonBlocks.
  5. Categories — Finalize category definitions (names, descriptions, 3-5 keywords each). Allow user to correct individual block assignments via categoryAssignments.
  6. Completeness check — Before saving, count total low/medium quality blocks across ALL cache files and count how many have custom descriptions. Report coverage to the user (e.g., "275/275 low/medium blocks described, 120/285 high blocks described"). Do NOT proceed if coverage of low/medium blocks is below 100%.
  7. Save and generate — Save all curation data via library.LibraryCuration.save(projectRoot, curation), then run library.kg.Populate.run(projectRoot). Present the output summary to the user.

API

Ensuring cache exists

libConfig = library.LibraryConfig.load(projectRoot);
library.LibraryCatalog.getOrCreate(libConfig, projectRoot);

Reading block metadata

Read .satk/library-cache/*.json directly. Each file:

{
  "libraryName": "MotorLib",
  "description": "Motor control library",
  "blocks": [
    {
      "name": "SpeedController",
      "maskType": "SpeedCtrl",
      "blockType": "SubSystem",
      "maskDescription": "Closed-loop speed regulation with anti-windup",
      "description": "",
      "pathCategory": "Controllers",
      "metadataQuality": "high",
      "referenceBlock": "MotorLib/Controllers/SpeedController"
    }
  ]
}

Saving curation data

projectRoot = prefdir();
curation = library.LibraryCuration.load(projectRoot);
curation.commonBlocks = {'Speed Controller', 'Torque Estimator'};
curation.categories = struct('name', 'motors', 'description', 'Electric motors', 'keywords', {{'motor', 'drive'}});

% Use containers.Map — supports any block name as key
curation.customDescriptions = containers.Map('KeyType', 'char', 'ValueType', 'char');
curation.customDescriptions('Unit Delay') = 'Delay signal by one sample period';
curation.customDescriptions('1-D Lookup Table') = 'Interpolate output from breakpoint-value pairs';

curation.categoryAssignments = containers.Map('KeyType', 'char', 'ValueType', 'char');
curation.categoryAssignments('DC Current Controller') = 'motor-control';

library.LibraryCuration.save(projectRoot, curation);
library.kg.Populate.run(projectRoot);

Important: Use containers.Map (not struct) for customDescriptions and categoryAssignments. Struct field names cannot contain spaces or hyphens, which most Simulink block names have.

JSON format on disk

{
  "customDescriptions": [
    {"block": "Unit Delay", "value": "Delay signal by one sample period"},
    {"block": "1-D Lookup Table", "value": "Interpolate output from breakpoint-value pairs"}
  ],
  "categoryAssignments": [
    {"block": "DC Current Controller", "value": "motor-control"}
  ]
}

Curation Fields

FieldTypeEffect
commonBlockscell array of stringsAlways shown in common.md regardless of quality score
categoriesstruct array with .name, .description, .keywordsDefines categories with keyword matching for assignment
categoryAssignmentscontainers.Map (blockName → categoryName)Per-block category assignment
customDescriptionscontainers.Map (blockName → description)Per-block custom description (intent)

Guardrails

Always:

  • Read block metadata only from .satk/library-cache/*.json.
  • Persist curation via library.LibraryCuration.save() and regenerate the KG via library.kg.Populate.run().
  • Use library.kg.Query.search() for KG lookups.
  • In user-facing output, use "custom description" or "category assignment" — never the term "override".

Ask first:

  • Confirm the proposed curation with the user before calling library.LibraryCuration.save().

Never:

  • Never call find_system or get_param on library .slx files.
  • Never modify .satk/library-cache/*.json or .satk/library-kg/*.md directly — they are auto-generated.
  • Never persist curation through any path other than library.LibraryCuration.save().

Copyright 2026 The MathWorks, Inc.


리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 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-toolkit1.2천2026년 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-toolkit1.2천2026년 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-toolkit1.2천2026년 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-toolkit1.2천2026년 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-toolkit1.2천2026년 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-toolkit1.2천2026년 10월 15일 업데이트

matlab의 스킬 모두 보기

이 스킬의 문제 신고