Skip to content

matlab/agent-skills-playground / demos/course-generation/skills/simulink-create-course-activity

simulink-create-course-activity

Verified

Create MATLAB Course Designer Simulink Exercise learning activities with starter and solution Simulink model files. Use when the user asks to create a Simulink activity, Simulink Exercise, starter model, solution model, model-based learning activity, or Course Designer-ready Simulink artifact. Uses MATLAB MCP Server tool calls and Simulink Agentic Toolkit guidance to create, inspect, edit, simulate, and validate model files.

references/model-generation-workflow.md

View on GitHub
# Model Generation Workflow

Use this workflow to create the solution and starter `.slx` files for a
Simulink Exercise learning activity.

## Build Order

1. Build the solution model first.
2. Validate the solution topology and simulation behavior.
3. Copy the solution model to create the starter model.
4. Remove or replace only the learner-completed elements.
5. Validate the starter scaffold.

## MCP Tool Use

Use MATLAB MCP calls to create/open/save models and handle setup scripts:

```matlab
new_system(modelName);
open_system(modelName);
save_system(modelName, fullfile(activityFolder, modelFileName));
```

Use Simulink model tool calls through the MATLAB MCP Server for model structure:

- `model_overview` for high-level hierarchy and interfaces.
- `model_read` before and after edits to inspect topology and block behavior.
- `model_edit` for adding, connecting, deleting, replacing, or configuring
  blocks. Always include `layout_mode`.
- `model_query_params` for block, signal, and model configuration parameters.
- `model_resolve_params` for workspace variable references.

Follow these editing rules:

- Use `model_edit`, not ad hoc `add_block` or `set_param`, for structural edits
  when the MCP tool can do the job.
- If `model_edit` returns partial status, immediately inspect with `model_read`.
- Use one model scope per `model_edit` call.
- Use code-generation-safe names for blocks, signals, variables, and files.
- Put tunable parameters in an included init script or the model workspace.
- Keep activity-specific files in the activity folder.

## Starter Model Patterns

Choose one scaffold pattern:

- **Missing block:** Remove a block and leave named in/out signals or comments.
- **Incomplete subsystem:** Provide a subsystem shell with ports and comments.
- **Parameter completion:** Replace key parameter values with named variables or
  placeholders learners set.
- **Connection task:** Provide blocks but omit a small number of connections.
- **Experiment task:** Provide a complete model but require parameter sweeps and
  interpretation.

The starter model must open without missing dependencies. If a missing element
is intentional, document it in `activity.md`.

## Solution Model Requirements

The solution model must:

- Implement the intended behavior completely.
- Include required init scripts, data, or model workspace variables.
- Use stable signal names for validation.
- Save cleanly as `[activity-slug]_solution.slx`.
- Be inspectable with `model_read` or `model_overview`.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall