# Simulink Interactions

> Resolve references to the currently open or selected Simulink context ("this model", "this subsystem", "this block", "selected blocks") and find blocks in an open model. Use whenever the user refers to "this model", "this block", "this subsystem", "selected blocks", or asks to find specific blocks in an already-open model. After resolving context, hand off to the appropriate Simulink skill for ed…

- **Type:** Skill
- **Install:** `agentstack add skill-simulink-skills-simulink-interactions`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [simulink](https://agentstack.voostack.com/s/simulink)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** BSD-3-Clause
- **Upstream author:** [simulink](https://github.com/simulink)
- **Source:** https://github.com/simulink/skills/tree/main/simulink-interactions

## Install

```sh
agentstack add skill-simulink-skills-simulink-interactions
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Simulink Open Model Context Resolution

Resolve what the user is referring to in an already-open Simulink session, then route to the right skill.

## When to Use

- User says "this model", "this block", "this subsystem", "selected blocks"
- User asks to find or locate blocks in the currently open model
- User refers to a model without specifying a file path to open

## When NOT to Use

- Adding, connecting, deleting, or configuring blocks → use `building-simulink-models`
- Running simulations, parameter sweeps, accessing `logsout` → use `simulating-simulink-models`
- Writing pass/fail behavioral tests → use `testing-simulink-models`
- Organizing variables and data dictionaries → use `simulink-data-management`

## Step 1: Resolve the Target

Use `mcp__simulink__evaluate_matlab_code` to resolve references:

| User says | MATLAB expression |
|---|---|
| "this model" | `bdroot(gcs)` |
| "this system" / "this subsystem" | `gcs` |
| "this block" | `gcb` |
| "selected blocks" (plural) | see snippet below |
| "all [Type] blocks in this subsystem" | see snippet below |
| "all [Type] blocks in the model" | see snippet below |

**Always verify the result is non-empty.** If `gcb` or `gcs` returns an empty string, tell the user no block or subsystem is currently selected and ask them to select one or provide a path.

### Selected blocks (plural)

```matlab
opts = Simulink.FindOptions;
opts.SearchDepth = 1;
blks = getfullname(Simulink.findBlocks(gcs, 'Selected', 'on', opts));
if isempty(blks)
    disp('No blocks are currently selected.');
else
    disp(blks)
end
```

### All blocks of a specific type in the current subsystem

```matlab
opts = Simulink.FindOptions;
opts.SearchDepth = 1;
BlockType = 'Gain'; % replace with actual type
blks = getfullname(Simulink.findBlocksOfType(gcs, BlockType, opts));
```

### All blocks of a specific type in the entire model

```matlab
BlockType = 'Gain'; % replace with actual type
blks = getfullname(Simulink.findBlocksOfType(bdroot, BlockType));
```

## Step 2: Hand Off

Once you have the resolved block path(s) or model name, use it as input to the appropriate skill:

| User intent | Hand off to |
|---|---|
| Inspect model structure or topology | `model_read` / `model_overview` |
| Query parameter values | `model_query_params` |
| Resolve variable-backed values | `model_resolve_params` |
| Edit structure or parameters | `building-simulink-models` (via `model_edit`) |
| Run simulation or access results | `simulating-simulink-models` |
| Write or run pass/fail tests | `testing-simulink-models` |
| Organize variables or dictionaries | `simulink-data-management` |

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [simulink](https://github.com/simulink)
- **Source:** [simulink/skills](https://github.com/simulink/skills)
- **License:** BSD-3-Clause

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-simulink-skills-simulink-interactions
- Seller: https://agentstack.voostack.com/s/simulink
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
