Arduino CLI Skill
Provide cross-platform arduino-cli workflows and command references.
Resources
references/commands.md - board, core, library, compile, and upload commands
references/serial-ports.md - OS-specific serial port discovery
rules/common-pitfalls.md - common command mistakes and recovery guidance
examples/README.md - runnable command sequences
../../docs/board-support/uno-r4-family.md - Uno R4 Minima and Uno R4 WiFi support notes
Workflow
- Identify the user's platform and target board.
- Open
references/serial-ports.md if the task depends on port discovery.
- Open
references/commands.md for the exact command family you need.
- Check
rules/common-pitfalls.md before suggesting upload or compile fixes.
- 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.
- Prefer
arduino-cli JSON output when the result will be parsed or reused.
Compatibility And Proof Boundary
Record arduino-cli version, the core/index version, FQBN, libraries, host OS,
and port before changing commands. Check library architecture support and board
package compatibility. A successful compile is build proof only; an accepted
upload is upload proof and does not establish hardware or system success. For
IDE, PlatformIO, or vendor-specific commands, route to the appropriate branch
instead of silently translating them.
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/sketch
Verification
- Confirm the
fqbn matches 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.
Shared Output Contract
Use the shared Arduino skill contract:
state assumptions, required tools and versions, implementation steps,
tests/evidence by proof stage, known limitations, and recovery/security notes.
1---
2name: arduino-cli-skill
3description: Use when users need Arduino CLI commands for board discovery, library installation, compilation, upload, or serial-port troubleshooting on Windows, macOS, or Linux. Use it as the CLI branch of a broader workflow when the project also involves Arduino IDE, PlatformIO, vendor tools, hardware, power, or deployment.
4metadata: {triggers: "Arduino CLI, board discovery, compile, upload, serial port"}
5---
6
7# Arduino CLI Skill
8
9Provide cross-platform `arduino-cli` workflows and command references.
10
11## Resources
12
13- `references/commands.md` - board, core, library, compile, and upload commands
14- `references/serial-ports.md` - OS-specific serial port discovery
15- `rules/common-pitfalls.md` - common command mistakes and recovery guidance
16- `examples/README.md` - runnable command sequences
17- `../../docs/board-support/uno-r4-family.md` - Uno R4 Minima and Uno R4 WiFi support notes
18
19## Workflow
20
211. Identify the user's platform and target board.
222. Open `references/serial-ports.md` if the task depends on port discovery.
233. Open `references/commands.md` for the exact command family you need.
244. Check `rules/common-pitfalls.md` before suggesting upload or compile fixes.
255. If the target is Uno R4 family and the problem touches WiFi, firmware bridge,
26 or OTA-related setup, open `../../docs/board-support/uno-r4-family.md`.
276. Prefer `arduino-cli` JSON output when the result will be parsed or reused.
28
29## Compatibility And Proof Boundary
30
31Record `arduino-cli version`, the core/index version, FQBN, libraries, host OS,
32and port before changing commands. Check library architecture support and board
33package compatibility. A successful `compile` is build proof only; an accepted
34upload is upload proof and does not establish hardware or system success. For
35IDE, PlatformIO, or vendor-specific commands, route to the appropriate branch
36instead of silently translating them.
37
38## Quick Start
39
40```bash
41arduino-cli board list
42arduino-cli core list
43arduino-cli compile --fqbn arduino:avr:uno path/to/sketch
44arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:avr:uno path/to/sketch
45```
46
47## Verification
48
49- Confirm the `fqbn` matches the target board.
50- Confirm the selected serial port exists before upload.
51- Prefer command output over remembered defaults when troubleshooting.
52
53See `references/commands.md` and `references/serial-ports.md` for detailed examples.
54
55## Shared Output Contract
56
57Use [the shared Arduino skill contract](../../docs/arduino-skill-contract.md):
58state assumptions, required tools and versions, implementation steps,
59tests/evidence by proof stage, known limitations, and recovery/security notes.