← Back to Skills Marketplace
miaodx

Jj Mailbox

by MiaoDX · GitHub ↗ · v0.1.3 · MIT-0
cross-platform ✓ Security Clean
254
Downloads
1
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install jj-mailbox
Description
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...
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install jj-mailbox
  3. After installation, invoke the skill by name or use /jj-mailbox
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug jj-mailbox
Version 0.1.3
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 254 downloads so far.

How do I install Jj Mailbox?

Run "/install jj-mailbox" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Jj Mailbox free?

Yes, Jj Mailbox is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Jj Mailbox support?

Jj Mailbox is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Jj Mailbox?

It is built and maintained by MiaoDX (@miaodx); the current version is v0.1.3.

💬 Comments