agentleFS
zhihong1469zhihong1469/plumb-link/skills/hardware/gpio-config/SKILL.md

gpio-config

Skill0 starsChanged 6 months agoMITView on GitHub

用户输入包含以下关键词时触发: - "配置 GPIO" - "设置引脚" - "导出 GPIO" - "GPIO 方向"

The file

Files
SKILL.md

HW001 - GPIO 配置技能

技能信息

项目内容
技能IDHW001
技能名称gpio-config
触发关键词gpio,引脚,配置,导出,设置
平台支持Linux/裸机
状态待设计

触发条件

用户输入包含以下关键词时触发:

  • "配置 GPIO"
  • "设置引脚"
  • "导出 GPIO"
  • "GPIO 方向"

执行步骤

  1. 参数解析:解析 GPIO 编号、方向(输入/输出)、初始值
  2. 权限检查:检查是否有操作 GPIO 的权限
  3. 导出 GPIO:写入 /sys/class/gpio/export
  4. 设置方向:写入 /sys/class/gpio/gpioX/direction
  5. 设置值:如为输出模式,写入初始值
  6. 返回结果:返回操作状态和 GPIO 路径

输出格式

{
    "status": "success",
    "summary": "GPIO 配置成功",
    "evidence": [
        {
            "type": "output",
            "content": "GPIO 50 已配置为输出模式,初始值: 1",
            "title": "配置结果"
        }
    ],
    "gpio_path": "/sys/class/gpio/gpio50"
}

依赖工具

工具名称用途最低版本检测方法
/sys/class/gpiosysfs GPIO 接口-检查目录是否存在

安全注意事项

  • GPIO 操作需要 root 权限
  • 确保 GPIO 编号在设备支持范围内
  • 避免配置系统关键引脚

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.