Generates Simulink Test Sequence blocks and harnesses from EARS requirements. Useful for creating requirement-based tests from .slreqx files or verifying Simulink models.
Ships in matlab-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Map requirement phrases to model signals, review the mappings, and generate Test Sequence harnesses with the bundled MATLAB helpers.
verify() statements..slx file do not establish success.Identify the model under test, the .slreqx requirement set, and any
.sldd dictionaries or enumeration classes. Resolve the folder containing
this file as skillRoot, then add fullfile(skillRoot, "scripts") to the
MATLAB path.
Run MATLAB from the model artifacts folder (or set the evaluation tool's
working-folder option). Discovery scans that folder for dictionaries and enum
classes. Verify which("analyzeRequirements") resolves to this installation.
The older analizeRequirements spelling remains a compatibility alias.
Use analyzeRequirements(modelName, reqSetPath) for requirement and model
discovery. For a review of selected requirements:
review = generateMappingReviewFromRequirements( ...
'ModeLogic', 'HLR_ModeLogic_EARS.slreqx', ...
'mapping_review_req17.yaml', 'RequirementIds', "17");
Read workflow-details.md when constructing or
editing the YAML. Lead with phrase_mappings containing the requirement
phrase, model element, and interpretation. Keep generation fields in the same
file: init_assignments, precondition_path, stimulus_assignments, and
verify_statements.
Record assumptions in test_assumptions, unresolved meanings in
open_questions, and approval in status. Show the final review file in
the MATLAB Editor when available, unless the user requests otherwise. For
headless operation or intermediate files, pass 'OpenInEditor', false.
Present a short mapping summary and request review when approval is missing.
After the user approves, set the accepted entries to status: 'approved'.
Edits with unresolved questions do not constitute approval.
result = buildHarnessesFromApprovedYaml( ...
'ModeLogic', 'mapping_review_req17.yaml');
The default creates externally saved harnesses in test_harnesses/ and
registers them on the source model. If the requested output is standalone
harness files, the staged alternative is:
result = buildHarnessesFromApprovedYaml( ...
'ModeLogic', 'mapping_review_req17.yaml', ...
'AssociateWithSourceModel', false);
That alternative generates in a temporary workspace and copies harness files back; it does not register them on the source model. Inspect the reported build folder when troubleshooting dictionary or model shadowing.
Open the generated harness and relevant result.test_sequence_blocks when
a desktop session is available and the user has not requested headless work.
Use the returned paths to inspect the Test Sequence. Do not recreate the
bundled helpers.
| EARS pattern | Form | Generated steps |
|---|---|---|
| Ubiquitous | The system shall ... | Initialize and verify |
| Event-driven | When ..., the system shall ... | Establish preconditions, trigger, verify |
| State-driven | While ..., the system shall ... | Establish the state and check behavior |
| Unwanted behavior | If ..., then the system shall ... | Apply the condition and check the response |
| Optional | Where ..., the system shall ... | Use the event-driven configurator |
The parser recognizes these sentence forms; arbitrary natural-language requirements may need clarification. Automated phrase and precondition inference includes ModeLogic-specific heuristics, so review mappings against the actual system. The bundled timing defaults and one scenario per requirement do not establish exhaustive verification.
Requirements Toolbox traceability links must be added separately through Simulink Test Manager. Do not claim certification, standards compliance, or complete requirement coverage from generated harnesses.
Workflow details includes the YAML schema,
a ModeLogic example, the low-level signalMappings struct, and the helper
catalog. Use it for custom mappings and multi-step preconditions.
Copyright 2026 The MathWorks, Inc.
LICENSE.md (opens in a new tab)references/workflow-details.md (opens in a new tab)scripts/addPreconditionSteps.m (opens in a new tab)scripts/analizeRequirements.m (opens in a new tab)scripts/analyzeRequirements.m (opens in a new tab)scripts/buildHarnessesFromApprovedYaml.m (opens in a new tab)scripts/collectSkillContext.m (opens in a new tab)scripts/compileHarnessModel.m (opens in a new tab)scripts/configureEventDriven.m (opens in a new tab)scripts/configureStateDriven.m (opens in a new tab)scripts/configureTestSequence.m (opens in a new tab)scripts/configureUbiquitous.m (opens in a new tab)scripts/configureUnwantedBehavior.m (opens in a new tab)scripts/generateMappingReviewFromRequirements.m (opens in a new tab)scripts/generateSignalMappingsFromYaml.m (opens in a new tab)scripts/generateTestSequencesFromRequirements.m (opens in a new tab)scripts/parseEARSPattern.m (opens in a new tab)scripts/prepareWritableBuildWorkspace.m (opens in a new tab)scripts/readMappingReviewYaml.m (opens in a new tab)scripts/writeMappingReviewYaml.m (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/matlab-performance-optimizerOptimize MATLAB code for better performance through vectorization, memory management, and profiling. Use when user requests optimization, mentions slow code, performance issues, speed improvements, or asks to make code faster or more efficient./matlab-uihtml-app-builderBuild interactive web applications using HTML/JavaScript interfaces with MATLAB computational backends via the uihtml component. Use when creating HTML-based MATLAB apps, JavaScript MATLAB interfaces, web UIs with MATLAB, interactive MATLAB GUIs, or when user mentions uihtml, HTML, JavaScript, web apps, or web interfaces./matlab-uihtml-design/matlab-skills:simulink-test-sequence-from-earsfrom matlab-skills
matlab-skills@cascade-code-languages-misc-2 is listed by joshuarweaver/cascade-code-languages-misc-2 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-2 --plugin matlab-skillsOther plugins' skills for the same job