matlab/specifying-mbd-algorithms
Specify algorithms for Model-Based Design: system specs, architecture specs, implementation plans, test plans. Use when creating specifications for controllers, signal processing, diagnostics, estimators, or other algorithms authored in Simulink, Stateflow, System Composer, or MATLAB Function blocks.
npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill specifying-mbd-algorithms
Structured specification of algorithms for Model-Based Design. Adapts the specifying-software templates for the MBD algorithm domain.
building-simulink-modelstesting-simulink-modelsspecifying-plant-modelsspecifying-softwarespecifying-plant-models for the plant sideStore specs per algorithm. Prefix every filename with the algorithm name:
docs/specs/algorithms/<algorithm-name>/
├── <algorithm-name>-system.md
├── <algorithm-name>-architecture.md
├── <algorithm-name>-implementation-plan.md
└── <algorithm-name>-test-plan.md
> Is this a single-function algorithm with <3 operating modes, single-rate, and will be built by one person/agent?
> - Yes → Quick spec: 2 documents (system+architecture combined, implementation+test combined)
> - No → Full spec: 4 separate documents
Identify what this algorithm connects to. If an existing system exists, read it with model_overview and model_read. If greenfield, define the boundary from requirements.
Classify every signal crossing the algorithm boundary:
Establish what the algorithm must achieve — tracking performance, bandwidth, disturbance rejection, detection thresholds, processing latency, etc. These are the acceptance criteria that drive architecture decisions and test plan design.
Use web_search to confirm key equations, standards, or conventions referenced in the spec. Record confirmed sources in Appendix B: Research Notes.
Skip when: algorithm is purely logic-based, domain is well-known, or no equations are involved.
Template: references/system-spec-template.md
Review gate before proceeding — verify:
Template: references/architecture-spec-template.md
Review gate before finalizing — verify:
Required: API Verification for any API, function, or block behavior not already used in neighboring code. Test actual signatures and behavior using evaluate_matlab_code, web_search, or existing codebase usage. Record in Appendix B of the architecture spec.
Templates: references/implementation-plan-template.md, references/test-plan-template.md
Review gate — Implementation Plan — verify:
Review gate — Test Plan — verify:
Get user approval before implementation begins.
When updating specs: check affected sections, update them, update "Last Updated" date, review for consistency with other specs.
For guidance on when to create optional specs (detailed spec, component spec), see references/spec-types.md. Create a detailed spec when architecture is blocked by: control law definition, state machine definition, or interface contract.
references/system-spec-template.md — System spec template (what & why)references/architecture-spec-template.md — Architecture template (functional decomposition)references/implementation-plan-template.md — Build sequence templatereferences/test-plan-template.md — Validation plan templatereferences/algorithm-guidance.md — Optional domain research checklistreferences/detailed-spec-template.md — Control law, state machine, or interface contract (use when architecture is blocked)references/component-spec-template.md — Complex component internals (rarely needed)----
Copyright 2026 The MathWorks, Inc.
----
Take matlab/specifying-mbd-algorithms from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.