- name
SKILL.md
Tệp skill vẫn nằm trong kho mã của nhà phát hành.
Dán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add matlab/simulink-agentic-toolkit --skill generate-requirement-drafts -a cursor -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add matlab/simulink-agentic-toolkit --skill generate-requirement-drafts -a claude-code -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add matlab/simulink-agentic-toolkit --skill generate-requirement-drafts -a codex -yDán lệnh đã sao chép vào terminal. Lệnh sẽ cài đặt tệp SKILL.md này vào agent đó.
npx skills add matlab/simulink-agentic-toolkit --skill generate-requirement-drafts -a grok -yGửi tin nhắn đã sao chép trong cuộc trò chuyện Grok Bot. Bot sẽ lấy tệp SKILL.md này từ GitHub và thêm vào bộ skill mà mọi Bot của bạn dùng chung.
Install this skill: https://github.com/matlab/simulink-agentic-toolkit/tree/HEAD/skills-catalog/model-based-design-core/generate-requirement-draftsTừ nhà phát hành
Generate draft requirements from Simulink models using the richest artifact the environment supports. All outputs are drafts requiring human review and approval before baselining.
.slreqx or .yaml requirements artifactstesting-simulink-models skill<Model>_Requirements.slreqx or <model>_requirements.yamlREQ_<SYSTEM>_001, REQ_<SYSTEM>_002, … — use one consistent project-wide prefix with sequential integers across all requirements, even when they derive from different subsystems. Do not switch to per-subsystem prefixes or hierarchical decimal numbering (e.g. CB-1.1, TP-1.1)..slreqx or .yaml files already exist"draft" in Keywords (slreq) or status: Draft + keywords: [draft] (YAML)Requirements must express behavioral intent (WHAT the system shall do), not restate model topology (HOW it is implemented). Put the WHY in Rationale. Use EARS (Easy Approach to Requirements Syntax) patterns:
Choose the pattern that best fits the model behavior:
Saturation, BrakeLogic) only in Rationale, Description, or provenance notes — never in the requirement Summary. (A workspace parameter rendered as VarName (value) is required in the Summary and is not a block name.)VarName (value). If the model uses a literal with no variable, record the numeric literal directlyRationale, not in the requirement statementWhen <trigger>, … shall transition to <state>), but the behavior that holds throughout the mode is state-driven (While <state>, … shall <response>). When asked for a mode's behavior, prefer the While <state> form — do not fold it into a When entry statementChoose once at the start, then stay on that path.
Probe (run via evaluate_matlab_code):
hasSlreq = ~isempty(which('slreq.new'));
if hasSlreq, try, slreq.find(Type="Link"); catch, hasSlreq = false; end, end
disp(hasSlreq)
model_overview, model_read, model_query_params, model_resolve_params as MCP tools — never pass their names to evaluate_matlab_code.evaluate_matlab_code only for MATLAB code, such as the backend probe and the slreq.* APIs in Path A.Understand the model — use the model_overview and model_read tools to understand subsystems, interfaces, control logic.
Extract parameters — use the model_query_params / model_resolve_params tools for thresholds, gains, sample times that should appear in requirement text. Record both variable names and resolved values.
Build a capture table (backend-neutral):
Run the backend path (A or B below).
Review using the gate below.
.slreqx)Use when probe succeeds. For full API patterns see references/slreq-patterns.md.
model = "CruiseControl";
load_system(model);
rs = slreq.new(model + "_Requirements");
% Add requirements with hierarchy — note behavioral "shall" statements
req = add(rs, Id="REQ_CC_001", ...
Summary="If throttle command exceeds ThrottleMax (1.0) or falls below ThrottleMin (0.0), then the controller shall clamp the output to the valid range.", ...
Description="Derived from CruiseControl/ThrottleCmd.");
req.Rationale = "Prevents invalid actuator commands that could damage the throttle body.";
req.Keywords = ["draft","auto-generated","control","safety"];
child = add(req, Id="REQ_CC_002", ...
Summary="When brake pedal input exceeds BrakeThreshold (0.0), the controller shall disengage cruise control.", ...
Description="Derived from CruiseControl/BrakeLogic.");
child.Keywords = ["draft","auto-generated","safety","brake"];
% Create traceability links: use block handle from SID (blk_X → X) for robustness
lnk = slreq.createLink(Simulink.ID.getHandle(model + ":5"), req);
slreq.createLink(Simulink.ID.getHandle(model + ":8"), child);
save(rs);
% Save all link sets
linkSets = slreq.find(Type="LinkSet");
for i = 1:numel(linkSets), save(linkSets(i)); end
Link rules:
Implementload_system) before creating links with block pathsUse when Requirements Toolbox is unavailable. For schema and field rules see references/yaml-requirements.md.
<model>_requirements.yaml file from the capture tablestatus: Draft and include draft in keywords for every requirementasil/status/priority use valid values, IDs sequential, derived_from references valid IDs or is nullpython -c "import yaml, sys; yaml.safe_load(open(sys.argv[1])); print('OK')" path/to/requirements.yaml
Before finishing, verify (both backends):
Id, Summary, and Descriptionslreq path only:
YAML path only:
asil and priority use valid enum values (or Unset when unknown)references/slreq-patterns.md — Requirements Toolbox API cookbookreferences/yaml-requirements.md — Structured YAML schema and field rulesassets/slreq_from_model.m — End-to-end slreq exampleassets/requirements.yaml — Structured YAML exampleCopyright 2026 The MathWorks, Inc.
Generates draft requirements from Simulink models. Use when drafting or updating requirement artifacts from a model. Prefers Requirements Toolbox (.slreqx) when available; falls back to structured YAM
---name: generate-requirement-draftsdescription: Generates draft requirements from Simulink models. Use when drafting or updating requirement artifacts from a…---# skills-catalog/model-based-design-core/generate-requirement-drafts/SKILL.mdTổng quan
Generates draft requirements from Simulink models. Use when drafting or updating requirement artifacts from a model. Prefers Requirements Toolbox (.slreqx) when available; falls back to structured YAML.
Câu hỏi thường gặp
Tải skills-catalog/model-based-design-core/generate-requirement-drafts/SKILL.md từ nhà phát hành, hoặc sao chép đường dẫn và mở kho mã. PlugMCP chỉ liệt kê skill và không lưu trữ tệp này.
Nhà phát hành duy trì nó tại https://github.com/matlab/simulink-agentic-toolkit.
Claude, Cursor, Codex và Grok Build có thể đọc tệp SKILL.md mà bạn thêm từ kho mã của nhà phát hành. Grok Bot cài đặt skill khi bạn gửi liên kết thư mục GitHub của skill trong cuộc trò chuyện.