MCPInstall
matlab avatar

authoring-simulink-inputs

Synthesize new waveforms from scratch for Simulink inports using createInputDataset. Use ONLY when the user asks to generate, create, or synthesize signals (step, ramp, sine, chirp, pulse, noise) to populate a Dataset for External Inputs or Signal Editor. Covers timeseries and timetable formats with correct data type, interpolation, units, and dimensions. Also covers function-call and trigger inport timing setup. Do NOT use when the user wants to load, import, or read existing data from files (MAT, CSV, spreadsheet) — even if that data will be used as model input. Do NOT use for running simulations or plotting outputs.

Installs
56
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 authoring-simulink-inputs
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads authoring-simulink-inputs automatically when relevant.

  3. 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.

Author Input Signals

Create populated input signal datasets for Simulink models using createInputDataset as the scaffold, then populating with meaningful waveforms while preserving all signal metadata.

When to Use

  • User asks to generate or create synthetic waveforms (step, ramp, sine, chirp, pulse, noise, constant) for a model's inports
  • User wants to populate a Dataset created by createInputDataset with meaningful signal data
  • User needs signals for Signal Editor scenarios
  • User describes desired input signal behavior in natural language (e.g., "ramp from 0 to 10", "sine at 5 Hz")
  • User wants timetable-based input signals for inports
  • User needs to set up function-call timing or configure trigger/enable inport signals
  • User wants to replace zero-filled scaffold data with realistic waveforms

When NOT to Use

  • User wants to simulate the model, run it, or plot outputs — use simulating-simulink-models instead. This skill only creates input data; it never runs sim() or produces plots.
  • User wants to load, import, or read data from existing files (CSV, MAT, spreadsheet, .mat workspace) — even if the destination is a model inport. This skill generates new synthetic waveforms from scratch; it does not read or convert existing recorded/measured data.

Output

This skill produces:

  1. MATLAB code — a local function that generates and returns the Dataset (reproducible, editable, keeps workspace clean)
  2. Dataset variable (ds) — populated Simulink.SimulationData.Dataset in the base workspace, ready for simulation
  3. Summary — brief description of each element: name, data type, waveform shape, and value range

To simulate with the Dataset, follow the simulating-simulink-models skill workflow (SimulationInput → setExternalInput → sim).

Must-Follow Rules

  1. Start from createInputDataset — call it exactly once — never build a Dataset from scratch. Call createInputDataset once per model (it triggers update diagram). For multiple datasets, clone the returned scaffold in a loop rather than calling createInputDataset again
  2. Preserve metadata from scaffold — every new timeseries must copy origEl.DataInfo.Interpolation and origEl.DataInfo.Units. For timetables, copy origEl.Properties.VariableContinuity. Omitting these is a bug
  3. Replace elements in place — for timeseries: ds{k} = ts. For timetable: ds = ds.setElement(k, tt, origEl.Properties.Description) — never use addElement
  4. Respect data types — use cast(data, 'like', origEl.Data) to match any scaffold type (double, single, integer, fixed-point). For boolean inports use true(size(t)) directly
  5. Set interpolation correctly — continuous signals (sine, ramp, chirp) use linear; discrete signals (step, pulse, boolean, integer, noise) use zero-order hold. The scaffold's interpolation reflects the inport's Interpolate property — preserve it unless the signal nature demands otherwise
  6. Wrap all generation logic in a function — the only variables left in the base workspace should be the Dataset (and simIn/simOut if simulating). All intermediate variables (t, dt, origEl, ts, signalData, k) must stay inside function scope
  7. Never destroy user data — never call clear, clearvars, clear all, or bdclose all. The user may have existing variables, models, or figures open. Only add to the workspace, never remove from it

Workflow

Determine your entry point. Do not always start at step 1. Assess what the user already has:

User's current stateStart at
No existing Dataset or script — starting freshStep 1
Has a Dataset variable but it's empty/scaffold (all zeros or placeholder data)Step 2
Has a Dataset with some signals populated but needs fixes (wrong shape, dtype, interpolation)Step 2 — inspect the broken element, fix in place
Has a working script but wants additional scenarios or signals addedStep 2 or "Creating Multiple Datasets"
Has a complete Dataset but simulation failsDiagnose the error first — often a metadata mismatch (interpolation, dtype, units) fixable in Step 2

A scaffold is the Dataset returned by createInputDataset. It contains one element per inport, pre-filled with correct metadata (data type, interpolation method, units, signal dimensions) but only placeholder time samples (typically 2 zero-valued rows). The workflow replaces this placeholder data with meaningful waveforms while preserving the metadata.

1. Create the scaffold (inside a function)

All generation code lives in a local function. The caller invokes the function and receives the populated Dataset:

ds = buildInputs('modelName');

function ds = buildInputs(mdl)
    ds = createInputDataset(mdl);
    % — or timetable format —
    % ds = createInputDataset(mdl, 'DatasetSignalFormat', 'timetable');

    stopTime = str2double(get_param(mdl, 'StopTime'));
    dt = 0.01;
    t = (0:dt:stopTime)';

    % ... populate elements (Step 2) ...
end

If createInputDataset fails (model cannot compile), use model_read to inspect the model's inport blocks and ask the user for any type/dimension info that cannot be determined from the model structure.

2. Populate each element (inside the same function)

Replace placeholder scaffold data with meaningful signal waveforms while preserving metadata. For each element:

  1. Extract the original element (origEl = ds{k})
  2. Generate your waveform and cast via cast(data, 'like', origEl.Data) — works for all types including fixed-point
  3. Create the new timeseries or timetable
  4. Copy DataInfo.Interpolation and DataInfo.Units from origEl (timeseries) or VariableContinuity from origEl (timetable)
  5. Replace in place: ds{k} = ts (timeseries) or ds = ds.setElement(k, tt, origEl.Properties.Description) (timetable)

See references/signal-patterns.md — "Dataset Assembly" sections — for the complete code patterns.

Creating Multiple Datasets

Call createInputDataset once, then clone the scaffold in a loop inside a function. See references/dataset-patterns.md — "Creating Multiple Datasets" section — for the complete pattern.

Bus Signal Inports

If the model has bus signal inports, see the "Bus Signal Inports" section in references/dataset-patterns.md.

Function-Call Inports

If the model has function-call inports, see the "Function-Call Inports" section in references/dataset-patterns.md.

Signal Types

See references/signal-patterns.md for waveform generation code (sine, step, ramp, chirp, pulse, noise, constant, enum).

Interpolation and Continuity (explicit set — use only when overriding scaffold)

Signal naturetimeseriestimetable
Continuous (sine, ramp, chirp)tsdata.interpolation('linear')"continuous"
Discrete (step, pulse, boolean)tsdata.interpolation('zoh')"step"

Guardrails

MistakeWhy It's WrongCorrect Approach
Using ones(size(t)) for boolean enableCreates double; simulation fails with type mismatchUse true(size(t))
Ignoring struct fields in bus scaffoldMissing or incorrectly typed bus element causes simulation errorPopulate every field in the struct, preserving each field's metadata
Treating scaffold data rows as signal widthScaffold [2 1] data means 2 time samples of a scalar, not a 2-element vectorUse size(origEl.Data, 2) for signal width — rows are placeholder time samples
Enum data fails with "turn off interpolation"Simulink requires Interpolate='off' on inport blocks receiving enum data — even with zoh set on the timeseriesThis is a model fix, not a data fix. Use simIn.setBlockParameter(portPath, 'Interpolate', 'off') before simulating

Copyright 2026 The MathWorks, Inc.


FAQ

What does the authoring-simulink-inputs skill do?

Synthesize new waveforms from scratch for Simulink inports using createInputDataset. Use ONLY when the user asks to generate, create, or synthesize signals (step, ramp, sine, chirp, pulse, noise) to populate a Dataset for External Inputs or Signal Editor. Covers timeseries and timetable formats with correct data type, interpolation, units, and dimensions. Also covers function-call and trigger inport timing setup. Do NOT use when the user wants to load, import, or read existing data from files (MAT, CSV, spreadsheet) — even if that data will be used as model input. Do NOT use for running simulations or plotting outputs.

How do I install authoring-simulink-inputs?

Run npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill authoring-simulink-inputs 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/authoring-simulink-inputs/ (personal) or .claude/skills/authoring-simulink-inputs/ (project).

Which AI agents can use authoring-simulink-inputs?

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 authoring-simulink-inputs 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 authoring-simulink-inputs?

It is published by matlab in matlab/simulink-agentic-toolkit. It has 56 recorded installs.

More from matlab/simulink-agentic-toolkit

View all →
matlab avatar

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.

AI & Agents187 installs
matlab avatar

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.

Data & Databases157 installs
matlab avatar

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.

Testing & QA125 installs
matlab avatar

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.

matlab avatar

specifying-mbd-algorithms

matlab/simulink-agentic-toolkit

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.

AI & Agents91 installs
matlab avatar

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.

AI & Agents81 installs

Popular data & databases skills

View category →

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the tests that verify them, indexes, triggers, database functions, queues and scheduled jobs (pgcron, pgmq), vector/semantic search (pgvector), and restoring dumps (pgrestore) or importing data. Also load it when diagnosing slow queries, high CPU, timeouts, EXPLAIN plans, connection exhaustion, locking, bloat, or rows visible to the wrong user or tenant. This is not just a performance guide — schema, migration, security, and SQL authoring tasks need these rules too, even for a one-column change or a single query.

OfficialData & Databases495.1K installs
prisma avatar

prisma-client-api

prisma/skills

Prisma Client API reference covering model queries, filters, operators, and client methods. Use when writing database queries, using CRUD operations, filtering data, or configuring Prisma Client. Triggers on "prisma query", "findMany", "create", "update", "delete", "$transaction".

OfficialData & Databases444.5K installs

Deprecated compatibility name for prisma-orm-setup. Use only when a user or existing integration explicitly invokes prisma-database-setup; otherwise select prisma-orm-setup.

OfficialData & Databases442.4K installs
prisma avatar

prisma-cli

prisma/skills

Prisma ORM 7 CLI reference for existing Prisma 7 applications or explicitly selected Prisma 7 workflows. Covers prisma init, generate, migrate, db, dev, studio, and mcp. For setup, connection repair, or Prisma 8, use prisma-orm-setup; not the Prisma Platform CLI.

OfficialData & Databases441.4K installs
prisma avatar

prisma-postgres

prisma/skills

Deprecated compatibility name for prisma-postgres-setup. Use only when a user or existing integration explicitly invokes prisma-postgres; otherwise select prisma-postgres-setup.

OfficialData & Databases434.1K installs

Obtain or reuse a Prisma Postgres database and connect an application. Use when the user needs a database and has none configured ("I need a database", "add a Postgres database", "set up a database for this app"), runs or mentions create-db or npx create-db, or asks to set up or connect Prisma Postgres, including in v0 and the Vercel Marketplace. Hands Prisma ORM configuration to prisma-orm-setup; reuses an existing connection first and honors an explicit provider, driver, alternative ORM, or database-only choice.

OfficialData & Databases428.8K installs