Logo Checking Model Compliance

Checking Model Compliance

Tổ chứcPhổ biến
matlab
checking-model-compliance

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.

Add to TypingMind

Tổng quan

Nhà phát hànhmatlab
Kho mãsimulink-agentic-toolkit
Tên kỹ năngchecking-model-compliance
Sao
1.2K
Bản fork
112
Tệp đi kèm
8
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 8 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được matlab công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Checking Model Compliance trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/verification-validation-and-test/checking-model-compliance
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/matlab/simulink-agentic-toolkit.git /tmp/simulink-agentic-toolkit
mkdir -p .claude/skills
cp -r /tmp/simulink-agentic-toolkit/skills-catalog/verification-validation-and-test/checking-model-compliance .claude/skills/checking-model-compliance
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Checking Model Compliance trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Checking Model Compliance ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Checking Model Compliance với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Checking Model Compliance

Runs Model Advisor checks for a named standard (or default configuration) and delivers a prioritized summary with fix suggestions.

When to Use

  • Checking whether a Simulink model complies with a standard (MISRA, MAB, JMAAB, ISO 26262, DO-178C, etc.)
  • Running Model Advisor checks against a named compliance standard
  • Generating a compliance report with prioritized findings and fix suggestions
  • Running a custom Model Advisor configuration file against a model
  • Justifying or waiving specific compliance violations

When NOT to Use

  • Building or editing model structure → building-simulink-models
  • Writing behavioral tests → testing-simulink-models
  • Structural validation only (unconnected ports) → model_check tool directly
  • General model quality questions without a named standard (e.g., "is my model well decomposed?") — this requires a different workflow

Supported Standards

StandardAccepted Inputs
MISRA C:2023MISRA_C, MISRA C, MISRA
MISRA Simulink/StateflowMISRA_SLSF, MISRA Simulink
MABMAB, MAAB
JMAAB v5.1JMAAB
JMAAB v6JMAAB_V6, JMAAB06
ISO 26262ISO_26262, ISO 26262
ISO 25119ISO_25119, ISO 25119
DO-178C/DO-331DO_178C, DO-178C, DO-178B, DO-331
DO-254DO_254, DO-254
IEC 61508IEC_61508, IEC 61508
IEC 62304IEC_62304, IEC 62304
EN 50128/EN 50657EN_50128, EN 50128, EN_50657
Secure Coding (CERT C, CWE)SECURITY, CERT_C, CWE, secure coding
AUTOSARAUTOSAR
Simulink Code Inspector (SLCI)SLCI, Simulink Code Inspector

Equivalent check sets (run once, report for both):

  • ISO 26262, IEC 61508, IEC 62304, EN 50128/EN 50657, ISO 25119
  • DO-178B, DO-178C, DO-331

Custom Checks and Configurations

Users may have custom Model Advisor checks or custom configuration files (.json exported from Model Advisor Configuration Editor). These are not standards — they are handled via:

  • Custom configuration file: User provides a path → use model_advisor_run with 'configuration' parameter directly (Path B)
  • Custom check IDs: User provides specific check IDs → use model_advisor_run with 'checks' parameter directly (skip resolution)

Prerequisites

All script functions are in the skill's scripts/ directory. Use evaluate_matlab_code with project_path set to the skill's scripts/ folder so MATLAB can find them. Never use addpath.

Tools provided (always use these — never improvise with raw Model Advisor API):

FunctionInputsOutputExample
model_advisor_resolve_checks'standard', '<NAME>'struct with checks, checks_count, statusmodel_advisor_resolve_checks('standard', 'JMAAB')
model_advisor_runsystem, 'checks', {ids} or system, 'configuration', pathYAML with findings, status, check_summarymodel_advisor_run('MyModel', 'checks', checkIds, 'token_budget', 8000)
model_advisor_justifymodel, checkId, blockPath, textstruct with statusmodel_advisor_justify('MyModel', 'mathworks.jmaab.db_0032', 'MyModel/Sub', 'Waived per review')
detect_default_configmodelNamestruct with config_path or emptydetect_default_config('MyModel')

Workflow

1. Identify Standard, Model, and Scope

Determine from user request:

  • Standard — map to supported name (see table). Defaults: "MISRA" → MISRA_C. For "JMAAB" without version → ask user (v5.1 or v6)
  • Model — .slx file (ask if ambiguous)
  • Scope — full model (default) or subsystem path (e.g., Model/Controller)

Disambiguation rules:

  • "JMAAB" without version specifier → ask (v5.1 or v6 — two distinct check sets)
  • "ISO" without specifier → ask (multiple supported)
  • "DO" without specifier → ask (178C vs 254)
  • Multiple standards requested → resolve each, compare sets, run once if identical

2. Choose Path

Path A — Standard named: Proceed to step 3.

Path B — No standard, user says "run Model Advisor" / "check my model": Run detect_default_config(modelName). If config found → skip to step 4. If empty → ask which standard (show supported list).

3. Resolve Checks (Path A only)

matlab
model_advisor_resolve_checks('standard', '<STANDARD_NAME>')
  • status: success → note checks_count, inform user
  • status: truncated → use returned config file path in step 4
  • status: error → report and stop

Gate: If checks_count > 100, confirm with user before proceeding.

Shortcut: If the user already has specific check IDs, call model_advisor_run directly with those IDs and skip to step 5.

4. Run Checks

matlab
model_advisor_run('<system>', 'checks', {<check_ids>})          % inline checks
model_advisor_run('<system>', 'configuration', '<config_path>') % config file

Use 'token_budget', 8000. If truncated, read full results from full_results path.

5. Analyze Findings

Classify from YAML response:

  1. Critical (Failed) — must fix for compliance
  2. Warnings (Warning) — should fix, may be justifiable
  3. Informational — low priority

6. Present Compliance Report

For non-MAB/JMAAB standards, use this template:

## Compliance Summary: <Standard>
Model: <model> [Scope: <subsystem> if scoped]
Result: X passed, Y warnings, Z failures

### Critical Findings (must fix)
| Check | Blocks | Fix Type | Action |
|-------|--------|----------|--------|
| name  | N      | param/insert/config/routing/arch | what to change |

### Warnings (should fix)
| Check | Blocks | Fix Type | Action |
|-------|--------|----------|--------|

### Passed
N checks passed.

### Suggested Next Steps
[5-7 prioritized actions max]

For MAB, JMAAB, or JMAAB_V6 standards, use this template instead (includes the uncheckable guidelines review as an integral part of the report):

## Compliance Summary: <Standard>
Model: <model> [Scope: <subsystem> if scoped]
Result: X passed, Y warnings, Z failures

### Critical Findings (must fix)
| Check | Blocks | Fix Type | Action |
|-------|--------|----------|--------|
| name  | N      | param/insert/config/routing/arch | what to change |

### Warnings (should fix)
| Check | Blocks | Fix Type | Action |
|-------|--------|----------|--------|

### Passed
N checks passed.

---

### Agentic Review of Uncheckable Guidelines (LLM-based — not deterministic)

> **Note:** This is a semantic evaluation performed by an AI agent, not a deterministic Model Advisor check.

**Model:** <model_name>
**Judgment:** PASS | WARNING | FAIL
**Confidence:** 0.XX

#### Critical (must fix)
| Guideline | Blocks | Fix Type | Action | Confidence |
|-----------|--------|----------|--------|------------|

#### Warnings (should fix)
| Guideline | Blocks | Fix Type | Action | Confidence |
|-----------|--------|----------|--------|------------|

### Evidence
[2-3 sentences citing specific model data]

### Recommendation
[Top 3-5 prioritized actions, or "No action required."]

---

### Suggested Next Steps
[5-7 prioritized actions max, combining both deterministic and uncheckable findings]

Fix Type values: param (block parameter), insert (add block), config (model config), routing (reconnect signals), arch (restructure — recommend only)

Conciseness rules:

  • One line per check; max 3-5 block paths shown per check (state total)
  • Target 40-60 lines; max ~80
  • Offer "I can list all affected blocks for check X" for detail

7. Performing the Uncheckable Guidelines Review (JMAAB/MAB only)

This section explains HOW to fill in the "Agentic Review of Uncheckable Guidelines" section that is part of the MAB/JMAAB report template above. You MUST complete this before presenting the report to the user.

Skip this step ONLY for other standards (MISRA, ISO 26262, DO-178C, etc.). For JMAAB, JMAAB_V6, or MAB standards → load and follow references/uncheckable-guidelines-review.md.

What to do: Evaluate guidelines that Model Advisor cannot fully verify — guidelines where semantic judgment is required or no check exists at all. Load references/semantic-evaluation-index.md to get the list of uncheckable guidelines, then:

  1. From the Model Advisor results, identify which checked guidelines appear in the semantic evaluation index
  2. For those guidelines, extract model data using MCP tools (model_overview, model_read, model_query_params)
  3. Apply the Quick Rules from the index for each applicable guideline
  4. For borderline cases, use the Semantic Gap column to calibrate judgment

Judgment: worst verdict across findings (FAIL > WARNING > PASS). Confidence 0.0-1.0. Do NOT issue FAIL if confidence < 0.5.

8. Fix Mode

Ask: "Would you like me to fix these issues?"

  • No → stop (report only)
  • Yes → load and follow references/fix-mode.md workflow

9. Justification Mode

If user wants to justify/waive/suppress violations → load and follow the Justification section in references/fix-mode.md.

Guardrails

Always

  • For JMAAB/JMAAB_V6/MAB: ALWAYS perform Step 7 (Uncheckable Guidelines Review) — the report is incomplete without it
  • Show standard name + check count before running
  • Include block paths in findings
  • Follow Fix Order strictly (structural → diagnostic) to prevent cascading false failures
  • Summarize, do not echo raw output
  • Confirm with user before executing >=100 checks
  • Ask the user for justification text before adding any justification — never fabricate rationale
  • If a reference tool returns an error, report it verbatim — do not retry with alternative approaches
  • Confirm which model to check if multiple .slx files are present or the name is ambiguous
  • State the resolved standard name and version in the report header
  • Report the exact check count from tool output
  • When explaining failures, list all distinct root causes

Ask First

  • Fix mode modifications — never modify model without per-batch confirmation
  • Justification — always a human decision
  • Running >100 checks — confirm scope is intentional

Never

  • Claim "model IS compliant" — only report pass/fail; compliance determination is user's responsibility
  • Escalate diagnostics before structural fixes
  • Suppress findings without explicit request
  • Guess parameter names — use exact parameter field from check output
  • Modify the MATLAB path permanently (no savepath)
  • Run slbuild or code generation without explicit user permission
  • Re-run checks unnecessarily — reuse violation IDs from the most recent run if the model has not been modified since; only re-run to get fresh hashes if the model changed

Error Recovery

ErrorAction
UNKNOWN_STANDARDCheck for typo/alias (e.g., "MAAB" → MAB). If valid but unsupported standard, acknowledge and show supported list.
LICENSE_FAILEDSimulink Check license required
MODEL_NOT_FOUNDAsk for correct model path
CHECK_NOT_FOUNDRelease mismatch — tell user which MATLAB release needed
CONFIG_NOT_FOUNDStale path — ask for update or fall back to named standard
EXECUTION_FAILEDModel may have compilation errors — suggest fixing first
Token budget exceededRead full results from full_results field
HASH_NOT_FOUND (justify)Model modified since last run — re-run checks for fresh ids
JUSTIFICATION_FILE_ERRORCheck file permissions and license

Copyright 2026 The MathWorks, Inc.


Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Checking Model Compliance làm được gì?

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.

Vì sao nên dùng Checking Model Compliance trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Checking Model Compliance là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Checking Model Compliance trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/verification-validation-and-test/checking-model-compliance. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Checking Model Compliance?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Checking Model Compliance với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Checking Model Compliance với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Checking Model Compliance có miễn phí không?

Kỹ năng này được matlab phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇