Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

micropython-skillsmicropython skills 搜索

Agent Skill

用于辅助 Python 项目开发、测试、依赖管理和常见框架工作流。它适合让 Agent 阅读 Python 代码、定位测试问题、整理运行命令、生成脚本或分析数据处理逻辑。使用时需要确认项目虚拟环境、依赖版本和测试入口;涉及执行脚本、读写文件、访问数据库或调用外部 API 时,应先明确运行目录和输入输出范围,避免误改生产数据。

总安装

4,680

周安装

199

GitHub Stars

1

下载量

1,640
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:micropython-skills(micropython skills 搜索)
来源仓库:https://github.com/0x1abin/micropython-skills
安装命令:
openclaw skills install micropython-skills
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install micropython-skills

简介

micropython skills 用于嵌入式开发板的实时编程与交互,支持 ESP32、RP2040 等平台。

  • 适用于物联网设备调试、传感器数据整理与固件更新等场景。
  • 通过 REPL 协议执行代码片段、读取日志或修改运行时状态。
  • 需确保设备连接稳定并具备相应驱动,避免误操作导致硬件故障。
  • 安装于 OpenClaw,调用前请确认目标板型号与开发环境配置。

SKILL.md

name
micropython-skills
version
1.0.0
description
>
metadata
clawdbot
emoji
🔌
homepage
https://github.com/0x1abin/agents-workspace
os
requires
bins
files

micropython-skills

AI Agent programmable co-processor skill collection. You (the Agent) generate MicroPython code, push it to devices via REPL, parse structured output, and iterate — turning hardware into your extended capability.

Quick Start

Python command: Use python3 on macOS/Linux, python on Windows. On Windows, python3 is often a Microsoft Store stub that silently fails (exit code 49). On macOS/Linux, python may not exist or may point to Python 2.

Every interaction follows this flow:

  1. Probe — Run python3 {SKILL_DIR}/scripts/device_probe.py to discover connected devices

- status: "ok" → Device has MicroPython, proceed to step 2 - status: "no_firmware" → ESP chip detected but no MicroPython. Ask user to confirm, then flash: python3 {SKILL_DIR}/scripts/firmware_flash.py --port PORT --yes - status: "no_device" → No device connected. Guide user to connect hardware. - status: "permission_denied" → Serial port not accessible. On Linux: sudo chmod 666 /dev/ttyACM0. On Windows: check Device Manager for driver issues.

  1. Connect — Default: USB via mpremote. Optional: WiFi via WebREPL (user must request)
  2. Execute — Generate MicroPython code and push to device
  3. Parse — Scan stdout for tagged lines (RESULT:/ERROR:/STATUS:/LOG:)
  4. Iterate — Adjust code based on results, repeat steps 3-5

Where {SKILL_DIR} is the directory containing this SKILL.md file.

Connection Management

Default: USB (mpremote)

Always start by probing for devices:

python3 {SKILL_DIR}/scripts/device_probe.py

Execute code on device:

mpremote exec "import machine; print('RESULT:' + str(machine.freq()))"

Run a script file:

mpremote run script.py

For multi-line code, write a temporary .py file locally, then mpremote run /path/to/task.py.

Serial port names vary by platform:

PlatformPort FormatExample
Linux/dev/ttyUSB0, /dev/ttyACM0mpremote connect /dev/ttyACM0
macOS/dev/cu.usbserial-*, /dev/cu.usbmodem*mpremote connect /dev/cu.usbmodem14101
WindowsCOM3, COM4, ...mpremote connect COM3

The scripts auto-detect the port — you rarely need to specify it manually.

Optional: WiFi (WebREPL)

Only switch to WiFi when the user explicitly requests it. The switch flow:

  1. Ask user for WiFi SSID and password
  2. Push WiFi + WebREPL config to device via USB:
   python3 {SKILL_DIR}/scripts/wifi_setup.py --ssid "SSID" --password "PASS" --webrepl-password "repl123"
  1. Note the IP address from the output
  2. From now on, execute code over WiFi:
   python3 {SKILL_DIR}/scripts/webrepl_exec.py --host 192.168.1.100 --password repl123 --code "print('hello')"
  1. USB cable can be disconnected

For detailed command reference, read ./references/connections.md.

Sub-skill Router

Based on user intent, read the corresponding sub-skill for domain-specific templates:

User Intent KeywordsSub-skill PathSafety Tier
temperature, humidity, DHT, BME280, pressure, IMU, accelerometer, ADC, analog, ultrasonic, light sensor, photoresistor, read sensor./skills/sensor/SKILL.mdSafe
GPIO, LED, blink, PWM, servo, motor, stepper, relay, NeoPixel, WS2812, buzzer, output, control, drive./skills/actuator/SKILL.mdCautious
WiFi, MQTT, HTTP, BLE, Bluetooth, NTP, WebSocket, AP mode, network, connect internet, publish, subscribe./skills/network/SKILL.mdCautious
PID, filter, Kalman, state machine, scheduler, data logging, moving average, control loop, algorithm./skills/algorithm/SKILL.mdSafe
scan I2C, scan SPI, device info, memory, filesystem, diagnose, health check, benchmark, pin state, what's connected./skills/diagnostic/SKILL.mdSafe
save to device, 保存到设备, 开机自启, auto start, 下次还能用, persist, 断电保存See "Program Persistence" section belowCautious/Dangerous
flash firmware, burn firmware, install MicroPython, no firmware, 烧录, 刷固件, 刷机scripts/firmware_flash.pyDangerous
recovery, not responding, stuck, boot.py, main.py, reflash, brick./references/safety.mdDangerous

When a task spans multiple domains (e.g., "read sensor and publish via MQTT"), read all relevant sub-skills.

Structured Output Protocol

All MicroPython code you generate for the device MUST use tagged output lines:

TagPurposeExample
RESULT:Success data (JSON)RESULT:{"temp":23.5,"hum":61}
ERROR:Error infoERROR:OSError: [Errno 19] ENODEV
STATUS:Status indicatorSTATUS:ok
LOG:Debug infoLOG:sampling at 100Hz

Code template — every snippet you generate should follow this pattern:

import json
from machine import Pin
try:
    # ... your operation here ...
    print("RESULT:" + json.dumps({"key": value}))
except Exception as e:
    print("ERROR:" + str(e))

Parse rules:

  • Scan device stdout line by line
  • Extract lines starting with RESULT:, ERROR:, STATUS:, LOG:
  • Ignore all other output (MicroPython boot messages, REPL prompts, etc.)
  • If ERROR: is found, diagnose and retry with adjusted code

Safety Rules

TierOperationsAgent Behavior
SafeSensor read, I2C/SPI scan, memory check, pin read, diagnosticsExecute directly
CautiousGPIO output, PWM, WiFi connect, file write on deviceInform user what you're about to do, then execute
DangerousOverwrite boot.py/main.py, format filesystem, OTA update, flash firmwareMust get explicit user confirmation. Always backup first: mpremote fs cp :boot.py /tmp/boot.py.bak

Hard constraints:

  • Never hardcode WiFi passwords in scripts saved to device — use variables or prompt user
  • All loops must have iteration limits or timeouts — never generate infinite loops without exit conditions
  • Before overwriting boot.py or main.py, always backup the existing file first
  • Before controlling high-current devices (motors, relays), ask user to confirm wiring

For complete recovery procedures, read ./references/safety.md.

Workflow

As the Agent operating this co-processor, follow this mental model:

  1. Understand intent — What does the user want to achieve with the hardware?
  2. Check connection — Run device_probe.py if you haven't yet. Know your device's platform and capabilities.
  3. Route to sub-skill — Read the relevant sub-skill SKILL.md for code templates and domain knowledge
  4. Generate code — Write MicroPython code following the output protocol. Adapt pin numbers and parameters to the target platform.
  5. Push and capture — Execute via mpremote or WebREPL, capture full stdout
  6. Parse results — Extract RESULT:/ERROR: lines, parse JSON data
  7. Decide next step — If ERROR, diagnose and adjust. If RESULT, present to user or use for next operation.
  8. Maintain state — Remember which pins are in use, which peripherals are initialized, what the device's platform is
  9. Offer persistence — After a program runs successfully, ask the user if they want to save it to the device or set it to auto-start on boot

Program Persistence

After a program runs successfully, offer the user two options:

Option 1: Save to Device (for later manual use)

Save the script to the device's filesystem so it can be run anytime without re-uploading:

# Save script to device
mpremote fs cp local_script.py :my_program.py

# List saved scripts on device
mpremote fs ls

# Run a saved script
mpremote exec "exec(open('my_program.py').read())"

This is a Cautious operation — inform the user before writing files to the device.

Option 2: Auto-start on Boot (write to main.py)

If the user wants the program to run automatically every time the device powers on:

  1. Always ask first — "要设置为开机自动运行吗?注意:如果程序有问题可能导致设备无法正常连接。"
  2. Backup existing main.py (if any):
   mpremote fs cp :main.py ./main.py.bak
  1. Upload as main.py:
   mpremote fs cp local_script.py :main.py
  1. Important: For auto-start scripts, wrap the main logic in a try/except and add a short startup delay so the user can interrupt if needed:
   import time
   time.sleep(2)  # 2s window for Ctrl-C interrupt
   # ... main logic ...

This is a Dangerous operation — require explicit user confirmation.

Disable Auto-start

If the device becomes hard to access due to a problematic main.py:

# Rename to disable (if mpremote can still connect)
mpremote exec "import os; os.rename('main.py', 'main.py.disabled')"
mpremote reset

# Or delete it
mpremote exec "import os; os.remove('main.py')"
mpremote reset

If the device is completely unresponsive, follow the recovery steps in ./references/safety.md.

Platform Adaptation

After probing, adapt code to the detected platform:

PlatformKey Capabilities
esp32 / esp32s3WiFi, BLE, Touch Pad, Deep Sleep, ULP, Hall Sensor
rp2040PIO state machines, dual core, no WiFi (unless Pico W)
stm32More timers, CAN bus, DAC
GenericStandard machine module API only

For ESP32-specific pin maps and APIs, read ./references/esp32.md.

Reference Files

Read these on demand — not every interaction needs them:

FileWhen to Read
./references/connections.mdTroubleshooting connection issues, mpremote advanced usage, WebREPL protocol details
./references/esp32.mdESP32-specific pin maps, strapping pin warnings, deep sleep, NVS, BLE/WiFi API details
./references/safety.mdDevice recovery, boot.py restore, filesystem repair, electrical safety

Dependencies

Agent-side requirements:

  • mpremotepip install mpremote (required for USB connection)
  • esptoolpip install esptool (required for chip detection and firmware flashing)
  • pyserialpip install pyserial (required on Windows for COM port auto-detection; recommended on all platforms)
  • websocket-clientpip install websocket-client (only needed for WiFi/WebREPL mode)
  • Python 3.8+
Windows notes: - Use python instead of python3 to run scripts. On many Windows systems, python3 is a Microsoft Store stub that returns exit code 49. On macOS/Linux, use python3. - Without pyserial, the scripts fall back to parsing the mode command output for COM port detection, which provides less detail (no VID/PID info). Install pyserial for best results.

Device-side requirements:

  • MicroPython firmware v1.19+ (v1.22+ recommended) — auto-installed by firmware_flash.py if missing
  • USB connection or WiFi reachability

External Endpoints

This skill accesses external services during specific operations:

EndpointWhen AccessedPurposeRequired?
https://micropython.org/download/{board}/Firmware flashing only (firmware_flash.py)Download latest stable MicroPython firmware binary for the detected chipOnly when flashing firmware
https://micropython.org/resources/firmware/...Firmware flashing onlyDirect firmware .bin download URLOnly when flashing firmware

No telemetry, analytics, or data is sent to any external service. The skill operates entirely locally except for firmware downloads.

Security & Privacy

  • No data collection: This skill does not collect, transmit, or store any user data
  • No telemetry: No usage analytics, crash reports, or tracking of any kind
  • Local-only operation: All device communication happens over local USB serial or local WiFi (WebREPL). No cloud relay or proxy is used
  • WiFi credentials: When provided by the user, WiFi credentials are passed directly to the device via mpremote and written to the device's boot.py. They are never logged, stored on the host machine, or transmitted to external services
  • Firmware source: Firmware binaries are downloaded exclusively from micropython.org, the official MicroPython project site
  • File system access: Helper scripts only access serial ports and the system temp directory (for firmware caching). No other host files are read or modified

Trust & Verification

  • Open source: Full source code is available at the homepage repository
  • No obfuscation: All Python scripts and Markdown files are human-readable
  • Auditable: The scripts/ directory contains 4 self-contained Python scripts with no external dependencies beyond mpremote, esptool, pyserial, and websocket-client
  • Evals included: The evals/evals.json file contains 5 test scenarios covering device probe, sensor read, actuator control, diagnostics, and recovery

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

98.4%
按下载量换算1,614

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills