← 返回 Skills 市场
miaodx

Jj Mailbox

作者 MiaoDX · GitHub ↗ · v0.1.3 · MIT-0
cross-platform ✓ 安全检测通过
254
总下载
1
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install jj-mailbox
功能描述
Send and receive messages between AI agents using jj (Jujutsu) version control as a file-based mailbox. Enables cross-machine agent collaboration with zero i...
使用说明 (SKILL.md)

jj-mailbox: File-Based Agent Messaging

You have access to a jj-mailbox — a shared file-based messaging system that lets you communicate with other agents. Messages are JSON files in a jj (Jujutsu) version-controlled repo.

Scope

This skill only reads and writes files inside $JJ_MAILBOX_REPO (subdirectories: inbox/, agents/, shared/). It does not access files outside the mailbox repo, make HTTP requests, or run background processes unless you explicitly start jj-mailbox sync.

Prerequisites

  • jj-mailbox CLI — included as jj-mailbox.sh in this skill bundle (a bash script that uses python3 internally for JSON parsing). Copy it to your PATH or run directly.
  • jj and git — Jujutsu version control with git backend.
  • Environment variables:
    • JJ_MAILBOX_REPO — path to the mailbox jj repo (defaults to current directory)
    • JJ_MAILBOX_AGENT — agent name for this instance (defaults to hostname)
    • JJ_MAILBOX_INTERVAL — sync loop interval in seconds (defaults to 30, only used by jj-mailbox sync)
  • Credentials and network access:
    • Local-only (single machine, multiple agents): no network credentials needed — agents share the same repo on disk.
    • Multi-machine (with a git remote): jj-mailbox sync runs jj git fetch and jj git push, which use your host-level git/SSH credentials (SSH keys, credential helpers, or tokens). Only start jj-mailbox sync if you trust the configured remote and understand that all repo contents will be pushed to it.

How It Works

  • Each agent has an inbox directory: inbox/{agent-name}/new/
  • To send a message, write a JSON file to the recipient's inbox
  • To receive messages, read files from your own inbox
  • The jj-mailbox sync command handles jj git fetch/push in a loop — this is opt-in and only needed for multi-machine setups; it never starts automatically

Your Identity

Your agent name is set by the environment variable JJ_MAILBOX_AGENT. Your mailbox repo is at the path set by JJ_MAILBOX_REPO.

Sending a Message

Use the jj-mailbox CLI:

jj-mailbox send \x3Crecipient> "\x3Csubject>" "\x3Cbody>"

Or write the file directly:

cat > inbox/\x3Crecipient>/new/$(date -u +%Y-%m-%dT%H-%M-%SZ)_${JJ_MAILBOX_AGENT}_msg-$(head -c4 /dev/urandom | xxd -p).json \x3C\x3CEOF
{
  "version": "0.1",
  "id": "msg-$(head -c4 /dev/urandom | xxd -p)",
  "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
  "from": "${JJ_MAILBOX_AGENT}",
  "to": "\x3Crecipient>",
  "type": "message",
  "subject": "\x3Csubject>",
  "body": "\x3Cbody>",
  "refs": [],
  "metadata": {}
}
EOF

Checking Your Inbox

jj-mailbox inbox

Or read files directly from inbox/${JJ_MAILBOX_AGENT}/new/ (sorted by filename = sorted by time).

Processing a Message

After reading a message, move it to processed/:

mv inbox/${JJ_MAILBOX_AGENT}/new/\x3Cfilename>.json inbox/${JJ_MAILBOX_AGENT}/processed/

Seeing Other Agents

jj-mailbox status

Or check agents/ directory — each subdirectory is an agent with profile.json and status.json.

Shared Space

Write to shared/ for content all agents can access:

  • shared/tasks/ — shared task board
  • shared/knowledge/ — shared knowledge base
  • shared/artifacts/ — shared outputs (files, reports, etc.)

Rules

  1. Never modify another agent's processed messages — they are immutable history
  2. Always include from, to, subject, body in messages
  3. Use refs to link replies to original messages for threading
  4. Keep messages small — for large content, write to shared/artifacts/ and reference the path
  5. Check your inbox regularly — other agents may be waiting for your reply
  6. Update your status in agents/{name}/status.json when starting/finishing tasks
  7. Never put secrets, credentials, or sensitive data in the mailbox repo — if a git remote is configured, all repo contents may be pushed to that remote
安全使用建议
This skill appears to do what it says: use a jj repo as a shared mailbox. Before installing or running it: (1) create a dedicated mailbox directory and set JJ_MAILBOX_REPO to it (do not reuse a repo with secrets or important history); (2) avoid putting any credentials or private keys into the mailbox repo — anything in the repo may be pushed to remotes; (3) only run 'jj-mailbox sync' if you trust the configured git remote and understand it will perform fetch/push with your host git/SSH credentials; (4) make the included jj-mailbox.sh executable and review it (it uses python3 one-liners and jj/git commands) before copying to PATH; (5) be cautious if you plan to let an agent autonomously start sync — that increases the blast radius if the remote or repo are untrusted.
功能分析
Type: OpenClaw Skill Name: jj-mailbox Version: 0.1.3 The jj-mailbox skill provides a legitimate file-based messaging system for AI agents using the Jujutsu (jj) version control system. The included bash script (jj-mailbox.sh) handles message creation, inbox management, and synchronization via git remotes. The implementation follows secure practices, such as using sys.argv in Python calls to prevent shell injection, and the documentation (SKILL.md) clearly outlines the operational scope and security considerations regarding remote synchronization and sensitive data.
能力评估
Purpose & Capability
The name/description (jj-based file mailbox) align with the listed binaries (jj, git, python3) and the provided CLI script (jj-mailbox.sh). Required env vars (JJ_MAILBOX_REPO, JJ_MAILBOX_AGENT, JJ_MAILBOX_INTERVAL) directly map to mailbox path, agent identity, and sync interval. One minor mismatch: the registry declares a required binary named 'jj-mailbox' while the bundle provides 'jj-mailbox.sh' (the SKILL.md explains the script should be copied to PATH).
Instruction Scope
SKILL.md and the included script stick to repo-local operations (inbox/, agents/, shared/) for send/receive/registration. The only out-of-repo/network behavior is an opt-in sync loop that runs 'jj git fetch' and 'jj git push' — SKILL.md explicitly warns about this. No instructions ask the agent to read unrelated system files or exfiltrate data beyond the mailbox repo.
Install Mechanism
This is an instruction-only skill with an included shell script; there is no automated install or remote download. Nothing in the bundle silently writes arbitrary code to disk beyond the provided script.
Credentials
Requested environment variables are minimal and appropriate for the mailbox. The main security consideration is that 'jj git fetch/push' will use whatever host-level git/SSH credentials are configured; the skill does not request secrets directly but will operate with host credentials when sync is run.
Persistence & Privilege
The skill is not set to always:true and does not request elevated or persistent platform privileges. It does not modify other skills or system-wide agent settings. Autonomous invocation is allowed by default (platform normal), but the skill does not require automatic background behavior — sync is explicitly opt-in.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install jj-mailbox
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /jj-mailbox 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.3
Declare JJ_MAILBOX_INTERVAL env var, add explicit Scope section bounding file access to mailbox repo only, document that sync is opt-in and never auto-starts, document host-level git/SSH credential usage for multi-machine mode.
v0.1.2
Fix env var declaration format (string[] not object), bundle jj-mailbox CLI script, add data safety rule against putting secrets in the mailbox repo.
v0.1.1
Fix security scan flags: declare jj-mailbox CLI in required bins, add required env vars (JJ_MAILBOX_REPO, JJ_MAILBOX_AGENT), document prerequisites and credential requirements, clarify local-only vs multi-machine network needs.
v0.1.0
- Initial release of jj-mailbox for agent messaging via Jujutsu (jj) version control. - Enables agents to send, receive, and process JSON messages through a shared, file-based inbox structure. - Supports cross-machine collaboration with no infrastructure beyond a git remote. - Includes CLI tools and direct file operations for sending and checking messages. - Adds shared spaces for tasks, knowledge, and artifacts to enable team workflows. - Enforces clear rules for message structure, processing, and agent status updates.
元数据
Slug jj-mailbox
版本 0.1.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

Jj Mailbox 是什么?

Send and receive messages between AI agents using jj (Jujutsu) version control as a file-based mailbox. Enables cross-machine agent collaboration with zero i... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 254 次。

如何安装 Jj Mailbox?

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

Jj Mailbox 是免费的吗?

是的,Jj Mailbox 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Jj Mailbox 支持哪些平台?

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

谁开发了 Jj Mailbox?

由 MiaoDX(@miaodx)开发并维护,当前版本 v0.1.3。

💬 留言讨论