Token导航 LogoToken导航TokenDH.com
开发external-servicegithub未标认证来源可访问许可证需确认审计通过

embedded-c嵌入式 c

Agent Skill

embedded-c 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

917

周安装

39

GitHub Stars

4

下载量

321
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:embedded-c(嵌入式 c)
来源仓库:https://github.com/alphaonedev/openclaw-graph
仓库路径:skills/embedded-c
安装命令:
npx skills add https://github.com/alphaonedev/openclaw-graph --skill embedded-c
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/alphaonedev/openclaw-graph --skill embedded-c

简介

embedded-c 提供面向微控制器与 IoT 设备的 C/C++ 编程专业知识。

  • 涵盖 GPIO 控制、定时器、低功耗优化与无线连接等核心能力。
  • 适用于 Arduino、STM32 等平台的原型开发与固件调试。
  • 强调内存占用与能效比优化以适应资源受限环境。
  • embedded-c 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

embedded-c

Purpose

This skill provides expertise in C/C++ programming for embedded systems, focusing on microcontrollers (e.g., Arduino, STM32) and IoT devices, emphasizing resource optimization like low memory usage and power efficiency.

When to Use

Use this skill for developing firmware, handling hardware interactions (e.g., sensors, actuators), or optimizing code for constrained environments. Apply it when building IoT prototypes, debugging real-time systems, or integrating with hardware like ESP8266 for wireless connectivity.

Key Capabilities

  • Generate C/C++ code for GPIO control, timers, and interrupts, e.g., setting up a PWM signal on a microcontroller.
  • Optimize code for resource constraints, such as reducing stack usage or minimizing flash memory footprint.
  • Handle communication protocols like I2C, SPI, or UART in embedded contexts.
  • Provide best practices for error-free coding in low-level environments, including volatile keyword usage for hardware registers.

Usage Patterns

Prompt the AI with specific, actionable requests: "Write a C function to read temperature from an LM35 sensor on an AVR microcontroller." Structure prompts to include hardware details, e.g., "For ESP32, generate code to connect to WiFi and send HTTP requests." Always specify optimization goals, like "Ensure the code uses less than 1KB of RAM." Chain prompts for iterative development: first, generate code; then, refine for bugs.

Common Commands/API

Use GCC for compilation with flags like -Os for optimization and -mmcu=atmega328p for AVR targets. For API examples:

  • Include headers: #include <avr/io.h> for AVR microcontrollers.
  • Code snippet for blinking an LED: DDRB |= (1 << PB5); // Set PB5 as output while(1) {PORTB ^= (1 << PB5); _delay_ms(1000);}
  • For IoT, use ESP-IDF API: esp_wifi_init(&config); to initialize Wi-Fi.
  • Config formats: JSON for IoT device configs, e.g., {"ssid": "myNetwork", "password": "$WIFI_PASSWORD"}, loaded via nvs_set_str() in ESP32 code.
  • If API keys are needed (e.g., for cloud services), set env vars like $AWS_IOT_KEY and access via getenv("AWS_IOT_KEY") in code.

Integration Notes

Integrate this skill with development tools by setting up environments: Install GCC and tools like avrdude for flashing. For IoT, use PlatformIO or Arduino IDE. Authenticate with services using env vars, e.g., export $AZURE_IOT_HUB_KEY for Azure integration. Link code with libraries via #pragma once guards or CMake for cross-compilation. Test on emulators like QEMU for ARM before hardware deployment. Ensure compatibility by specifying board types in prompts, e.g., "Adapt this code for STM32F4."

Error Handling

Always check return values in embedded code, e.g., if (i2c_read()!= 0) {handle_error();}. Use asserts for debugging: #include <assert.h> and assert(pin >= 0);. For C++, catch exceptions in main loops: try {setup_hardware();} catch (...) {reset_device();}. Handle hardware failures by implementing watchdogs, e.g., wdt_enable(WDTO_8S); in AVR. Log errors via UART: printf("Error: Sensor timeout\n"); and use finite state machines to recover from faults.

Concrete Usage Examples

  1. Example: Write code for an Arduino Uno to read a button and toggle an LED. Prompt: "Generate C++ code for Arduino Uno: Read digital input on pin 2 and toggle pin 13 LED." Result: Use pinMode(2, INPUT); and in loop: if (digitalRead(2) == HIGH) {digitalWrite(13,!digitalRead(13)); delay(50);}.
  2. Example: Optimize IoT code for ESP32 to send sensor data to a server. Prompt: "Write efficient C code for ESP32 to read DHT11 sensor and POST data to http://example.com via WiFi, using less than 10KB RAM." Result: Include dht.h; use esp_http_client_init(); snippet: float temp = dht_readTemperature(); http_post_data(temp);.

Graph Relationships

  • Related to cluster: iot
  • Shares tags: iot, embedded
  • Connected skills: potentially other iot cluster skills like "wireless-protocols" or "sensor-integration" based on common tags

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.86%
按下载量换算109

Claude

33.98%
按下载量换算109

Cursor

19.24%
按下载量换算62

Gemini CLI

10.33%
按下载量换算33

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills