
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.
- Installs
- 90
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill specifying-mbd-algorithms- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads specifying-mbd-algorithms automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
MBD Algorithm Specs
Structured specification of algorithms for Model-Based Design. Adapts the specifying-software templates for the MBD algorithm domain.
When to Use
- Specifying a controller, estimator, signal processor, diagnostic, or supervisory logic algorithm
- The algorithm will be authored in Simulink, Stateflow, System Composer, or as a MATLAB Function block
- The algorithm is part of a model-based design workflow (simulation, code generation, or both)
- Creating, updating, or reviewing algorithm specification documents
When NOT to Use
- Building the algorithm model → use
building-simulink-models - Testing an existing model → use
testing-simulink-models - Plant/environment models → use
specifying-plant-models - Traditional software (C, C++, Python, standalone MATLAB scripts) → use
specifying-software - Full closed-loop system → use this skill for the algorithm side,
specifying-plant-modelsfor the plant side
Output Conventions
Store 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
Mode Selection
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
Workflow
Step 1: Establish External Interface
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:
- Inputs: measurements, commands, bus signals from other subsystems
- Outputs: actuator commands, processed signals, status/diagnostic flags
- Parameters: tunable (calibratable) vs. fixed (design-time)
Step 2: Define Algorithm Objectives
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.
Step 3: Domain Verification (if equations, standards, or domain conventions are referenced)
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.
Step 4: Write System Spec
Template: assets/system-spec-template.md
Review gate before proceeding — verify:
- Clear algorithm objectives with quantitative acceptance criteria
- Complete external interface contract (all inputs, outputs, parameters with units and sign conventions)
- Operating mode completeness — are all modes defined, including startup, fault, and degraded?
- Actuator/effector mapping correctness — which output drives which actuator, and is the sign correct?
- Boundary behavior — what happens at saturation, zero-crossing, enable/disable thresholds?
Step 5: Write Architecture Spec
Template: assets/architecture-spec-template.md
Review gate before finalizing — verify:
- Dimensional consistency — units match across all interfaces end-to-end
- Feedback polarity — negative feedback for stabilizing loops, correct sign through the entire loop
- Anti-windup and reset behavior specified for every integrator
- Mode transition logic — bumpless transfer, initialization on mode entry, no unguarded transitions
- Rate transitions — multi-rate interfaces handled correctly
- Saturation and limiting at actuator outputs and per-channel levels
- Algebraic loops — every feedback path has an explicit delay element with documented IC and DFT status annotated in the Component Catalog
- Code generation constraints addressed (data types, scheduling, memory) if applicable
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.
Step 6: Write Implementation Plan + Test Plan
Templates: assets/implementation-plan-template.md, assets/test-plan-template.md
Review gate — Implementation Plan — verify:
- Phase 0 interface freeze gates all parallel work
- Build order respects data flow dependencies (leaf components first)
- Tightly coupled components assigned to same agent or coordinated
- Each checkpoint has concrete verification steps (model_read, model_query_params, test)
- Parameter table complete with sources
Review gate — Test Plan — verify:
- Staged validation: component MIL → integrated MIL → system-in-loop MIL → robustness → SIL/PIL (if code-generated)
- Every operating mode tested, including startup and fault
- Mode transition scenarios with bumpless transfer checks
- Saturation and anti-windup recovery tests
- Quantitative acceptance criteria with design basis for each test
- Input signal definitions reusable across stages
Get user approval before implementation begins.
Updating Existing Specs
When updating specs: check affected sections, update them, update "Last Updated" date, review for consistency with other specs.
Guardrails
Always
- Verify feedback polarity before finalizing any control loop architecture
- Verify units and sign conventions end-to-end across all interfaces
- Freeze interfaces (Phase 0) before parallel subsystem work begins
Ask First
- Adding operating modes not in the system spec
- Changing interface signals after Phase 0 freeze
- Deviating from the plant's or system's sample time alignment
Never
- Implement control without specifying anti-windup / saturation behavior for integrators
- Hardcode tuning parameters that should be calibratable
- Skip mode transition specification for multi-mode algorithms
- Break an algebraic loop with a Memory block in a continuous-time path (use Unit Delay for discrete, Transfer Fcn with small time constant for continuous)
Spec Types
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
assets/system-spec-template.md— System spec template (what & why)assets/architecture-spec-template.md— Architecture template (functional decomposition)assets/implementation-plan-template.md— Build sequence templateassets/test-plan-template.md— Validation plan templatereferences/algorithm-guidance.md— Optional domain research checklistassets/detailed-spec-template.md— Control law, state machine, or interface contract (use when architecture is blocked)assets/component-spec-template.md— Complex component internals (rarely needed)
Copyright 2026 The MathWorks, Inc.
FAQ
What does the specifying-mbd-algorithms skill do?
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.
How do I install specifying-mbd-algorithms?
Run npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill specifying-mbd-algorithms in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/specifying-mbd-algorithms/ (personal) or .claude/skills/specifying-mbd-algorithms/ (project).
Which AI agents can use specifying-mbd-algorithms?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is specifying-mbd-algorithms safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains specifying-mbd-algorithms?
It is published by matlab in matlab/simulink-agentic-toolkit. It has 90 recorded installs.
More from matlab/simulink-agentic-toolkit
building-simulink-models
matlab/simulink-agentic-toolkit
Builds and edits Simulink, System Composer, Stateflow, and Simscape models. Use when modifying model structure, parameters, ports, connections, or Stateflow chart internals.
simulating-simulink-models
matlab/simulink-agentic-toolkit
Configures Simulink simulations non-destructively using SimulationInput objects — parameter overrides without modifying the model, batch sweeps via parsim, custom input signals via Dataset, and simulation data retrieval via logsout. Use when running sim()/parsim() with setVariable, setBlockParameter, setExternalInput, or when performing parameter sweeps and multi-run analysis. Not needed for one-shot simulations without configuration.
testing-simulink-models
matlab/simulink-agentic-toolkit
Tests Simulink models using either ephemeral Gherkin-based tests (modeltest) for quick validation or persistent tests (Simulink Test API) authored from requirements or behavioral specs. Requires Simulink Test.
specifying-plant-models
matlab/simulink-agentic-toolkit
Specify plant models for closed-loop simulation: system specs, architecture, build plans, validation plans. Use when creating, updating, or reviewing plant model specifications, planning plant model architecture, or planning plant model validation.
generate-requirement-drafts
matlab/simulink-agentic-toolkit
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.
filing-bug-reports
matlab/simulink-agentic-toolkit
Generate a standalone bug report that another developer can use to reproduce, investigate, and fix an issue. Use when the user says 'file a bug', 'write a bug report', 'report this issue', or asks to document a defect for handoff.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create 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.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available