Matlab simulink agent
Skill walterkken/matlab-simulink-agent-skill/matlab-simulink-agent
Doc-driven MATLAB and Simulink automation skill for AI agents.
npx -y skills add walterkken/matlab-simulink-agent-skill --skill matlab-simulink-agentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Build, inspect, run, and debug MATLAB Simulink simulations through doc-driven automation: local MATLAB help/doc lookup, installed-product capability scans, Simulink library/block inventory, toolbox checks, solver configuration, generated `.m` scripts, simulation execution, error-driven repair, result export, and optional desktop workflows. Use when Codex is asked to operate MATLAB or Simulink, create or modify `.slx`/`.mdl` models, automate tasks described in MATLAB documentation, run `sim`, inspect blocks/parameters/logs, or perform control, signal, Simscape, or power-system simulation tasks.
SKILL.md
6.8 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
MATLAB Simulink Agent
Overview
Use this skill to turn a MATLAB/Simulink request into reproducible artifacts by retrieving the relevant installed MATLAB knowledge first, then generating code, running it, and repairing it from diagnostics. Prefer MATLAB and Simulink programmatic APIs over manual clicking; use desktop automation only when a task truly requires the UI.
The operating goal is: if the installed MATLAB release, installed products, licenses, and documentation expose a supported API or workflow, automate it as far as possible. Do not promise success for missing toolboxes, expired licenses, UI-only operations, external hardware, or tasks that require engineering judgment beyond the user's stated model.
Do not ingest, copy, or redistribute entire MathWorks documentation sets. Read local help, installed help indexes, examples, object metadata, Simulink block parameters, and official online documentation selectively for the task at hand, and quote only small excerpts when necessary.
Workflow
- Frame the task: identify objective, products/toolboxes, inputs, outputs, model fidelity, solver, stop time, units, and pass/fail criteria. Ask only for missing facts that block a correct automation plan.
- Scan capabilities: run
scripts/check_matlab_env.shand, when MATLAB can start,scripts/matlab_capability_scan.mto capture release, products, help indexes, path roots, and Simulink availability. - Retrieve task knowledge: use
references/doc-driven-automation.mdandreferences/doc-access.md. Pull only relevanthelp,which,lookfor, installed help-index matches, object metadata, examples, and block parameters. - Inventory Simulink when needed: run
scripts/simulink_inventory.mon the required libraries before choosing block paths or parameters. - Generate reproducible automation: create
.mscripts that call documented APIs such asnew_system,load_system,add_block,set_param,add_line,find_system,save_system, andsim. Put generated models and outputs under an explicit project folder. - Run, inspect, repair: execute with
scripts/run_matlab_batch.sh, read diagnostics, retrieve missing docs/metadata, patch the script, and rerun until success or a real blocker is identified. - Guide blocker resolution: when a real blocker appears, use
references/blocker-remediation.mdto classify it and give the user concrete, legitimate steps to remove the restriction. - Search trusted community fixes when needed: if official docs and local metadata are insufficient, use
references/community-troubleshooting.mdto search vendor forums and technical communities with exact errors, versions, and product names. - Validate and report: export plots/data/logs, verify solver settings, dimensions, units, initial conditions, logged outputs, and pass/fail criteria. List concrete artifacts and residual assumptions.
Resources
references/doc-access.md: how to find and read MATLAB/Simulink help without copying full docs.references/doc-driven-automation.md: retrieval-action loop for automating anything documented and available in the installed MATLAB environment.references/blocker-remediation.md: how to diagnose and guide users through legitimate fixes for permissions, licenses, missing toolboxes, startup issues, UI-only tasks, and hardware constraints.references/community-troubleshooting.md: how to search MathWorks and technical forums safely when official docs do not resolve an error.references/simulink-build-patterns.md: repeatable patterns for creating, inspecting, simulating, and exporting Simulink models.references/power-systems.md: Simulink/Simscape Electrical guidance for power-system and transient-stability simulations.scripts/check_matlab_env.sh: locate MATLAB and optionally list installed products.scripts/run_matlab_batch.sh: run a MATLAB.mscript in batch mode with consistent error handling.scripts/read_matlab_help.m: export selectedhelptext for a MATLAB topic into a local file.scripts/matlab_doc_lookup.m: collect topic-specific help,which,lookfor, and installed help-index matches into a task-local report.scripts/matlab_capability_scan.m: write a JSON capability report for MATLAB release, installed products, paths, and Simulink status.scripts/simulink_inventory.m: inventory libraries, block paths, block types, mask types, and dialog parameter names for reliableadd_block/set_paramgeneration.assets/examples/create_minimal_simulink_model.m: minimal generated model example to copy and adapt.
MATLAB/Simulink Rules
- Prefer scripts that rebuild the model from scratch. Do not depend on hidden manual UI state.
- Save generated models with deterministic names and close them with
close_system(model, 0)orclose_system(model, 1)as appropriate. - Use explicit block paths and parameters. Verify uncertain block library paths with
load_systemandfind_systembefore committing a script. - For unfamiliar functions, classes, blocks, or parameters, retrieve documentation/metadata first. Do not guess when MATLAB can answer with
help,which,methods,properties,get_param,find_system, or a help index. - Configure solver and stop time explicitly with
set_param(model, ...). - Log only the signals needed for validation and export machine-readable results (
.mator.csv) when possible. - Treat Simscape and power-system models as unit-sensitive. Document base values, sample times, solver choices, and assumptions.
- Never present a generated simulation as engineering truth without a successful run and sanity checks against expected behavior.
Desktop Operation
Use MATLAB desktop/UI automation only when programmatic APIs are insufficient, such as inspecting a masked subsystem dialog, opening a scope layout, or interacting with an add-on manager. Before UI work, check whether a MATLAB MCP server or local MATLAB batch command is available; otherwise use the Computer Use skill for macOS UI actions.
For MATLAB installation, add-ons, and MCP setup, prefer official MathWorks tools and the repository-specific instructions already present in the user's environment. Do not change MATLAB preferences, install add-ons, or modify global Codex config unless the user explicitly asks.
What ships with it: 14 files
30.5 KB alongside SKILL.md, 2 of them executable
agents/
- openai.yaml258 B
assets/
references/
- blocker-remediation.md4.9 KB
- community-troubleshooting.md1.9 KB
- doc-access.md2.3 KB
- doc-driven-automation.md2.9 KB
- power-systems.md2.6 KB
- simulink-build-patterns.md3.0 KB
scripts/
- check_matlab_env.shruns1.1 KB
- matlab_capability_scan.m2.3 KB
- matlab_doc_lookup.m2.7 KB
- read_matlab_help.m866 B
- run_matlab_batch.shruns1.3 KB
- simulink_inventory.m2.6 KB