Skip to main content
ClaudeWave
Skill173 repo starsupdated 24d ago

matlab-create-course-activity

Create MATLAB Course Designer MATLAB Exercise learning activities by wrapping the existing matlab-generate-grader-assessments skill, then validating generated solution.m, template.m, and tests.m files with MATLAB MCP Server tool calls. Use when the user asks to create a MATLAB Exercise, MATLAB course activity, Course Designer MATLAB activity, validated MATLAB solution file, or MATLAB Exercise component folder.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/matlab/agent-skills-playground /tmp/matlab-create-course-activity && cp -r /tmp/matlab-create-course-activity/demos/course-generation/skills/matlab-create-course-activity ~/.claude/skills/matlab-create-course-activity
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# MATLAB Course Activity Generator

Create MATLAB Course Designer-ready MATLAB Exercise learning activities. This skill is
a wrapper around the existing `matlab-generate-grader-assessments` skill: use `matlab-generate-grader-assessments` first to create the
shared MATLAB Grader-style component parts, then use MATLAB MCP Server tool
calls to validate the generated MATLAB files and add Course Designer authoring
metadata.

## Input

The user may have provided a module objective or activity idea in their request.
If it is missing or too vague, collect missing activity inputs in Step 1.

## Reference Files

Read these references from the `references/` directory as needed:

- `references/grader-wrapper-workflow.md` — how to call and use `matlab-generate-grader-assessments`
- `references/matlab-validation-rules.md` — MATLAB MCP validation workflow
- `references/course-designer-artifacts.md` — output folder and metadata rules

Read `references/grader-wrapper-workflow.md` and
`references/course-designer-artifacts.md` before creating artifacts.

## Required Tooling

Use the existing `matlab-generate-grader-assessments` skill for the initial component generation. Use
MATLAB MCP Server calls for validation:

- `detect_matlab_toolboxes` for product/toolbox availability
- `check_matlab_code` for static analysis of `.m` files
- `run_matlab_file` for runnable scripts, validation drivers, or test harnesses
- `evaluate_matlab_code` for targeted checks, path setup, function calls, and
  MATLAB Exercise test smoke checks

Do not claim a MATLAB Exercise is ready unless the generated MATLAB files have
been checked through MATLAB MCP calls or the final output clearly marks
validation as partial.

## Pipeline Overview

```
Step 1: Collect activity inputs and Course Designer placement
Step 2: Invoke grader for shared MATLAB Exercise component parts
Step 3: Split description.txt into background.m and task.m
Step 4: Add Course Designer-only authoring fields
Step 5: Validate solution.m, template.m, and tests.m with MATLAB MCP calls
Step 6: Write Course Designer-ready activity metadata and review notes
```

## Step 1: Activity Inputs

Collect only missing information:

- Course title or course identifier
- Module title and module order
- Learning activity title and activity order
- Module objective and observable learner outcome
- MATLAB concept: script, function, class, object usage, data analysis,
  visualization, numerical methods, app workflow, or another domain
- Assessment purpose: formative, summative, or both
- Required MATLAB and toolbox products
- Starter/template expectations
- Solution behavior
- Validation requirements
- Output directory

Default to a Course Designer learning activity type of `MATLAB Exercise`.

## Step 2: Invoke `matlab-generate-grader-assessments`

Use `references/grader-wrapper-workflow.md`.

Call or prompt the existing `matlab-generate-grader-assessments` skill before creating Course Designer
metadata. The expected `matlab-generate-grader-assessments` output is:

- `description.txt`
- `template.m`
- `solution.m`
- `tests.m`
- `function_call.m` (Function assessment items)
- `supporting_class.m` (Object usage assessment items)

Store the `matlab-generate-grader-assessments` output under:

```text
grader-items/module-NN-activity-MM-[slug]/
```

`[slug]` is the assessment item's snake_case title with underscores replaced by
hyphens. This wrapper placement overrides the generator's standalone
`{snake_title}/` folder rule.

Do not hand-write these files first. If `matlab-generate-grader-assessments` is unavailable, stop and report
that MATLAB Exercise generation is blocked unless the user explicitly accepts a
planning-only fallback.

## Step 3: Split Description for Course Designer

Create two plaintext `.m` files from `description.txt` for copy/paste into the
MATLAB Course Designer web application:

Per the MATLAB Course Designer documentation for creating MATLAB Exercises:
https://www.mathworks.com/help/matlab-and-simulink-online-courses/ug/create-matlab-exercise-using-matlab-course-designer.html

- The Background field sets the context for the task, explains the learning
  objective, and provides high-level information learners need to complete the
  task.
- The Task field provides the instructions learners follow to complete the
  task, including specific instructions such as which functions or variable
  names to use.

Treat `background.m` and `task.m` as plain-text field transport files, not
executable MATLAB scripts. Preserve the text exactly as it should be pasted into
Course Designer. Do not prefix prose with `%` solely to make the files valid
MATLAB code.

Split workflow:

1. Read `description.txt` once and mark each paragraph as context, objective,
   prerequisite, instruction, deliverable, constraint, self-check, or grading
   detail.
2. Put only context, purpose, learning objective, and necessary high-level
   prerequisite information in `background.m`.
3. Put concrete learner instructions, ordered task steps, deliverables, required
   variable/function/file names, constraints, expected outputs, and self-check
   prompts in `task.m`.
4. Move implementation details out of `background.m` and into `task.m`.
5. Move broad conceptual exposition out of `task.m` unless it is needed to
   understand a specific instruction.
6. If `description.txt` has no clear boundary, create a concise background from
   the opening context and put the full actionable prompt in `task.m`.
7. Keep hidden-test details, reference solution details, and grading mechanics
   out of both files unless they are intentionally learner-facing.
8. Do not modify the original `description.txt`; keep it in the `matlab-generate-grader-assessments` source
   folder.

Quality check:

- `background.m` should still make sense if read before seeing the task steps.
- `task.m` should be actionable without duplicating the full background.
- Both files should be ready to paste into Course Designer text fields without
  cleanu
embedded-ai-deploymentSkill

>

agent-skill-authorSkill

Use this skill when the user wants to author, design, scope, or refine an Agent Skill (a SKILL.md file). Trigger phrases include "build a new skill", "design an agent skill", "scope a SKILL.md", "how should I structure this skill", "write a skill for X", "my skill isn't working well", or any request to improve an existing SKILL.md. Walks the user through an empirical, test-first process — probe the agent for real failures, design only for genuine knowledge gaps, iterate against runnable examples, and verify across models.

matlab-projectSkill

Use this skill for any work involving a MATLAB Project (.prj file) — creating a new project, tracking files, managing the project path, configuring Simulink cache and code-generation folders, running project health checks, or writing build scripts that keep the project in sync with the file system. Trigger phrases include "set up a MATLAB project", "create a .prj", "track this file in the project", "project health check", "build script conventions". This skill is the generic foundation; domain-specific skills (e.g. `mbse-workflow`) build on it.

mbse-architectureSkill

Use this skill for the architecture phases of an MBSE workflow in MATLAB, when writing idempotent buildXxx.m scripts that produce a three-layer RFLPV architecture (Functional, Logical, Physical) with interface dictionaries, stereotype profiles, allocation sets, and requirements Implement links. Trigger for defining stereotype properties, functional-to-logical / logical-to-physical allocation, mapping requirements to components via slreq Implement links, or running quantitative roll-up analysis on the architecture. Do NOT trigger for ad-hoc structural edits to an already-built System Composer model (adding one component, rewiring a port) — use `building-simulink-models` with `model_edit` for that. Works alongside the `system-composer` skill for detailed SC API patterns.

mbse-workflowSkill

Use this skill for guided MBSE work in MATLAB — starting a new project, resuming work mid-workflow on an existing project, or answering orientation questions about how the MBSE skills fit together. Trigger when the user says they want to create, start, or set up a new MBSE project; work on a model-based systems engineering / RFLPV project; or asks which skill covers which phase. Walks through phases one at a time — propose → approve → generate → run → confirm. Use proactively whenever someone mentions starting or continuing an MBSE project.

simulink-requirementsSkill

Use this skill for all requirements-related work in a MATLAB MBSE project using the Requirements Toolbox (slreq). Covers creating and populating requirement sets, derivation links, test case requirements, verification coverage, reading and tracing links across requirement sets and models, checking link health, allocating requirements to components (Implement links), and building traceability reports. Trigger when the user asks about slreq API, slreqx files, slmx link files, outLinks/inLinks, traceability matrices, coverage analysis, broken links, or mapping requirements to architecture components. Use proactively for any requirements or traceability task.

system-composerSkill

Use this skill when authoring reusable, idempotent MATLAB scripts that build System Composer architecture models via the architecture-modeling API — `systemcomposer.createModel`, `addComponent`, `addPort`, `setInterface`, `connect(srcPort, dstPort)`, interface dictionaries (.sldd) with `addInterface`/`addElement`, profiles/stereotypes with `Profile.createProfile` and `addStereotype`, or `systemcomposer.allocation.createAllocationSet`. Also trigger when debugging these APIs (connections that don't appear, interfaces that don't resolve, profile save errors, `createAllocationSet` signature-mismatch errors). Do NOT trigger for ad-hoc structural edits to an already-built model (adding one SubSystem, rewiring a port) — use `building-simulink-models` with `model_edit` for that.

matlab-performance-optimizerSkill

Optimize MATLAB code for better performance through vectorization, memory management, and profiling. Use when user requests optimization, mentions slow code, performance issues, speed improvements, or asks to make code faster or more efficient.