matlab/agent-skills-playground / demos/mbse-with-agentic-ai/skills/simulink-requirements
simulink-requirements
VerifiedUse this skill for all requirements-related work in a MATLAB MBSE project using the Requirements Toolbox (slreq). Covers creating and populating requirement sets, derivation links, test case requirements, verification coverage, reading and tracing links across requirement sets and models, checking link health, allocating requirements to components (Implement links), and building traceability reports. Trigger when the user asks about slreq API, slreqx files, slmx link files, outLinks/inLinks, traceability matrices, coverage analysis, broken links, or mapping requirements to architecture components. Use proactively for any requirements or traceability task.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 24.8 KB |
| code/buildMyRequirements.m | other | 1.6 KB |
| code/buildMyTestCases.m | other | 1.3 KB |
| code/exportRequirementsToExcel.m | other | 3.6 KB |
| code/importMyRequirements.m | other | 3.8 KB |
| code/loadProjectRequirements.m | other | 817 B |
| code/reportCoverageAggregate.m | other | 1.4 KB |
| code/reportCoverageByReq.m | other | 1.1 KB |
| code/reportLinkHealth.m | other | 907 B |
| code/traceRequirement.m | other | 1.4 KB |
| references/api-quickref.md | markdown | 7.5 KB |
code/buildMyTestCases.m
View on GitHubfunction buildMyTestCases(srFile, tcFile)
% BUILDMYTESTCASES Create test case requirements linked to system requirements.
% Loads the system requirements set and recreates the test case set and its
% paired .slmx link file on every run (idempotent).
%
% Inputs:
% srFile - Full path to the System Requirements file (.slreqx) (string)
% tcFile - Full path to the Test Cases file (.slreqx) to create (string)
tcLink = strrep(tcFile, '.slreqx', '~slreqx.slmx');
slreq.clear();
srSet = slreq.load(srFile); % slreq.load() for scripts; slreq.open() opens the UI
if isfile(tcFile), delete(tcFile); end
if isfile(tcLink), delete(tcLink); end
tcSet = slreq.new(tcFile);
% { TC-ID, Summary, Description, SR-ID }
testCases = {
'TC-SYS-001', 'Verify SR-001', ...
'Apply stimulus X. Measure Y. Pass if Y meets criterion Z.', ...
'SR-SYS-001';
};
for i = 1:size(testCases, 1)
tc = tcSet.add();
tc.Id = testCases{i, 1};
tc.Summary = testCases{i, 2};
tc.Description = testCases{i, 3};
tc.Rationale = ['Verifies ', testCases{i, 4}];
sr = srSet.find('Id', testCases{i, 4});
lnk = slreq.createLink(tc, sr);
lnk.Type = 'Verify';
end
slreq.saveAll();
end
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |