
Arduino Cli Skill
- 47 installs
- 19 repo stars
- Updated May 26, 2026
- wedsamuel1230/arduino-skills
Helps with ai & agent building tasks.
About
arduino-cli-skill is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- arduino-cli-skill
- AI & Agent Building
- AI-coding skill
Arduino Cli Skill by the numbers
- 47 all-time installs (skills.sh)
- +7 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #7,487 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 1, 2026 (Skillselion catalog sync)
npx skills add https://github.com/wedsamuel1230/arduino-skills --skill arduino-cli-skillAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 47 |
|---|---|
| repo stars | ★ 19 |
| Last updated | May 26, 2026 |
| Repository | wedsamuel1230/arduino-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
Arduino CLI Skill
Provide cross-platform arduino-cli workflows and command references.
Resources
references/commands.md- board, core, library, compile, and upload commandsreferences/serial-ports.md- OS-specific serial port discoveryrules/common-pitfalls.md- common command mistakes and recovery guidanceexamples/README.md- runnable command sequences../../docs/board-support/uno-r4-family.md- Uno R4 Minima and Uno R4 WiFi support notes
Workflow
1. Identify the user's platform and target board. 2. Open references/serial-ports.md if the task depends on port discovery. 3. Open references/commands.md for the exact command family you need. 4. Check rules/common-pitfalls.md before suggesting upload or compile fixes. 5. If the target is Uno R4 family and the problem touches WiFi, firmware bridge, or OTA-related setup, open ../../docs/board-support/uno-r4-family.md. 6. Prefer arduino-cli JSON output when the result will be parsed or reused.
Quick Start
arduino-cli board list
arduino-cli core list
arduino-cli compile --fqbn arduino:avr:uno path/to/sketch
arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:avr:uno path/to/sketchVerification
- Confirm the
fqbnmatches the target board. - Confirm the selected serial port exists before upload.
- Prefer command output over remembered defaults when troubleshooting.
See references/commands.md and references/serial-ports.md for detailed examples.
Examples — Arduino CLI Workflows
This folder contains concise, production-ready command sequences for common Arduino CLI workflows.
Windows PowerShell — Detect board and upload
# 1. Detect COM ports
Get-PnpDevice -Class Ports | Where-Object { $_.FriendlyName -match 'COM' }
# 2. Compile
arduino-cli compile --fqbn arduino:avr:uno C:\path\to\sketch
# 3. Upload (replace COM3 with detected port)
arduino-cli upload -p COM3 --fqbn arduino:avr:uno C:\path\to\sketchLinux — Use stable serial by-id
# List devices
ls -l /dev/serial/by-id
# Compile
arduino-cli compile --fqbn arduino:avr:uno /home/user/sketch
# Upload (use /dev/serial/by-id/…)
arduino-cli upload -p /dev/serial/by-id/usb-... --fqbn arduino:avr:uno /home/user/sketch
## Notes
- Replace the sketch path with your local project folder.
- Prefer stable `/dev/serial/by-id` paths on Linux to avoid port changes between reboots.
- For scripted workflows, consider `arduino-cli ... --format json` for machine-readable output.Arduino CLI Commands Reference
Basic arduino-cli commands commonly used in automation and agent-driven workflows.
Board discovery
- List all installed boards:
arduino-cli board list --format json
- List all available platforms and cores:
arduino-cli core search arduino-cli core update-index
Library management
- Search for a library:
arduino-cli lib search "WiFi"
- Install a library:
arduino-cli lib install "Adafruit Unified Sensor"
- List installed libraries:
arduino-cli lib list
Compile and upload
- Compile a sketch for a board FQBN:
arduino-cli compile --fqbn arduino:avr:uno /path/to/sketch
- Upload to a port:
arduino-cli upload -p COM3 --fqbn arduino:avr:uno /path/to/sketch
Validation notes
- These command forms are stable across recent arduino-cli releases. For authoritative and up-to-date syntax consult the official reference: https://arduino.github.io/arduino-cli/latest/commands/arduino-cli
- Verify your installed CLI version before running scripts:
arduino-cli version. - If you rely on machine-readable output in scripts, prefer
--format jsonwhen available and confirm the CLI version supports it.
Additional flags
- Use
--format jsonon list commands for machine-readable output. - Use
--verifyto only compile and check without producing an upload.
Serial Port Detection (Cross-platform)
This reference lists commands to detect serial/COM ports on Windows, macOS, and Linux. Use these before running arduino-cli upload.
Windows (PowerShell)
- List PnP devices with friendly name containing "COM":
Get-PnpDevice -Class Ports | Where-Object { $_.FriendlyName -match 'COM' }
- WMI query (alternative):
Get-WmiObject Win32_SerialPort | Select-Object DeviceID, Description
Linux (bash)
- List tty devices:
ls -l /dev/ttyUSB /dev/ttyACM /dev/serial/by-id || true
- Use udevadm to query properties:
udevadm info -q all -n /dev/ttyACM0
macOS (bash)
- List USB serial devices:
ls /dev/tty.usb /dev/cu.usb || true
Tips
- Use
arduino-cli board list --format jsonto get arduino-cli's view of connected boards and ports. - When scripting, prefer
/dev/serial/by-idon Linux for stable identifiers.
Common Pitfalls & Best Practices
- Do not hardcode device paths (COM3, /dev/ttyACM0) — detect ports at runtime or allow user override.
- Prefer
--format jsonfor programmatic parsing ofarduino-clioutput. - Document minimum arduino-cli version required for specific flags.
- On Linux, prefer
/dev/serial/by-idwhen available for stable device identifiers.
# Arduino CLI Workflow Script (Windows PowerShell)
# This script demonstrates a complete workflow: detect board, compile, and upload
# Requires arduino-cli installed and a connected Arduino board
param(
[string]$SketchPath = "C:\path\to\sketch", # Update this path
[string]$BoardFQBN = "arduino:avr:uno" # Update for your board
)
Write-Host "Arduino CLI Workflow Script (Windows)" -ForegroundColor Green
Write-Host "=====================================" -ForegroundColor Green
# Step 1: Detect COM ports
Write-Host "`n1. Detecting serial ports..." -ForegroundColor Yellow
$ports = Get-PnpDevice -Class Ports | Where-Object { $_.FriendlyName -match 'COM' }
if ($ports) {
Write-Host "Found ports:" -ForegroundColor Green
$ports | ForEach-Object { Write-Host " $($_.Name) - $($_.FriendlyName)" }
$port = $ports[0].Name # Use first detected port
Write-Host "Using port: $port" -ForegroundColor Cyan
} else {
Write-Host "No COM ports detected. Please connect your Arduino board." -ForegroundColor Red
exit 1
}
# Step 2: Compile sketch
Write-Host "`n2. Compiling sketch..." -ForegroundColor Yellow
& arduino-cli compile --fqbn $BoardFQBN $SketchPath
if ($LASTEXITCODE -ne 0) {
Write-Host "Compilation failed." -ForegroundColor Red
exit 1
}
Write-Host "Compilation successful." -ForegroundColor Green
# Step 3: Upload to board
Write-Host "`n3. Uploading to board..." -ForegroundColor Yellow
& arduino-cli upload -p $port --fqbn $BoardFQBN $SketchPath
if ($LASTEXITCODE -ne 0) {
Write-Host "Upload failed." -ForegroundColor Red
exit 1
}
Write-Host "Upload successful!" -ForegroundColor Green
Write-Host "`nWorkflow complete. Your sketch should now be running on the board." -ForegroundColor Green