Use when the user wants to use Arduino sensors or peripherals from MATLAB that are not directly supported by the MATLAB Support Package for Arduino Hardware. Triggers on requests to create, wrap, or expose a custom Arduino library to MATLAB. Also triggers on indirect questions like "How do I read humidity in MATLAB?" or "How do I display text on an LCD from MATLAB?" where the answer requires a custom Arduino add-on library. Covers: custom addon creation, third-party Arduino library integration,
SkillScore91Maintained
Automatic
◆Coding pack
Last verified 8/16/2026
What it changes
Passed 18 of 20 test cases with the skill, and 5 of 20 without it.
Without skill27%
With skill91%
Checks it passed that the model alone missed
Omits #include <Wire.h> from the custom C++ header file.
Specifies {'DHT/DHT.h'} for the LibraryHeaderFiles property.
Specifies sending at least 1 byte in C++ sendResponseMsg calls.
and 17 more in the full report
14 fixed6 passed either way2 still failing0 broke
Pass-rate lift
+64 pp
Tokens
+103%
Agent turns
0%
Response time
-42%
Model gemini-3.6-flashMeasured 8/16/2026v120 of 22 cases passed with skill · 20 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 12
Prompt
I am configuring the MATLAB class wrapper for a custom I2C sensor addon that uses MATLAB's hardware I2C bus. I am tempted to set DependentLibraries = {'Wire'} or DependentLibraries = {'I2C'} in my class definition. Which exact array value should I set for MATLAB bus dependency?
What was checked, without and with the skill
Checked
Without skill
With skill
Specifies {'I2C'} instead of {'Wire'} as the DependentLibraries entry.
Missed
Passed
case-06 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md278 lines4 files
Create Custom Arduino Library
Help the user interface with Arduino sensors or peripherals from MATLAB by creating
a custom arduino library that bridges MATLAB and Arduino C++ code.
When to Use
User wants to read sensors not natively supported (DHT11, DHT22, IMU, air quality)
User wants to control peripherals not natively supported (OLED displays, motor drivers, NeoPixels)
User asks "How do I use [sensor/actuator/peripheral] from MATLAB with Arduino?"
User wants to wrap an existing Arduino C++ library for MATLAB access
User mentions LibraryBase, arduinoioaddons, or custom addon creation
When NOT to Use
Peripheral is already supported natively (use listArduinoLibraries to check)
User needs to discover or connect to an Arduino board (see matlab-connect-arduino)
User wants generic I2C/SPI communication (built-in)
User wants to deploy standalone Arduino code (no MATLAB connection)
User wants Simulink Arduino deployment (different workflow)
User wants to fix Arduino hardware setup screens
Workflow
MANDATORY GATE — do not skip, but keep it fast:
Before creating a custom addon, you MUST run Steps 0 and 1 below. These are quick
checks (one MATLAB command + one sentence about File Exchange), not deep research.
Report findings in 1-2 lines and move on. If native support or a community addon
exists, stop. Otherwise proceed to Step 2 immediately.
STEP 0: Check Native Support (ALWAYS DO FIRST)
listArduinoLibraries
If the peripheral is in the list, tell the user and STOP. Do NOT proceed to Step 2
or beyond. Do NOT generate custom library code. Common built-in:
I2C, SPI, Serial, Servo, RotaryEncoder, Ultrasonic, ShiftRegister