Manages RoadRunner connection, project/scene/scenario lifecycle, and handle initialization from MATLAB. Use when connecting to RoadRunner, creating/opening projects, setting world origin, or initializing for downstream RoadRunner workflows.
Ships in automotive. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Foundation skill for all RoadRunner agent workflows. Manages the RoadRunner connection, project/scene/scenario lifecycle, and handle management from MATLAB. Produces the rrApp handle used by all downstream RoadRunner skills.
Execution: all MATLAB code runs via evaluate_matlab_code MCP tool. Never matlab -batch.
rrApp initializationroadrunner class and related APIs are not available in earlier releasesrrApp already exists and is valid — re-running rrAppInitialize is safe (it's idempotent) but unnecessary; prefer checking exist('rrApp','var') first to avoid the overheadrrAppInitialize handles setup automatically using a two-tier approach:
| Tier | Condition | What happens |
|---|---|---|
| 1 | Settings valid + roadrunner class on path | Setup skipped — already configured |
| 2 | Agent has installFolder and projectPath variables | Programmatic setup: addpath, savepath, writes MATLAB settings. No GUI. |
Just run rrAppInitialize. The script automatically:
roadrunner.connect())roadrunner()) using saved settingsPathsRequired — then ask the user for installFolder and projectPath, set them, and re-runOnce setup succeeds, it persists forever (across MATLAB sessions). Never needed again.
No GUI dialogs. This skill never calls roadrunnerSetup. All configuration is done programmatically.
rrAppInitialize can be found):
addpath("<absolute-path-to-this-skill>/scripts");
Replace <absolute-path-to-this-skill> with the actual filesystem path to this skill's directory (the folder containing this SKILL.md file).rrAppInitialize → it handles everything: connects to a running instance, or launches one using saved settings, or errors with a clear message if not configured.PathsRequired → ask the user for installFolder and projectPath, set them as variables, re-run rrAppInitialize.exist('rrApp','var') — if missing, re-run rrAppInitializescripts/rrAppCommands.m under the matching %% headingevaluate_matlab_codeNever improvise API calls. Before every RoadRunner operation, read the matching %% section from rrAppCommands.m and reproduce it exactly. Do not guess function names, argument syntax, or parameter orders from memory. This prevents hallucinated function names, missing guard rails, and forgotten handle invalidation.
If you are unsure of the correct syntax for any operation, stop and read the pattern file before attempting the call.
| File | Role |
|---|---|
scripts/rrAppInitialize.m | Runs directly. Bootstraps path + connection + validation. |
scripts/rrAppCommands.m | Pattern reference. Agent reads %% section, substitutes placeholders, executes. |
On first use, the agent ensures the RoadRunner API is on the MATLAB path (one-time savepath). The scripts in this skill are pattern references — the agent reads them and reproduces the patterns via evaluate_matlab_code.
| User Intent | Pattern (%% section) | Placeholders to substitute |
|---|---|---|
| Connect / initialize | INIT | — |
| Connect without launching | CONNECT_ONLY | — (errors if no instance running) |
| Create a new project | NEW_PROJECT or NEW_PROJECT_WITH_ASSETS | projectPath — ask user whether to include base assets (asset library). Always rrAppInitialize first (RoadRunner must be running with any project before newProject can be called). |
| Open an existing project | OPEN_PROJECT | projectPath |
| Save the project | SAVE_PROJECT | — |
| Create a new scene | NEW_SCENE | — |
| Open a scene | OPEN_SCENE | sceneName — if not found, use LIST_SCENES and present options |
| List available scenes | LIST_SCENES | — |
| Save the scene | SAVE_SCENE or SAVE_SCENE_AS | Ask user: "Save in place, or save with a new name?" If new name → use SAVE_SCENE_AS with sceneName |
| Create a new scenario | NEW_SCENARIO | — |
| Open a scenario | OPEN_SCENARIO | scenarioName — if not found, use LIST_SCENARIOS and present options |
| List available scenarios | LIST_SCENARIOS | — |
| Save the scenario | SAVE_SCENARIO | — |
| Set world origin | CHANGE_WORLD_ORIGIN | lat, lon |
| Set scene center and extents | CHANGE_SCENE_BOUNDS | x, y, w, h |
| Set scene center only | CHANGE_SCENE_CENTER | x, y |
| Set scene extents only | CHANGE_SCENE_EXTENTS | w, h |
| Clear world projection | CLEAR_WORLD_PROJECTION | — |
| Check status | STATUS | — |
| Close RoadRunner | CLOSE | — |
Available From:
changeWorldSettingsrequires R2023b or later. All other operations are available from R2022a.
rrAppInitialize)After first-time setup, rrAppInitialize automatically launches RoadRunner using saved defaults if no instance is running. Manual launch is only needed for non-default modes:
rrApp = roadrunner(ProjectFolder=projectPath, InstallationFolder=installFolder);
| Mode | Add this argument |
|---|---|
| Headless (no UI) | NoDisplay=true |
| No desktop + graphics | NoDesktop=true |
| Custom ports | Ports=[apiPort, cosimPort] |
Manual launch still requires explicit user permission.
These are the variable names used in rrAppCommands.m. The agent substitutes them with actual values before executing.
| Placeholder | Type | Example |
|---|---|---|
SKILL_SCRIPTS_DIR | string | (absolute path to this skill's scripts/ folder) |
rrApp | roadrunner | (from rrAppInitialize, never reassigned) |
projectPath | string | "D:/Projects/HighwayProject" |
sceneName | string | "FourWaySignal.rrscene" |
scenarioName | string | "CutInScenario" |
lat | double | 42.3021 |
lon | double | -71.3747 |
x, y | double | 1445, 1237 |
w, h | double | 160, 465 |
installFolder | string | "C:/Program Files/RoadRunner R2026a" |
This skill produces rrApp via rrAppInitialize. Operations that change state (NEW_SCENE, OPEN_SCENE, NEW_SCENARIO, OPEN_SCENARIO, OPEN_PROJECT, CLOSE) include clear statements to remove stale handles.
RoadRunner API path is added to MATLAB's saved path on first use. No config files or environment variables needed.
The agent runs savepath after adding the API path — this persists across MATLAB sessions. If the user upgrades RoadRunner, the agent detects the failure (roadrunner class missing or version mismatch) and asks for the new installation folder.
rrAppInitialize first — never call RoadRunner APIs without a validated rrApproadrunner(ProjectFolder=...)rrApp per session — never create a second connectionrrAppCommands.m, find the %% section, reproduce it exactly. Do not guess syntax from memory.NEW_SCENE, NEW_SCENARIO, and CLOSE patterns detect unsaved changes but do NOT save automatically. Always ask the user whether to save, save-as, or discard. Saving with the same name overwrites the original and can break backwards compatibility if the file was created with an older version.rrApp.Version and report it. If the user requested a specific version, warn if it doesn't match.openScene or openScenario fails because the name doesn't exist, list available scenes/scenarios using dir and present options to the user<project>/Scenes/clear statementsmatlab -batchclose(rrApp) terminates RoadRunner entirely — the process exits. After close, roadrunner.connect() will fail. A fresh roadrunner() launch is required to reconnect.roadrunner(ProjectFolder=...) when already connected — this launches a duplicate instanceroadrunner.connect(port, port) — use single portrrAppclear statements from the patternsrrAppCommands.m (e.g., no save(rrApp), no saveSceneAs, no switchScenario, no Latitude=lat)rrAppInitializesaveScene(rrApp, name) silently overwrites existing files<RoadRunner Project>/
├── Assets/ 3D models, materials, textures
├── Scenes/ .rrscene files
├── Scenarios/ .rrscenario files
├── Exports/ Exported output
├── Project/ Project metadata
└── Scripts/ User scripts (optional)
newProject creates any missing parent foldersopenProject targets an already-open project, a new blank scene is still created<project>/Scenes/.rrscene extension is optional — RoadRunner appends it if missingsaveScene(rrApp, name) silently overwrites if the name already exists — no confirmationsaveScene(rrApp) on an unnamed (new) scene errors — must provide a name"Scenarios/subfolder/Name")newScenario, openScenario, saveScenario available since R2022a| Parameter | Type | Description |
|---|---|---|
WorldOrigin | [lat lon] | Geospatial world origin |
SceneCenter | [x y] | Center of scene workspace |
SceneExtents | [w h] | Scene workspace dimensions |
ClearWorldProjection | logical | Clear current projection |
Available since R2023b.
rrStatus = status(rrApp);
rrStatus.Project.Filename % Current project path
rrStatus.Project.UnsavedChanges % true/false
rrStatus.Scene.Filename % Current scene path
rrStatus.Scene.UnsavedChanges % true/false
rrStatus.Scenario.Filename % Current scenario path
rrStatus.Scenario.UnsavedChanges % true/false
| Property | Description |
|---|---|
rrApp.InstallationFolder | RoadRunner install path |
rrApp.Version | Version string |
rrApp.NoDisplay | Console mode flag |
rrApp.NoDesktop | No-desktop mode flag |
close(rrApp) does NOT prompt to save — always save before closingroadrunner object — do not reuse the variable after closingroadrunner.connect() will fail (nothing to connect to)roadrunner(), the project is restored but the scene is NOT — a blank scene appearsrrApp = roadrunner.connect(); % Default port 35707
rrApp = roadrunner.connect(portNumber); % Explicit port
| Mode | Syntax | Use case |
|---|---|---|
| GUI (default) | roadrunner(ProjectFolder=...) | Interactive use |
| Headless | roadrunner(ProjectFolder=..., NoDisplay=true) | Batch/CI, no UI |
| No desktop + graphics | roadrunner(ProjectFolder=..., NoDesktop=true) | Export needing render |
| Custom ports | roadrunner(ProjectFolder=..., Ports=[apiPort, cosimPort]) | Multi-instance |
Copyright 2026 The MathWorks, Inc.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/matlab-cosimulate-sumo-simulinkBuild Simulink models that co-simulate with Eclipse SUMO traffic simulator. Use when creating SUMO-Simulink co-simulation, traffic simulation, TraCI connection, vehicle-in-the-loop testing, or ADAS scenario validation with SUMO. Covers Server/Client setup, Reader/Writer/Actor block configuration, random traffic generation, ego vehicle control, and SUMO file creation. Also use when the user mentions SumoInterfaceLibrary, .sumocfg files, or wants to connect Simulink to an external traffic simulator.
/matlab-fit-tire-modelFit a tire model (Magic Formula 6.2/5.2/5.1, Dugoff, or Fiala) to measured tire force and moment data using the Vehicle Dynamics Blockset Extended Tire Features API (tireData.import, tireModel.new, tireModel.fit, tireModel.export). Use when fitting, parameterizing, or calibrating a tire model from tire measurement data (TYDEX, Calspan, MTS, or text/CSV from any test source), creating a .tir file, or building a Magic Formula tire model from test data. Also use for the individual steps: importing TYDEX, Calspan, MTS, or CSV tire data (file extensions `.tdx` for TYDEX; `.data`, `.tim`, `.rsp` for MTS; any other extension read as text) into a tireData object, exporting a tire model to .tir, inspecting, smoothing, cropping, or plotting tire measurement data or a model's response, or converting a fitted model to another type.
/matlab-import-driving-dataImport recorded driving sensor data (GPS, camera, lidar, actor tracks, lanes) into scenariobuilder.* objects (GPSData, CameraData, LidarData, ActorTrackData, Trajectory, laneData) and run preprocessing — synchronize, offset correction, crop, normalizeTimestamps, convertTimestamps. Also: compute actor tracks from lidar when no annotations exist, attach camera/lidar mounting + intrinsics, export to MAT/workspace/timetable/script. Use for raw driving dataset files (KITTI, nuScenes, Waymo, Pandaset, ROS/ROS2 bags, .mat, .csv, .mp4) or driving/vehicle/sensor logs that need wrapping. drivingLogAnalyzer (DLA) is OPT-IN ONLY — invoke only on explicit user request ('DLA', 'open in DLA', 'inspect/explore/analyze the recording') or reported sensor problem (sync drift, timestamp mismatch, overlay misalignment). NEVER auto-launch DLA after wrapping (Rule 0). For 'build scenario / export to RoadRunner / drivingScenario / OpenSCENARIO / Unreal / simulate', hand off to matlab-use-scenario-builder./matlab-use-ncap-protocolGenerate Euro NCAP test scenarios and variants using the ADT Euro NCAP support package. Use when creating NCAP seed scenarios, generating variants, translating between drivingScenario and RoadRunner, plotting scenario descriptors, computing NCAP scores, or exporting reports. Triggers on: ncapScenario, euroAssessment, getScenario, getScenarioDescriptor, generateVariants, ScenarioDescriptor, ScenarioDescriptorPlot, ncapScore, ncapReport, exportReport, configureVUT, assessmentTable, Euro NCAP, CCRs, CCRm, CCRb, CCFtap, CCCscp, CPNA, CPFA, CBNA, variant generation.
/matlab-use-scenario-builderGenerate driving scenes, scenarios, road surfaces, and 3D content from scenariobuilder.* sensor data (GPS, camera, lidar, actor tracks) using Scenario Builder for Automated Driving Toolbox. BUILD, EXPORT, or AUGMENT a virtual scenario/scene/map: ego or actor trajectories, trajectory smoothing, OpenCRG road-surface extraction, 3D asset generation, static-object placement, point-cloud georeferencing + elevation, lane-based ego localization, sensor-fusion tracking, scenario-event extraction (cut-ins, hard brakes, near-misses, ADAS disengagements), or export to RoadRunner, drivingScenario, OpenDRIVE, OpenCRG, OpenSCENARIO, or Unreal Engine. Also: log-to-scenario, scenario harvesting, accident/near-miss reconstruction, SOTIF (ISO 21448) and ISO 26262 scenario coverage, USGS-aerial-lidar augmentation, traffic-sign placement, vision-based vehicle classification for actor assets. NOT for raw-data import or multi-sensor sync/crop/offset/timestamp normalization — route those to matlab-import-driving-data./roadrunner-author-scenarioCreate and edit RoadRunner scenarios in MATLAB with roadrunnerAPI: add actors, routes and phase logic, validate and repair a scenario, or recreate an OpenSCENARIO 1.x (.xosc) file as an editable scenario. Use when building a RoadRunner scenario from a description (cut-in, pedestrian crossing, lead-follow and similar), fixing one that fails validation, or rebuilding, recreating or converting a .xosc file in MATLAB. Do NOT use when the user says "import" a .xosc file — call importScenario instead. Not for exporting to OpenSCENARIO, simulation (use roadrunner-simulate-scenario), recorded sensor data (use matlab-use-scenario-builder), Euro NCAP protocol tests (use matlab-use-ncap-protocol), drivingScenario/Driving Scenario Designer scenarios, or OpenSCENARIO 2.x (.osc) files. Triggers on: roadrunnerAPI, RoadRunner scenario authoring, add actor, create route, phase logic, cut-in scenario, pedestrian crossing, scenario from MATLAB, OpenSCENARIO, xosc to MATLAB, recreate xosc.
/automotive:roadrunner-manage-projectfrom automotive
npx claudepluginhub matlab/matlab-agentic-toolkit --plugin automotiveOther plugins' skills for the same job