matlab/matlab-agentic-toolkit/matlab-discover-hardware
Claude Code and agent skill by matlab/matlab-agentic-toolkit
- community
Checking that the SKILL.md file is still in the repository.
Discovers connected MATLAB-supported hardware devices, searches by capability, and checks required support packages and add-ons. Use when the user asks what hardware is connected, finds a device that supports a capability (e.g., CAN, analog input), or checks if required support packages or add-ons are installed. Does NOT connect to, configure, or acquire data from devices — defers to device-specific skills for usage workflows.
Install
npx vskill@latest install matlab/matlab-agentic-toolkit/matlab-discover-hardwareSKILL.md
Hardware Discovery
1. What this skill is for
Use this skill to perform hardware discovery tasks from natural language: list connected devices, search by capability, inspect a device's details and capabilities, and check if required support packages or add-ons are installed.
This skill exposes hardware discovery functionality through MATLAB helper functions bundled in scripts/. Always use the provided helpers — do not attempt to replicate their behavior or call any internal MATLAB functions directly.
When To Use
Activate this skill when the user asks about:
- What hardware is connected or available (e.g., "what's plugged in?", "what devices do I have?")
- Which devices support a given capability (e.g., "what supports CAN?", "which devices can do analog input?")
- Details or capabilities of a specific device (e.g., "tell me about the Arduino Due", "what can the NI USB-6211 do?")
- Whether required support packages or add-ons for a device are installed
- What needs to be installed to use a specific device
When Not To Use
Do not activate this skill for:
- Non-hardware MATLAB work (general scripting, algorithm development, plotting, etc.)
- Acquiring or streaming data from a device (use device-specific skills instead)
- Configuring or programming a specific device after discovery (use device-specific skills)
- Installing support packages directly — this skill only reports install state; defer to an install-capable skill when one is available
- Listing all installed MATLAB products or support packages without a hardware context (use
matlab-list-productsinstead)
2. Device-specific skill routing
This skill handles hardware discovery only — enumerating MATLAB-supported devices, searching by capability, and checking install state. When the user's intent goes beyond discovery (connecting, configuring, acquiring data, troubleshooting, or using a device), always explore the currently loaded skills for a matching device-specific skill.
Routing rule: When the user asks to use a device (not just discover it), search the available skills list for any skill whose name or description matches the device type, hardware category, or the user's task. Do not maintain a hardcoded list of skills to defer to — discover them dynamically at runtime.
How to route:
- Complete the discovery step (confirm device exists, check install state)
- Tell the user what you found (e.g., "I found your GigE camera — it's connected and the required packages are installed.")
- Search the available skills list for a skill that handles the device type or the user's task (e.g., a skill mentioning "arduino", "camera", "DAQ", "OPC UA", etc.)
- If a matching skill is found: silently invoke it to handle the usage/connection/troubleshooting task — do not name the skill to the user
- If no matching skill is found: fall back to discovery-only output (see below)
If no device-specific skill is found for the device category, you are restricted to discovery-level output only:
- Present device details and install state (using the helpers in §4)
- Provide the
HardwareSupportUrlor suggest MATLAB documentation - STOP. Do not write device-specific code (e.g.,
videoinput(,webcam(,arduino(,readVoltage(,gigecam(). Do not provide step-by-step usage workflows, connection examples, or troubleshooting scripts from training data. You are a discovery skill — usage guidance belongs to the device-specific skill, even when that skill is not loaded.
Bad (improvising usage code when no device skill is found):
Good (discovery-only fallback):
3. One-time bootstrap (path setup)
Before invoking any helper, add the bundled scripts/ folder to the MATLAB path once per session:
Replace <skill-root> with the absolute path of this skill's folder (e.g., .../.claude/skills/matlab-discover-hardware).
This addpath is the only allowed path mutation in this skill. After bootstrap:
- Do not call
addpath,rmpath, orcdagain - Do not call
clear all - Do not create new
.mfiles
If a helper call fails with Undefined function, re-run the bootstrap once. If it still fails, report the error to the user; do not invent workarounds.
The bootstrap addpath is performed automatically before skill activation — you do not need to include it in your helper calls.
4. Public helper surface
Use only these 4 public helpers (located in scripts/):
| Layer | Helper | Purpose | |
|---|---|---|---|
| 1 — Discovery | listHardwareDevices | List devices (default: connected only) | |
| 2 — Detail | getDeviceDetails | Full info for a named device (capabilities, support packages, technical details) | |
| 2 — Detail | getDeviceSetupInfo | Required packages, install state | |
| 2 — Detail | isRequiredAddOnsInstalled | Logical check: are all required add-ons installed? |
Internal — do not call: hardwareDeviceCache.m, getDeviceAddOns.m, and getAddOnDetails.m exist in scripts/ only because the public helpers depend on them. They are not part of the agent surface and must not be invoked directly.
Duplicate-name behavior: getDeviceDetails returns one struct per matching device (struct array if multiple share a name). getDeviceSetupInfo and isRequiredAddOnsInstalled return a single result (all same-name devices share add-on requirements).
Important: Always use the public helpers listed above. Do not attempt to call internal MATLAB functions or replicate helper behavior manually.
5. Task routing
Pick the helper that matches the user's intent. Combine all calls for a task into the minimum number of `evaluate_matlab_code` invocations (see §6 for batching recipes).
| User intent | Helper(s) to call | |
|---|---|---|
| "What hardware do I have?" / "What's connected?" | listHardwareDevices | |
| "Which devices support X?" (capability search) | listHardwareDevices(Capability=keyword) | |
| "Tell me about <device>" / "What can <device> do?" | getDeviceDetails(deviceName) + isRequiredAddOnsInstalled(deviceName) | |
| "How do I use <device>?" / "I can't connect to <device>" / "How do I acquire data from <device>?" | Defer to device-specific skill (§2). Run discovery + install-state check first, then hand off. Only use this skill's helpers if no device-specific skill is loaded. | |
| "What do I need to install for <device>?" / "What is required to use <device>?" / "Can I use <device>?" | getDeviceSetupInfo(deviceName) | |
| "Are the add-ons for <device> installed?" | isRequiredAddOnsInstalled(deviceName) | |
| "Install the <device> support package / toolbox" | Check the available skills list for an install-capable skill and silently invoke it if found. Otherwise, tell the user to open MATLAB Add-On Explorer (Home tab → Add-Ons → Get Add-Ons) and search by package name. | |
| Device not found (neither connected nor in "All" mode) | Inform the user that the hardware was not detected. Do not guess what products are needed. Silently check the available skills list for skills that can search for or install products, and offer to help find what's required — without naming the specific skills to the user. |
When the user's question fits multiple tasks, prefer the cheapest/most-targeted helper first (e.g., listHardwareDevices(Capability=...) before getDeviceDetails).
6. Workflow patterns and batching
Critical: minimize MCP round-trips
Each evaluate_matlab_code call is an MCP round-trip that requires user approval. Batch multiple helper calls into a single `evaluate_matlab_code` invocation whenever possible. The helpers share an internal cache (60 s TTL), so calling them sequentially in one script is efficient.
Rules:
- Combine Layer 1 + Layer 2 calls when you already know the device name
- Combine install-state checks with the detail call that precedes them
- Target 1–2 MCP calls total for any single user question
Batching recipes
Recipe A: "What hardware is connected?" (1 MCP call)
Recipe B: "Tell me about <device>" / "What can <device> do?" (2 MCP calls)
Call 1 — discover (to confirm device exists):
Call 2 — details + install-state check (combined):
If the user names the device directly and you are confident in the name (e.g., they typed "Arduino Due"), skip Call 1 and do everything in a single call:
Multi-result handling: getDeviceDetails returns a struct array when multiple devices share the same name (e.g., two "Kvaser Virtual" channels). If numel(details) > 1, do not present all results — instead trigger the disambiguation flow (§6 Plain-text disambiguation) using ConnectionInfo or other distinguishing fields from each element's BasicInfo.
Recipe C: "What do I need to install for <device>?" (1 MCP call)
Recipe D: Capability search (1–2 MCP calls)
If results are found and user wants details, follow with Recipe B Call 2.
Discover-then-detail
Call a Layer 1 helper (listHardwareDevices or listHardwareDevices(Capability=...)) before drilling into a Layer 2 helper. Do not guess device names. Exception: if the user explicitly names a device, skip discovery and go directly to Layer 2 (see Recipe B single-call variant).
Capability-first search
When the user describes a task ("I want to read CAN messages"), call listHardwareDevices(Capability="CAN") before naming a specific device.
If the capability search returns no results, do not guess alternative keywords or invent suggestions from your own knowledge. Instead:
- Call
listHardwareDevices()to show all connected devices - Present the list to the user and ask which device they intended to use for the task
- Once the user identifies a device, proceed with the Install-state check workflow
Install-state check
When the user asks what they need for a device, or asks how to use / whether they can use a specific device, use Recipe C (getDeviceSetupInfo includes the install-state boolean). If packages are missing, list them by human-readable name. Silently check the available skills list for an install-capable skill — if one exists, offer to install on the user's behalf without naming the skill. Only fall back to telling the user to open MATLAB Add-On Explorer (Home tab → Add-Ons → Get Add-Ons) if no such skill is available.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills-catalog/test-and-measurement/matlab-discover-hardware/SKILL.md
Popularity
- Repository stars
- 1,029
- Repository forks
- 128
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/matlab/matlab-agentic-toolkit/matlab-discover-hardware)