AGENT SKILL

proximity-ping

Local R1-to-R1 icebreaker relay for events and gatherings. Broadcasts ephemeral anonymous availability pings within a named relay group, detects mutual pings within a 10-second window, and delivers matching icebreaker prompts to both R1s simultaneously. Also handles group pings and custom icebreaker pack generation via the R1 built-in LLM.

License 许可
MIT
最近更新
2026-09-04
Stars
★ 0
Forks
0

01 前言 Front Matter

name
proximity-ping
author
rabbit-r1-skillz
version
1.0.0
description
Local R1-to-R1 icebreaker relay for events and gatherings. Broadcasts ephemeral anonymous availability pings within a named relay group, detects mutual pings within a 10-second window, and delivers matching icebreaker prompts to both R1s simultaneously. Also handles group pings and custom icebreaker pack generation via the R1 built-in LLM.

02 资源文件 3

03 SKILL.md 正文

ProximityPing — OpenClaw Skill

ProximityPing uses the OpenClaw shared-storage bridge to relay anonymous ping signals between R1 devices at the same event. When two R1s shake within 10 seconds of each other, the relay delivers a match signal and a synchronized icebreaker prompt to both screens. Group pings collect headcounts from everyone in the named relay group.

No location data is collected. No identities are stored. Pings expire after 10 seconds and are never persisted.

Architecture

R1 (Alice) ──ocSend──► OpenClaw relay skill ──ocResp──► R1 (Alice)
                              │
                              └──push──► R1 (Bob) via onPluginMessage

Each R1 writes a ping record to shared storage. The relay skill watches for overlapping pings in the same group, picks an icebreaker, and writes match responses for both participants simultaneously.

Commands

broadcast_ping

Sent by a single R1 when the user shakes to activate ping mode.

Params:

Field Type Description
pingId string Unique ID for this ping instance (ts-random)
group string Named relay group (e.g. "hackathon")
ts number Unix timestamp of ping activation (ms)

Relay behavior:

  • Stores ping in the group window buffer (TTL 10 seconds)
  • If another ping in the same group was received within the last 10 seconds, immediately issues a match response to both participants
  • Otherwise waits up to 10 seconds for an overlapping ping

Returns data: (polled by R1 via ocReceive)

{
  "type": "match",
  "group": "hackathon",
  "icebreaker": "What's something you're working on right now that excites you?",
  "ts": 1718000000123
}

Or no response if the ping window expires with no match (R1 handles the timeout locally).

broadcast_group

Sent by one R1 when the user long-presses to start a group ping.

Params:

Field Type Description
group string Named relay group
ts number Unix timestamp (ms)

Relay behavior:

  • Broadcasts relay_group_response push messages to all R1s in the group that are currently active (received any command in the last 60 seconds)
  • Counts R1s that acknowledge the broadcast
  • Returns incremental response count updates over 20 seconds

Returns data: (incremental, polled via ocReceive)

{
  "type": "group_response",
  "group": "hackathon",
  "count": 3
}

Icebreaker selection

The relay skill selects a random icebreaker from its built-in library of 54+ prompts and delivers the same prompt to both matched R1s. This ensures both screens show identical questions without any R1 needing to communicate content to the other.

If a custom pack was loaded for the event group, the relay prefers those prompts.

Privacy model

  • Pings contain no identifying information. The pingId is a random token discarded after the 10-second window.
  • No IP addresses, device identifiers, or user data are stored.
  • The relay group name is a shared secret known only to attendees. It is not authenticated — anyone who knows the group name can join.
  • Ping records are held in memory only; nothing is written to disk.
  • The relay does not log which pings matched which.

Prerequisites

  • Node.js 20+
  • OpenClaw CLI (npm install -g openclaw-cli && openclaw serve)
  • All R1 devices on the same local network (same WiFi as the machine running OpenClaw) or behind a shared relay endpoint

Local setup

1. Install dependencies

mkdir -p ~/.openclaw/skills/proximity-ping
cd ~/.openclaw/skills/proximity-ping
npm init -y
npm install dotenv

2. Configure environment (optional)

No additional API keys are required. Custom icebreaker pack generation uses the R1's built-in LLM and requires no external credentials.

3. Register the skill

Add to ~/.openclaw/openclaw.config.json:

{
  "skills": [
    {
      "name": "proximity-ping",
      "path": "~/.openclaw/skills/proximity-ping/skill.js",
      "description": "R1-to-R1 ephemeral ping relay for event icebreakers"
    }
  ]
}

4. Create the skill file

Create ~/.openclaw/skills/proximity-ping/skill.js:

"use strict";
require("dotenv").config({ path: __dirname + "/.env" });

// ── In-memory ping buffer ──────────────────────────────────────────────────
// Map<group, Map<pingId, { ts: number, respondFn: Function }>>
const pingBuffer = new Map();
const PING_TTL_MS = 10500; // 10.5s — small buffer beyond the 10s window

// Built-in icebreaker library (subset; full list is in the R1 app)
const ICEBREAKERS = [
  "What's a skill you picked up during the pandemic that you still use?",
  "What's the most recent thing that made you genuinely laugh out loud?",
  "What's something you're working on right now that excites you?",
  "If you could teleport anywhere for the next two hours, where would you go?",
  "What's a piece of media that changed how you see the world?",
  "What's the weirdest job you've ever heard of that someone actually does?",
  "What's one app or tool you couldn't live without right now?",
  "What's something you believed ten years ago that you've completely reversed on?",
  "If you had to eat the same meal every day for a month, what would it be?",
  "What's a hobby you've always wanted to pick up but haven't started yet?",
  "What's the most underrated city you've ever visited?",
  "What's the best piece of advice you've ever gotten?",
  "What's a small ritual or habit that anchors your day?",
  "What's something you're embarrassingly good at?",
  "What would you do with a completely free Saturday?",
  "What's the last thing you learned that genuinely surprised you?",
  "What's a question you keep coming back to but haven't answered yet?",
  "What's a local spot you always recommend to visitors?",
  "If you could un-invent one thing, what would it be?",
  "What's a podcast or creator you think is underrated?",
];

// Custom packs per group: Map<group, string[]>
const customPacks = new Map();

// Active R1 sessions (for group ping broadcasts): Map<group, Set<respondFn>>
const activeClients = new Map();

function pickIcebreaker(group) {
  const custom = customPacks.get(group) || [];
  const pool = custom.length > 0 ? [...ICEBREAKERS, ...custom] : ICEBREAKERS;
  return pool[Math.floor(Math.random() * pool.length)];
}

function cleanExpiredPings() {
  const now = Date.now();
  for (const [group, pings] of pingBuffer.entries()) {
    for (const [id, entry] of pings.entries()) {
      if (now - entry.ts > PING_TTL_MS) {
        pings.delete(id);
      }
    }
    if (pings.size === 0) pingBuffer.delete(group);
  }
}

// ── Command handlers ───────────────────────────────────────────────────────

async function cmdBroadcastPing({ pingId, group, ts }, respondFn) {
  cleanExpiredPings();

  if (!pingBuffer.has(group)) pingBuffer.set(group, new Map());
  const groupPings = pingBuffer.get(group);

  // Check for an existing ping from another device in this group
  const others = [...groupPings.entries()].filter(([id]) => id !== pingId);

  if (others.length > 0) {
    // Match! Pick the oldest pending ping
    const [otherId, otherEntry] = others.sort((a, b) => a[1].ts - b[1].ts)[0];
    const icebreaker = pickIcebreaker(group);
    const matchPayload = { type: "match", group, icebreaker, ts: Date.now() };

    // Remove both pings
    groupPings.delete(otherId);
    groupPings.delete(pingId);

    // Respond to the other device
    if (typeof otherEntry.respondFn === "function") {
      otherEntry.respondFn(matchPayload);
    }

    // Respond to this device
    return matchPayload;
  }

  // No match yet — register this ping and wait for one (or timeout)
  return new Promise((resolve) => {
    const entry = {
      ts,
      respondFn: (matchPayload) => {
        clearTimeout(expiryTimer);
        groupPings.delete(pingId);
        resolve(matchPayload);
      },
    };

    groupPings.set(pingId, entry);

    // Expire after 10.5s with no match
    const expiryTimer = setTimeout(() => {
      groupPings.delete(pingId);
      resolve(null); // null = no match, R1 handles locally
    }, PING_TTL_MS);
  });
}

async function cmdBroadcastGroup({ group, ts }) {
  if (!activeClients.has(group)) activeClients.set(group, new Set());
  const clients = activeClients.get(group);

  let count = 0;
  const notifyPayload = { type: "group_response", group, count: 0 };

  // Broadcast to all registered clients in the group (except the sender)
  for (const clientFn of clients) {
    try {
      clientFn({ ...notifyPayload, count: ++count });
    } catch (_) {
      clients.delete(clientFn);
    }
  }

  return { type: "group_response", group, count };
}

// ── Main export ────────────────────────────────────────────────────────────

module.exports = async function proximityPing(command, params, respondFn) {
  switch (command) {
    case "broadcast_ping":
      return cmdBroadcastPing(params, respondFn);

    case "broadcast_group":
      return cmdBroadcastGroup(params);

    default:
      return { error: `Unknown command: ${command}` };
  }
};

5. Start OpenClaw

openclaw serve

proximity-ping should appear in the registered skills list. All R1 devices on the same network can now relay pings through this machine.

Multi-device setup

For pings to match between two R1 devices, both must:

  1. Be connected to the same WiFi network as the machine running OpenClaw
  2. Be configured to use the same event group name (default is "default")
  3. Shake within 10 seconds of each other

Group name coordination happens on-device via the scroll wheel + PTT setup screen. No app install or account is needed on attendees' R1s.

Custom icebreaker packs

The R1 app can generate a custom 10-prompt icebreaker pack tuned to a specific event theme using the R1's built-in LLM. No external API key or additional skill is required.

The R1 sends the generation prompt directly to the built-in LLM via PluginMessageHandler and receives the result through window.onPluginMessage. The generated pack is stored locally on the R1 for 24 hours before expiring, after which it falls back to the built-in library.

Troubleshooting

Two R1s shook but no match appeared

  • Confirm both R1s are in the same event group (check the group name on each device via scroll → setup)
  • Confirm both pings happened within 10 seconds of each other
  • Confirm openclaw serve is running on a machine reachable by both R1s
  • If OpenClaw is unreachable, ProximityPing degrades gracefully but cannot relay between two separate devices. Single-device mode still shows icebreakers.

Group ping shows 0 responses

  • Other R1s must also have the ProximityPing app open and the same group name configured
  • The group ping window is 20 seconds — responses after that are not counted

Custom icebreaker pack generation times out

  • The R1 built-in LLM has a 45-second timeout for pack generation
  • The R1 falls back to the built-in library automatically if generation fails

OpenClaw not detecting R1 on network

  • Both devices must be on the same subnet (same WiFi or wired LAN)
  • Firewalls on the host machine must allow the OpenClaw port (default 7654)

Security notes

  • This skill holds ping state in memory only; no data is persisted to disk.
  • The relay group name is the only access control. Choose group names that are unlikely to collide with other events in the same venue (e.g. include a date or event acronym: "summit-2026-06").
  • OpenClaw communicates over localhost by default. Do not expose the OpenClaw port to the public internet.
  • No personal data, device IDs, or user accounts are involved at any point.

04 同仓库更多 Skills

ajohnsonnow
ajohnsonnow/r1-warren

whisper-quiz

WhisperQuiz — voice-answered trivia game for Rabbit R1. Generates questions via the R1's built-in LLM, captures spoken answers via STT, and evaluates correctness with flexible LLM-based matching.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

walk-cast

Walking podcast production skill. Receives raw audio metadata and transcript from the R1, removes long pauses, applies noise reduction and normalization, generates AI chapter titles and episode metadata via LLM, and uploads the final episode to your configured podcast RSS host (Spotify for Podcasters / Anchor, Podbean, Buzzsprout, RSS.com, or any FTP-accessible feed).

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-novel

Local machine skill for VoiceNovel — handles story export to disk.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-guide

Environment description and navigation assistant for blind and low-vision users. Analyzes camera frames via a vision LLM, reads visible text, identifies scene categories (people/vehicles/food/hazards/exits), performs 360° scans, retrieves GPS position, and sends emergency SMS alerts — all via audio feedback with zero screen dependency.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-draft

Voice-driven document drafting for the Rabbit R1. Dictate stream-of-consciousness speech; the R1 formats it into Email, Blog Post, Report, Proposal, Meeting Notes, Creative Writing, Code Comments, Cover Letter, or Tweet Thread — then saves the result to a configured folder on your local machine via OpenClaw.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-commit

Hands-free git and CI workflow voice controller for the Rabbit R1. Speak git/CI commands and hear results — commit, push, status, PR management, test runs, and deploy, all voice-driven via OpenClaw.

★ 0