← Back to Skills Marketplace
81
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install chat-bus
Description
共享目录消息总线 — 让不同用户/Agent 之间通过文件系统实现聊天对话。 支持单聊、群聊、广播、消息历史查询。 纯 Python 标准库,零外部依赖,跨 Windows/macOS/Linux。 通信基于共享目录(NAS/云同步/网络驱动器),用户自行配置共享路径。
README (SKILL.md)
\r \r
chat-bus — 共享目录消息总线\r
\r
定位\r
\r 让使用本技能的不同用户/Agent 之间,通过共享文件目录实现聊天对话。\r \r
核心规则\r
\r
- 共享目录 — 所有用户必须能访问同一个目录(NAS / OneDrive / Syncthing / SMB 挂载等)\r
- 先注册再聊天 — 用户必须先
register才能发送/接收消息\r - 消息即文件 — 每条消息是一个 JSON 文件,天然按时间排序,天然持久化\r \r
快速上手\r
\r
# 用户 A 注册\r
python register.py '{"user":"alice","display_name":"Alice"}'\r
\r
# 用户 B 注册\r
python register.py '{"user":"bob","display_name":"Bob"}'\r
\r
# A 发消息给 B\r
python send.py '{"user":"alice","to":"bob","content":"你好 Bob!"}'\r
\r
# B 接收消息\r
python receive.py '{"user":"bob"}'\r
\r
# 创建群聊房间\r
python rooms.py '{"action":"create","user":"alice","room":"general","topic":"公共讨论"}'\r
\r
# B 加入房间\r
python rooms.py '{"action":"join","user":"bob","room":"general"}'\r
\r
# 在群里发消息\r
python send.py '{"user":"alice","type":"room","room":"general","content":"大家好!"}'\r
```\r
\r
## 脚本清单\r
\r
| 脚本 | 功能 | 调用方式 |\r
|------|------|---------|\r
| `register.py` | 用户注册/信息管理 | `python register.py '{"action":"register","user":"alice"}'` |\r
| `send.py` | 发送消息 | `python send.py '{"user":"alice","to":"bob","content":"..."}'` |\r
| `receive.py` | 接收新消息 | `python receive.py '{"user":"bob"}'` |\r
| `history.py` | 消息历史查询 | `python history.py '{"source":"inbox","user":"bob"}'` |\r
| `rooms.py` | 群聊房间管理 | `python rooms.py '{"action":"create","user":"alice","room":"..."}'` |\r
\r
## 共享目录结构\r
\r
```\r
.chat-bus/ ← chat_dir(共享目录)\r
├── users/ ← 用户注册信息\r
│ ├── alice.json\r
│ └── bob.json\r
├── inbox/ ← 私聊收件箱\r
│ ├── alice/\r
│ │ ├── 2026-04-13_220500_bob_abc123.json\r
│ │ └── 2026-04-13_220600_bob_def456.json.read\r
│ └── bob/\r
└── rooms/ ← 群聊房间\r
└── general/\r
├── _room.json ← 房间配置(成员列表等)\r
├── 2026-04-13_221000_alice_msg001.json\r
└── 2026-04-13_221100_bob_msg002.json\r
```\r
\r
## JSON 协议\r
\r
- **输入**:JSON 字符串(命令行第一个参数 或 stdin)\r
- **输出**:`{"status":"ok","data":{...}}` 或 `{"status":"error","code":N,"message":"..."}`\r
- **共享目录**:通过 `chat_dir` 参数指定,默认为当前目录下 `.chat-bus/`\r
\r
## 安全说明\r
\r
- 消息明文存储在共享目录,不加密\r
- 依赖共享目录本身的访问控制(文件系统权限)\r
- 用户名安全化处理(仅允许字母数字下划线)\r
Usage Guidance
This skill appears to implement exactly what it claims: a plaintext shared-directory chat bus using only Python stdlib. Before installing/using it, remember: (1) all messages are stored unencrypted in the chosen shared directory—do NOT set chat_dir to a directory that contains sensitive files (home, .ssh, system folders) or that is publicly synced unless you accept that risk; (2) pick a dedicated shared folder and enforce filesystem access controls on the shared storage (NAS/OneDrive/SMB) to limit who can read/write; (3) review or run the provided scripts in a sandbox to confirm behavior if you have higher security requirements; and (4) if you need confidentiality, add an encryption layer or avoid using a shared-sync service that could leak message contents.
Capability Analysis
Type: OpenClaw Skill
Name: chat-bus
Version: 1.0.0
The 'chat-bus' skill implements a file-system-based messaging system but contains significant path traversal vulnerabilities. While the 'user' parameter is sanitized in 'common.py', other critical parameters such as 'room' in 'rooms.py' and 'to' (recipient) in 'send.py' are used to construct file paths without any sanitization. This allows for arbitrary file writes, message spoofing, or directory deletion (via 'shutil.rmtree' in 'rooms.py') outside the intended '.chat-bus' directory. Although the behavior aligns with the stated purpose and lacks evidence of intentional malice or data exfiltration, the lack of input sanitization on directory-constructing parameters poses a high risk of exploitation.
Capability Assessment
Purpose & Capability
Name/description (file-system based shared-directory message bus) matches the included scripts and SKILL.md. All required functionality (register, send, receive, rooms, history) is implemented in the provided Python files and no unrelated credentials, binaries, or services are requested.
Instruction Scope
SKILL.md and scripts limit operations to a configurable shared directory (default .chat-bus/). The agent's instructions do not attempt to read arbitrary system configuration or secrets, but the code will read/write any path the user supplies via chat_dir, and message content is stored in plaintext. This is expected for the stated design but is a privacy/security consideration.
Install Mechanism
No install spec; the skill ships Python scripts and relies only on the standard library. No downloads or external packages are fetched, which reduces install-time risk.
Credentials
No environment variables, credentials, or external tokens are requested. The few parameters are file-paths and usernames used only for local file I/O, which is proportional to the purpose.
Persistence & Privilege
The skill is not always-enabled and does not modify other skills or global agent settings. It persists data by writing files into the configured chat_dir (expected behavior for a shared-directory message bus).
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install chat-bus - After installation, invoke the skill by name or use
/chat-bus - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of chat-bus: a shared directory-based messaging bus enabling chat between users/Agents via filesystem.
- Supports private chat, group chat, broadcast, and message history queries.
- Built with pure Python standard library; zero external dependencies.
- Works across Windows, macOS, and Linux; users configure their own shared directory (e.g., NAS, cloud sync).
- Messages are stored as timestamped JSON files for natural ordering and persistence.
- Includes scripts for registration, sending and receiving messages, managing groups, and querying history.
Metadata
Frequently Asked Questions
What is Chat Bus?
共享目录消息总线 — 让不同用户/Agent 之间通过文件系统实现聊天对话。 支持单聊、群聊、广播、消息历史查询。 纯 Python 标准库,零外部依赖,跨 Windows/macOS/Linux。 通信基于共享目录(NAS/云同步/网络驱动器),用户自行配置共享路径。 It is an AI Agent Skill for Claude Code / OpenClaw, with 81 downloads so far.
How do I install Chat Bus?
Run "/install chat-bus" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Chat Bus free?
Yes, Chat Bus is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Chat Bus support?
Chat Bus is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Chat Bus?
It is built and maintained by 波动几何 (@wangjiaocheng); the current version is v1.0.0.
More Skills