Design & UI v1.0.0

arduino-cli

Provides commands and workflows for Arduino CLI. Use when the user wants to create, compile, or upload Arduino sketches,...

547895019 更新于 2026-03-25 1 浏览
下载 SKILL

技能说明

Provides commands and workflows for Arduino CLI. Use when the user wants to create, compile, or upload Arduino sketches, manage boards (list, attach), install/search/list cores (platforms) and libraries, or configure Arduino CLI. Triggers on phrases like "arduino-cli", "compile sketch", "upload arduino", "install arduino core", or "arduino library".

使用场景

This skill provides guidance for using the arduino-cli to manage Arduino projects, boards, cores, and libraries from the command line.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/arduino-cli
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 18 kB
SKILL.md text/markdown
---
name: arduino-cli
description: Provides commands and workflows for Arduino CLI. Use when the user wants to create, compile, or upload Arduino sketches, manage boards (list, attach), install/search/list cores (platforms) and libraries, or configure Arduino CLI. Triggers on phrases like "arduino-cli", "compile sketch", "upload arduino", "install arduino core", or "arduino library".
---

# Arduino CLI Skill

This skill provides guidance for using the `arduino-cli` to manage Arduino projects, boards, cores, and libraries from the command line.

## Quick Reference

### 1. Configuration & Setup
Initialize the configuration file (usually in `~/.arduino15/arduino-cli.yaml`):
```bash
arduino-cli config init
```

Update the local cache of available platforms and libraries (do this first!):
```bash
arduino-cli core update-index
```

### 2. Board Management
List connected boards to find the port and FQBN (Fully Qualified Board Name):
```bash
arduino-cli board list
```

List all supported boards and their FQBN strings:
```bash
arduino-cli board listall <search_term>
```

### 3. Core (Platform) Management
Search for a core:
```bash
arduino-cli core search <keyword>
```

Install a core using its ID (e.g., `arduino:samd`):
```bash
arduino-cli core install <core_id>
```

List installed cores:
```bash
arduino-cli core list
```

### 4. Sketch Workflow
Create a new sketch:
```bash
arduino-cli sketch new <SketchName>
```

Compile a sketch (requires the board's FQBN):
```bash
arduino-cli compile --fqbn <FQBN> <SketchName>
```
*Example:* `arduino-cli compile --fqbn arduino:samd:mkr1000 MyFirstSketch`

Upload a sketch to a connected board:
```bash
arduino-cli upload -p <port> --fqbn <FQBN> <SketchName>
```
*Example:* `arduino-cli upload -p /dev/ttyACM0 --fqbn arduino:samd:mkr1000 MyFirstSketch`

### 5. Library Management
Search for a library:
```bash
arduino-cli lib search <keyword>
```

Install a library:
```bash
arduino-cli lib install "<Library Name>"
```

## Adding 3rd Party Cores (e.g., ESP8266)

To install 3rd party cores, pass the `--additional-urls` flag to your core commands:

```bash
arduino-cli core update-index --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
arduino-cli core install esp8266:esp8266 --additional-urls https://arduino.esp8266.com/stable/package_esp8266com_index.json
```
*(Alternatively, these URLs can be added to the `board_manager.additional_urls` array in `arduino-cli.yaml`)*

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。