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/traceRequirement.m
View on GitHubfunction traceRequirement(rs, reqId)
% TRACEREQUIREMENT Print the full traceability chain for a single requirement.
% Prints all outbound links (derives from / traces to) and inbound links
% (implemented / verified / derived by) for the given requirement ID.
%
% Inputs:
% rs - slreq.ReqSet containing the requirement (slreq.ReqSet)
% reqId - Requirement ID string, e.g. 'SR-SYS-001' (string)
r = rs.find('Id', reqId);
if isempty(r)
fprintf('Requirement "%s" not found.\n', reqId);
return;
end
fprintf('=== %s: %s ===\n', r.Id, r.getDescriptionAsText());
out = r.outLinks();
if ~isempty(out)
fprintf('\nDerives from / traces to:\n');
for k = 1:numel(out)
lnk = out(k);
ref = lnk.getReferenceInfo();
fprintf(' [%s] -> "%s"', lnk.Type, lnk.getDestinationLabel());
if isstruct(ref)
fprintf(' (artifact: %s, id: %s)', ref.artifact, ref.id);
end
fprintf('\n');
end
end
in_ = r.inLinks();
if ~isempty(in_)
fprintf('\nImplemented / verified / derived by:\n');
for k = 1:numel(in_)
lnk = in_(k);
src = lnk.source();
fprintf(' [%s] <- "%s"', lnk.Type, lnk.getSourceLabel());
if isstruct(src)
fprintf(' (domain: %s)', src.domain);
end
fprintf('\n');
end
end
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 |