Checking Model Compliance 标志

Checking Model Compliance

组织热门
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

概览

发布者matlab
代码仓库simulink-agentic-toolkit
技能名称checking-model-compliance
星标数
1.2K
复刻数
112
附带文件
8
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 8 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 matlab 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Checking Model Compliance AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/verification-validation-and-test/checking-model-compliance
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

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
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Checking Model Compliance,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Checking Model Compliance。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Checking Model Compliance 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

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.


附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Checking Model Compliance AI 技能有什么作用?

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.

为什么在 TypingMind 中使用 Checking Model Compliance?

因为您只需安装一次,就能搭配任何模型使用。Checking Model Compliance 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Checking Model Compliance?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/verification-validation-and-test/checking-model-compliance。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Checking Model Compliance?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Checking Model Compliance 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Checking Model Compliance 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Checking Model Compliance AI 技能免费吗?

matlab 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇