← 返回 Skills 市场
sonerbo

Kiro Realtime Chat

作者 sonerbo · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
282
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install kiro-realtime
功能描述
Enables near real-time chat between multiple Kiro instances via a shared JSON file with polling for quick message exchange and task coordination.
使用说明 (SKILL.md)

Kiro Realtime Chat

Overview

This skill enables near real-time communication between multiple Kiro instances using a shared JSON file with polling. Each message includes timestamp, sender, and content.

File Location

memory/kiro-realtime.json

JSON Structure

{
  "messages": [
    {
      "id": 1,
      "from": "VPS Kiro",
      "to": "Laptop Kiro",
      "message": "Selam!",
      "timestamp": "2026-03-05T22:58:00Z",
      "read": false
    }
  ],
  "lastCheck": "2026-03-05T22:58:00Z"
}

Usage

Sending a Message

import json
import os
from datetime import datetime

CHAT_FILE = "memory/kiro-realtime.json"

def send_message(from_name, to_name, message):
    # Load or create chat file
    if os.path.exists(CHAT_FILE):
        with open(CHAT_FILE, "r") as f:
            chat = json.load(f)
    else:
        chat = {"messages": [], "lastCheck": datetime.now().isoformat()}
    
    # Add new message
    msg_id = len(chat["messages"]) + 1
    chat["messages"].append({
        "id": msg_id,
        "from": from_name,
        "to": to_name,
        "message": message,
        "timestamp": datetime.now().isoformat(),
        "read": False
    })
    
    # Save
    with open(CHAT_FILE, "w") as f:
        json.dump(chat, f, indent=2)
    
    return msg_id

Checking for New Messages

def check_messages(my_name, since_timestamp=None):
    if not os.path.exists(CHAT_FILE):
        return []
    
    with open(CHAT_FILE, "r") as f:
        chat = json.load(f)
    
    # Update last check time
    chat["lastCheck"] = datetime.now().isoformat()
    with open(CHAT_FILE, "w") as f:
        json.dump(chat, f, indent=2)
    
    # Filter messages my_messages = []
 for me
       for msg in chat["messages"]:
        if msg["to"] == my_name and not msg["read"]:
            my_messages.append(msg)
            msg["read"] = True
    
    # Save read status
    with open(CHAT_FILE, "w") as f:
        json.dump(chat, f, indent=2)
    
    return my_messages

Polling Loop (for near real-time)

import time

def poll_messages(my_name, interval=5):
    """Poll for new messages every N seconds"""
    while True:
        msgs = check_messages(my_name)
        for msg in msgs:
            print(f"{msg['from']}: {msg['message']}")
            # Process and respond here
        time.sleep(interval)

Recommended Polling Interval

  • Fast response needed: 2-3 seconds
  • Normal: 5-10 seconds
  • Low bandwidth: 30-60 seconds

Tips

  • Mark messages as "read" after processing
  • Use timestamps to avoid duplicate processing
  • For better real-time, consider MCP server or WebSocket
  • Keep messages under 1000 characters
安全使用建议
This skill is coherent with its description and doesn't ask for credentials or network access, but review and consider the following before installing: (1) confirm which chat file path you want to use — SKILL.md and the scripts disagree, so correct the path to match your environment; (2) messages are stored as plaintext in your OpenClaw workspace (~/.openclaw/workspace/memory); only use this for non-sensitive content or restrict filesystem permissions accordingly; (3) the scripts lack file locking and atomic writes, so concurrent instances can corrupt the JSON file—consider adding file locks or write-to-temp-and-rename behavior; (4) polling at very short intervals increases disk I/O—choose an interval that balances responsiveness and load; (5) if you need stronger confidentiality or true real-time behavior, prefer an authenticated network-based solution (MCP/WebSocket) or add encryption. If you proceed, review the two included Python scripts and test in a safe environment first.
功能分析
Type: OpenClaw Skill Name: kiro-realtime Version: 1.0.0 The skill implements a basic file-based messaging system for inter-instance communication using a shared JSON file. The Python scripts (read_messages.py, send_message.py) perform standard file I/O operations within the agent's workspace and lack any indicators of data exfiltration, remote execution, or malicious intent.
能力评估
Purpose & Capability
The name/description, SKILL.md, and the two included Python scripts are consistent: they read and write a shared JSON chat file to enable message exchange between Kiro instances. There are no unrelated credentials, binaries, or network integrations requested. Note: SKILL.md refers to memory/kiro-realtime.json while the scripts use ~/.openclaw/workspace/memory/kiro-realtime.json — a path mismatch that could cause confusion or misconfiguration.
Instruction Scope
All instructions and code operate on a local JSON file (create, read, write, mark read, poll). They do not call external endpoints or read unrelated system files. Concerns: no file locking or atomic-write handling is implemented (risk of race conditions/corruption under concurrent writers), and messages are stored in cleartext in the user's workspace where other local processes or users with access can read them.
Install Mechanism
No install spec or remote downloads — instruction-only plus included scripts. Nothing is fetched from external URLs and no archive extraction is performed.
Credentials
The skill requests no environment variables or credentials, which is proportionate. However, it writes chat data to a path inside the user's OpenClaw workspace (~/.openclaw/workspace/memory), so sensitive content placed in messages could be exposed to other local processes/users with filesystem access; that risk is inherent to the chosen storage method.
Persistence & Privilege
The skill is not marked always:true and is user-invocable only. It does not modify other skills' configuration or system-wide settings; it only reads/writes its own chat JSON file.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kiro-realtime
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kiro-realtime 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Real-time chat between Kiro instances via JSON polling
元数据
Slug kiro-realtime
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Kiro Realtime Chat 是什么?

Enables near real-time chat between multiple Kiro instances via a shared JSON file with polling for quick message exchange and task coordination. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 282 次。

如何安装 Kiro Realtime Chat?

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

Kiro Realtime Chat 是免费的吗?

是的,Kiro Realtime Chat 完全免费(开源免费),可自由下载、安装和使用。

Kiro Realtime Chat 支持哪些平台?

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

谁开发了 Kiro Realtime Chat?

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

💬 留言讨论