Library Selection
Treat a library as part of the firmware and hardware contract. A popular
package that compiles for one architecture may still use incompatible pins,
timers, memory, bus assumptions, or APIs on another.
Intake
Record exact board/module, architecture, Arduino core or vendor SDK, compiler,
toolchain, required API, bus/pin constraints, memory budget, license boundary,
update policy, and whether the device is connected or field-updatable.
Process
- Find the upstream source, release/tag, license, supported architectures, and
framework instructions. Prefer primary repositories and current release notes.
- Compare candidate API fit, board variants, transitive dependencies, flash/
SRAM/heap impact, blocking behavior, concurrency, bus/pull-up assumptions,
and error/recovery behavior.
- Check open issues and maintenance signals without treating stars or install
count as compatibility proof.
- Select a pinned version, record provenance and rationale, and document
unsupported board/framework branches.
- Run a minimal compile fixture, then a simulated or target behavior check.
Anti-rationalization
| Shortcut |
Response |
| "It has many installs." |
Verify architecture, core version, API, and hardware contract. |
| "The newest version is best." |
Read release notes, compatibility, footprint, and regression history. |
| "The I2C scanner found it." |
Test library initialization, register reads, timing, and error paths. |
| "It worked on AVR." |
Recheck ESP32/S3/Pico architecture, pins, timers, and memory. |
| "The dependency is only a helper." |
Include transitive code and license/security review. |
Verification
- Candidate comparison contains source, version, architecture, and license.
- Minimal compile output names the exact FQBN/environment and dependency
resolution.
- Memory delta and one runtime/simulation behavior result are recorded.
- Connected devices have a dependency update and secret-handling plan.
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: library-selection
3description: Use when selecting, replacing, pinning, or auditing an Arduino, ESP32, RP2040, C++, or vendor-framework library. Compare architecture support, framework and version compatibility, API behavior, footprint, maintenance, provenance, security, and hardware assumptions before installation.
4metadata:
5 triggers: "choose library, Arduino library, dependency, compatible library, library version, package audit"
6 attribution: "Adapted from Agent Skills verification guidance and the shared Arduino toolchain contract."
7---
8
9# Library Selection
10
11Treat a library as part of the firmware and hardware contract. A popular
12package that compiles for one architecture may still use incompatible pins,
13timers, memory, bus assumptions, or APIs on another.
14
15## Intake
16
17Record exact board/module, architecture, Arduino core or vendor SDK, compiler,
18toolchain, required API, bus/pin constraints, memory budget, license boundary,
19update policy, and whether the device is connected or field-updatable.
20
21## Process
22
231. Find the upstream source, release/tag, license, supported architectures, and
24 framework instructions. Prefer primary repositories and current release notes.
252. Compare candidate API fit, board variants, transitive dependencies, flash/
26 SRAM/heap impact, blocking behavior, concurrency, bus/pull-up assumptions,
27 and error/recovery behavior.
283. Check open issues and maintenance signals without treating stars or install
29 count as compatibility proof.
304. Select a pinned version, record provenance and rationale, and document
31 unsupported board/framework branches.
325. Run a minimal compile fixture, then a simulated or target behavior check.
33
34## Anti-rationalization
35
36| Shortcut | Response |
37|---|---|
38| "It has many installs." | Verify architecture, core version, API, and hardware contract. |
39| "The newest version is best." | Read release notes, compatibility, footprint, and regression history. |
40| "The I2C scanner found it." | Test library initialization, register reads, timing, and error paths. |
41| "It worked on AVR." | Recheck ESP32/S3/Pico architecture, pins, timers, and memory. |
42| "The dependency is only a helper." | Include transitive code and license/security review. |
43
44## Verification
45
46- Candidate comparison contains source, version, architecture, and license.
47- Minimal compile output names the exact FQBN/environment and dependency
48 resolution.
49- Memory delta and one runtime/simulation behavior result are recorded.
50- Connected devices have a dependency update and secret-handling plan.
51
52## Shared output contract
53
54Use [the shared Arduino skill contract](../../docs/arduino-skill-contract.md):
55state assumptions, required tools and versions, implementation steps,
56tests/evidence by proof stage, known limitations, and recovery/security notes.