← 返回 Skills 市场
hyunwoo91

communication-mqtt

作者 hyunwoo91 · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
1007
总下载
0
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install communication-mqtt
功能描述
MQTT 브로커를 통해 에이전트의 소개(Intro) 및 상태(Status) 메시지를 발행하고 구독하는 기능을 제공합니다. 에이전트 간의 통신이 필요할 때 사용하세요.
使用说明 (SKILL.md)

MQTT Agent Messenger Skill

이 스킬은 MQTT 프로토콜을 사용하여 에이전트의 정보를 네트워크에 공유하거나 다른 에이전트의 상태를 추적하는 데 사용됩니다.

주요 기능

  • 에이전트 소개 (Intro): 에이전트의 ID와 역할(Role) 정보를 발행합니다.
  • 상태 업데이트 (Status): 에이전트의 현재 활동(Activity) 정보를 타임스탬프와 함께 발행합니다.
  • 메시지 모니터링 (Subscribe): 특정 에이전트 혹은 모든 에이전트의 소개 및 상태 메시지를 실시간으로 수신합니다.

사용 방법

0. 시작하기전에

파이썬 패키지 설치

pip install paho-mqtt typer

자신의 agent_id 확인

cat ~/.openclaw/openclaw.json

1. 에이전트 정보 발행 (Publish)

publish.py 스크립트를 사용하여 메시지를 보냅니다.

  • 자기소개 발행:
    python scripts/publish.py intro --agent-id "agent-1" --role "researcher"
    
  • 현재 상태 발행:
    python scripts/publish.py status --agent-id "agent-1" --activity "searching-github"
    

2. 에이전트 정보 구독 (Subscribe)

subscribe.py 스크립트를 사용하여 메시지를 확인합니다. --wait 옵션을 통해 대기 시간을 조절할 수 있습니다.

  • 모든 에이전트의 소개 확인:
    python scripts/subscribe.py intro
    
  • 특정 에이전트의 소개 확인:
    python scripts/subscribe.py intro --agent-id "agent-2"
    
  • 모든 에이전트의 상태 모니터링 (10초간):
    python scripts/subscribe.py status --wait 10
    
  • 특정 에이전트의 상태 모니터링:
    python scripts/subscribe.py status --agent-id "agent-2"
    
安全使用建议
This skill is internally consistent: it publishes and subscribes to agent intro/status messages via a local MQTT broker (localhost:1883). Before installing or using it: (1) confirm you run a trusted local MQTT broker — retained messages (RETAIN=True) persist on the broker and could be read by any client that can connect; (2) the SKILL.md suggests checking ~/.openclaw/openclaw.json to find your agent_id, but the scripts require you to pass agent_id explicitly and do not auto-read that file — only inspect that file yourself if you need the ID; (3) the code talks only to localhost and has no external endpoints, so risk is limited to your network exposure of the MQTT broker; (4) pip-installing paho-mqtt and typer is required. If you plan to use this on a shared or network-reachable broker, avoid publishing sensitive data or disable retention. If you want stronger assurance, review the two included scripts locally (they are small and readable) and confirm BROKER is set to an intended host before running.
功能分析
Type: OpenClaw Skill Name: communication-mqtt Version: 1.0.1 The skill is classified as suspicious due to two main indicators. First, the `SKILL.md` file contains a direct instruction (`cat ~/.openclaw/openclaw.json`) for the AI agent to execute a shell command to read a potentially sensitive configuration file for self-identification. While its stated purpose is benign, this is a clear prompt injection vector for file access. Second, the `scripts/publish.py` script constructs an MQTT message payload that includes a `channel` field containing a `bash` command template (`openclaw --agent {agent_id} --message "message_here"`). Although this command is not executed by the current skill and is published to a local MQTT broker, it represents a risky capability that could be abused for prompt injection or command injection against other agents if they blindly process such messages.
能力评估
Purpose & Capability
Name/description match the implementation: the scripts publish/subscribe agent intro and status messages via MQTT. One minor mismatch: SKILL.md instructs the user to check ~/.openclaw/openclaw.json for an agent_id, but the skill does not declare that config path as required — reading that file is a user instruction, not performed by the code.
Instruction Scope
Runtime instructions are narrowly scoped to installing paho-mqtt/typer and using the included scripts against a local MQTT broker. The README suggests running cat ~/.openclaw/openclaw.json to find agent_id (a reference to a local config file); the code itself does not read arbitrary system files. Instructions are not open-ended and do not direct data to external endpoints.
Install Mechanism
No install spec in the registry (instruction-only). The user is told to pip install common packages (paho-mqtt, typer). There are no downloads or extract steps from unknown URLs.
Credentials
The skill requires no environment variables or external credentials. However: (1) SKILL.md references ~/.openclaw/openclaw.json (a local config path) as a way to find agent_id but that path is not declared; (2) publish.py uses retained MQTT messages (RETAIN=True), so posted info will persist on the broker and be visible to any client that can connect — ensure the broker is trusted and not publicly accessible.
Persistence & Privilege
always is false and the skill does not modify other skills or system-wide settings. The skill can be invoked autonomously (platform default) but it only connects to localhost:1883 per its hard-coded settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install communication-mqtt
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /communication-mqtt 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Updated usage instructions to include a step for checking your `agent_id` with `cat ~/.openclaw/openclaw.json`. - Clarified Python package installation instructions and section headers for better readability. - Revised the skill description for conciseness and focus on agent communication needs. - No code changes; documentation improvements only.
v1.0.0
Initial release — provides basic MQTT agent messaging and monitoring utilities. - Added publish.py for sending agent intro and status messages to an MQTT broker. - Added subscribe.py for subscribing to and monitoring agent intro and status messages. - Skill documentation and usage instructions updated for Python + MQTT (paho-mqtt, typer). - Supports agent ID targeting and role/activity specification in messages.
元数据
Slug communication-mqtt
版本 1.0.1
许可证
累计安装 2
当前安装数 2
历史版本数 2
常见问题

communication-mqtt 是什么?

MQTT 브로커를 통해 에이전트의 소개(Intro) 및 상태(Status) 메시지를 발행하고 구독하는 기능을 제공합니다. 에이전트 간의 통신이 필요할 때 사용하세요. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1007 次。

如何安装 communication-mqtt?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install communication-mqtt」即可一键安装,无需额外配置。

communication-mqtt 是免费的吗?

是的,communication-mqtt 完全免费(开源免费),可自由下载、安装和使用。

communication-mqtt 支持哪些平台?

communication-mqtt 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 communication-mqtt?

由 hyunwoo91(@hyunwoo91)开发并维护,当前版本 v1.0.1。

💬 留言讨论