
simulink-configure-code-interfaces
Use the skill to control and verify the code interface configuration of your model — how Simulink® model elements are represented in the generated C or C++ code. This includes — (1) specifying names, types (storage classes), and placement of variables that represent model elements (for example, making a model parameter tunable as a global extern variable); (2) specifying names, types, and placement of functions that represent model algorithms; (3) selecting the deployment type (Component, Subcomponent, or Automatic); (4) selecting the interface configuration type (data or service interface); (5) linking a shared Embedded Coder dictionary to a model; (6) creating Embedded Coder dictionary entries and setting their properties; (7) for service interface configuration — specifying service interface definitions, including sender, receiver, client, and server services. Items 1 and 2 can be set per element or as a category-wide default. Item 1 applies to GRT and ERT models; the rest to ERT mo
- Installs
- 0
- 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 simulink-configure-code-interfaces- 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 simulink-configure-code-interfaces 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.
Configuring Code Interfaces
Configure how model elements map to generated code — storage classes for elements in models configured with data interface configuration, and service interfaces for elements in models configured with service interface configuration.
Prerequisite: For full functionality of the skill (such as function mapping, specifying the deployment type, and using service interface configuration),
the model needs to be configured with the ERT system target file (SystemTargetFile = "ert.tlc", or an ERT-based derivative such as ert_shrlib.tlc or a vendor ERT target). When the model is configured with the GRT system
target file (SystemTargetFile = "grt.tlc"), only basic configuration operations such as specifying the storage class of model elements are supported. To configure the model with the ERT system target file, use the neighboring skill simulink-configure-model-for-code-generation.
Requires:
- For models configured with the GRT system target file, a Simulink® Coder license is required.
- For models configured with the ERT system target file, an Embedded Coder® license is required.
When to Use
- When setting storage classes for inports, outports, states, or parameters through code mappings. If the project assigns storage classes through data objects instead (such as
Simulink.ParameterorSimulink.Signal), that is a different workflow — seereferences/code_mapping.md, which also covers the one case that must be configured on the object. - When specifying the code representation of signals, states (such as values that Unit Delay and Integrator blocks hold between steps), parameters, or data stores. For example, when mapping a model element in this category to a global or extern variable, or when placing its declaration in a designated
.hor its definition in a designated.cfile. These requests map model elements to storage classes even when the user never explicitly says "storage class" or "code mapping". - When making a parameter tunable in the generated code (a global parameter that the rest of the software can read and update).
- When mapping function names. This happens when the user explicitly names generated entry-points or any other type of generated functions. For example: "make the startup routine be called
mFunctions_startup". - When specifying data defaults or function defaults for code generation.
- When configuring the model with either data or service interface configuration for code generation.
- When linking a shared Embedded Coder dictionary to a model.
- When configuring sender-receiver or client-server interface patterns.
- When setting deployment types and function prototypes for generated code.
- When inspecting or verifying the current model interface. For example: "is this model set up for data interface or for service interface?", or "did my dictionary link take effect?"
When NOT to Use
- When configuring non-mapping-related aspects of the model for code generation (such as specifying the target platform, hardware, or objective). For these purposes, use the skill
simulink-configure-model-for-code-generation. - When opening, editing, or building a model or its structure. For these purposes, use the skill
building-simulink-models. - When customizing the exported A2L (ASAP2) calibration file — COMPU_METHODs, GROUPs, STD_AXIS→COM_AXIS, BIT_OPERATIONs, or VARIANT_CODING. For these purposes, use the skill
simulink-customize-a2l(coder.asap2.*). This skill owns the model-side calibration attributes that code mappings carry (Export,CalibrationAccess,BitMask,CompuMethod,DisplayIdentifier,Format) and that the A2L export then reads; it does not edit the A2L file. - When the code generation target is not C/C++ through Simulink Coder or Embedded Coder. For example, when it is one of these:
- HDL Coder, which uses
hdlcoder.*APIs and generates VHDL/Verilog. - Simulink PLC Coder, which generates IEC 61131-3 Structured Text.
- MATLAB Coder or GPU Coder, which generate C/CUDA code from MATLAB functions (these do not generate code from Simulink models).
- HDL Coder, which uses
- When using an API surface that does not rely on
coder.mapping.*orcoder.dictionary.*. The generated code is still C or C++, but uses different mapping APIs. For example, when the API surface is one of these:- AUTOSAR Classic or AUTOSAR Adaptive (
autosar.api.*). For authoring a Classic AUTOSAR software component — including its port, data, and service interface configuration — use the skillsimulink-author-classic-autosar-swc. - DDS (Data Distribution Service) code mapping
- C++ class code interface packaging (
SystemTargetFile = "ert.tlc"andCodeInterfacePackaging = "C++ class").
- AUTOSAR Classic or AUTOSAR Adaptive (
- When deploying the generated code for Embedded Linux.
This skill covers C Data Interface configuration when using Simulink Coder or Embedded Coder. The skill also covers C Service Interface configuration when using Embedded Coder.
Critical Guardrails
- Read-only inspection needs no permission — run it. Queries that do not modify the model or dictionary —
introspect_api,find(cm,...),model_read/model_query_params,getModelParameter/getDeploymentType/getDataStore,coder.dictionary/coder.mappinggetters — are safe. Run them freely to diagnose, detect mode, and verify; never stop to ask before a read. The confirmation gate below applies only to writes (save_system,slbuild,addEntry/set(entry,...)). - Call
introspect_api(inscripts/) BEFORE assigning any storage class, service, deployment type, or per-element property. It returns allowed values, valid properties, and the current mode (DataInterface vs ServiceInterface). This is a required first step — do NOT discover valid values by trial-and-error or repeated probing calls. Enumerate first, then set the value you learned is valid. - NEVER save or build the model on your own — always ask the user first. Do not call
save_systemorslbuild(or setGenCodeOnlyand build) without explicit user confirmation. Saving overwrites the user's model/dictionary on disk; building can be long-running and writes generated code. Configure the mappings, report exactly what you changed, ask, and wait for a yes. - STOP before creating any dictionary entry — do not write
addEntry/set(entry,...)until the user provides the actual values (pragmas, storage classes, interface entries encode project intent). - Link a shared Embedded Coder dictionary through
EmbeddedCoderDictionaryonly, and only throughmodel_edit(aconfigureop onconfig:<ModelName>). Never setDataDictionaryto bring in a coder dictionary — it fails silently, leaving the model resolved toDataInterface. Do not reach forset_param/get_paramon either parameter. Seereferences/coder_dictionary.md. - NEVER edit generated code — it is overwritten every build. All changes go to the model, code mappings, or dictionary.
- Do not manufacture configuration the user did not ask for. A Data Interface model builds from a default code interface with no code mapping object; create mappings only to override defaults.
- Configuring a parameter's storage class — pick the mechanism by where the parameter lives. Model workspace → always code mappings (
setModelParameter), even on GRT; never set.StorageClasson the object. External parameter object (base workspace or data dictionary) →.StorageClasson the object;setModelParametercannot address it. Seereferences/code_mapping.md. - Confirm any model-design or configuration change that a requested interface change depends on — before making it. Some code-interface configurations cannot be applied on the model as-is and require a prerequisite change to the model's design or configuration (for example, switching GRT→ERT for function mapping, deployment types, or Service Interface; requiring a fixed-step solver; converting to an export-function model). Such a change can alter or prevent code generation. Do not apply it silently — explain what the interface change requires, why, and wait for the user's yes.
Reference Files
references/simulink-configure-code-interfaces.md— mode selection, per-mode workflows, deployment types, per-model mappings in a model-reference hierarchy, and the end-to-end "fresh model → generated code" spinereferences/code_mapping.md—coder.mapping.*API: storage-class mechanisms, port/state mapping, function naming/prototypes, silent-failure detection and verification patternsreferences/coder_dictionary.md—coder.dictionary.*API: creating/linking dictionaries, entries and their properties (getAvailableProperties), communication methods
Copyright 2026 The MathWorks, Inc.
FAQ
What does the simulink-configure-code-interfaces skill do?
Use the skill to control and verify the code interface configuration of your model — how Simulink® model elements are represented in the generated C or C++ code. This includes — (1) specifying names, types (storage classes), and placement of variables that represent model elements (for example, making a model parameter tunable as a global extern variable); (2) specifying names, types, and placement of functions that represent model algorithms; (3) selecting the deployment type (Component, Subcomponent, or Automatic); (4) selecting the interface configuration type (data or service interface); (5) linking a shared Embedded Coder dictionary to a model; (6) creating Embedded Coder dictionary entries and setting their properties; (7) for service interface configuration — specifying service interface definitions, including sender, receiver, client, and server services. Items 1 and 2 can be set per element or as a category-wide default. Item 1 applies to GRT and ERT models; the rest to ERT mo
How do I install simulink-configure-code-interfaces?
Run npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill simulink-configure-code-interfaces 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/simulink-configure-code-interfaces/ (personal) or .claude/skills/simulink-configure-code-interfaces/ (project).
Which AI agents can use simulink-configure-code-interfaces?
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 simulink-configure-code-interfaces 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 simulink-configure-code-interfaces?
It is published by matlab in matlab/simulink-agentic-toolkit. It has 0 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.
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.
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.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.