# Send ClawTime Setup to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "clawtime-setup",
    "name": "ClawTime Setup",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/bewareofddog/clawtime-setup",
    "canonicalUrl": "https://clawhub.ai/bewareofddog/clawtime-setup",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/clawtime-setup",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawtime-setup",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/device-auth.md",
      "references/launchd.md",
      "references/troubleshooting.md",
      "scripts/install.sh"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "clawtime-setup",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-29T12:12:18.993Z",
      "expiresAt": "2026-05-06T12:12:18.993Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawtime-setup",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=clawtime-setup",
        "contentDisposition": "attachment; filename=\"clawtime-setup-1.2.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "clawtime-setup"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/clawtime-setup"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/clawtime-setup",
    "downloadUrl": "https://openagent3.xyz/downloads/clawtime-setup",
    "agentUrl": "https://openagent3.xyz/skills/clawtime-setup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/clawtime-setup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/clawtime-setup/agent.md"
  }
}
```
## Documentation

### ClawTime — Local Installation with Cloudflare Tunnel

ClawTime is a private webchat UI connecting to the OpenClaw gateway via WebSocket.
Features: passkey (Face ID/Touch ID) auth, Piper TTS voice, 3D avatar.

Why Cloudflare is required: WebAuthn (passkeys) need HTTPS on a real domain.
http://localhost only works on the same machine — not from a phone on your network.

### Architecture

iPhone/Browser → https://portal.yourdomain.com → Cloudflare Tunnel → localhost:3000 (ClawTime) → ws://127.0.0.1:18789 (OpenClaw Gateway)

### Prerequisites

Node.js v22+
cloudflared CLI: brew install cloudflared
A domain with DNS on Cloudflare (free tier works)
OpenClaw running: openclaw status
(Optional) Piper TTS + ffmpeg for voice

### 1. Clone & install

cd ~/Projects
git clone https://github.com/youngkent/clawtime.git
cd clawtime
npm install --legacy-peer-deps

### 2. Set up Cloudflare Tunnel

# Login to Cloudflare
cloudflared tunnel login

# Create named tunnel
cloudflared tunnel create clawtime

# Configure routing
# Edit ~/.cloudflared/config.yml:

~/.cloudflared/config.yml:

tunnel: clawtime
credentials-file: /Users/YOUR_USER/.cloudflared/<tunnel-id>.json

ingress:
  - hostname: portal.yourdomain.com
    service: http://localhost:3000
  - service: http_status:404

Then in Cloudflare DNS dashboard: add a CNAME record:

Name: portal → Target: <tunnel-id>.cfargotunnel.com (Proxied ✅)

### 3. Configure OpenClaw gateway

The gateway must whitelist ClawTime's origin:

openclaw config patch '{"gateway":{"controlUi":{"allowedOrigins":["https://portal.yourdomain.com"]}}}'
openclaw gateway restart

⚠️ PUBLIC_URL must match this origin exactly — it's used as the WebSocket origin header for device auth.

### 4. Start ClawTime server

Minimum (no TTS):

cd ~/Projects/clawtime
PUBLIC_URL=https://portal.yourdomain.com \\
SETUP_TOKEN=<your-setup-token> \\
GATEWAY_TOKEN=<gateway-token> \\
node server.js

With Piper TTS:

cd ~/Projects/clawtime
PUBLIC_URL=https://portal.yourdomain.com \\
SETUP_TOKEN=<your-setup-token> \\
GATEWAY_TOKEN=<gateway-token> \\
BOT_NAME="Beware" \\
BOT_EMOJI="🌀" \\
TTS_COMMAND='python3 -m piper --data-dir ~/Documents/resources/piper-voices -m en_US-kusal-medium -f /tmp/clawtime-tts-tmp.wav -- {{TEXT}} && ffmpeg -y -loglevel error -i /tmp/clawtime-tts-tmp.wav {{OUTPUT}}' \\
node server.js

⚠️ TTS Security Note: The {{TEXT}} placeholder is substituted into a shell command.
ClawTime's server must sanitize text before substitution to prevent command injection.
The server should strip or escape shell metacharacters (; | & $ \\ ( ) { } < >) from user input before passing it to the TTS command. If you're modifying the TTS pipeline, use child_process.execFile()with argument arrays instead ofchild_process.exec()\` with string
interpolation.

### 5. Start Cloudflare tunnel

cloudflared tunnel run clawtime

### 6. Register passkey (first time only)

Open https://portal.yourdomain.com/?setup=<your-setup-token> in Safari
Follow the passkey (Face ID / Touch ID) prompt
❌ Do NOT use private/incognito mode — Safari blocks passkeys there
❌ Do NOT use Chrome on iOS — use Safari

After registration, access ClawTime at https://portal.yourdomain.com.

### Environment Variables

VariableRequiredDescriptionPUBLIC_URL✅Public HTTPS URL (must match allowedOrigins in gateway config)GATEWAY_TOKEN✅OpenClaw gateway auth tokenSETUP_TOKENFor registrationPassphrase for ?setup=<token> passkey registration URLTTS_COMMANDFor voicePiper command with {{TEXT}} and {{OUTPUT}} placeholdersBOT_NAMENoDisplay name (default: "Beware")BOT_EMOJINoAvatar emoji (default: "🌀")PORTNoServer port (default: 3000)

### Storing Tokens Securely (recommended)

Instead of passing tokens as plaintext env vars or in plist files, store them in macOS Keychain:

# Store tokens in Keychain
security add-generic-password -s "clawtime-gateway-token" -a "$(whoami)" -w "YOUR_GATEWAY_TOKEN"
security add-generic-password -s "clawtime-setup-token" -a "$(whoami)" -w "YOUR_SETUP_TOKEN"

Then retrieve them at launch time:

GATEWAY_TOKEN=$(security find-generic-password -s "clawtime-gateway-token" -a "$(whoami)" -w) \\
SETUP_TOKEN=$(security find-generic-password -s "clawtime-setup-token" -a "$(whoami)" -w) \\
PUBLIC_URL=https://portal.yourdomain.com \\
node server.js

This avoids storing secrets in plaintext on disk.

### Device Authentication (Critical)

ClawTime authenticates with the OpenClaw gateway using Ed25519 keypair auth.
This is where most installs break — see details in references/device-auth.md.

Quick summary:

Keypair auto-generated in ~/.clawtime/device-key.json on first run
Device ID = SHA-256 of raw 32-byte Ed25519 pubkey (NOT the full SPKI-encoded key)
Signature payload format: v2|deviceId|clientId|clientMode|role|scopes|signedAtMs|token|nonce
If device auth fails → delete ~/.clawtime/device-key.json and restart

### Auto-Start on Boot (macOS launchd)

See references/launchd.md for plist templates for both the server and tunnel.

### Managing Services

# Stop server
pkill -f "node server.js"

# Stop tunnel
pkill -f "cloudflared"

# View logs (if backgrounded)
tail -f /tmp/clawtime.log
tail -f /tmp/cloudflared.log

# Restart after code/config changes
pkill -9 -f "node server.js"; sleep 2; # then re-run start command

### Getting the Gateway Token

# From macOS Keychain
security find-generic-password -s "openclaw-gateway-token" -a "$(whoami)" -w

# From config file
cat ~/.openclaw/openclaw.json | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('gateway',{}).get('token',''))"

### Passkey Operations

# Reset passkeys (re-register from scratch)
echo '[]' > ~/.clawtime/credentials.json
# Restart server, then visit /?setup=<token>

# Reset device key (new keypair on next restart)
rm ~/.clawtime/device-key.json

### Troubleshooting

See references/troubleshooting.md for all common errors and fixes.
See references/device-auth.md for deep-dive on gateway auth issues.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: bewareofddog
- Version: 1.2.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-29T12:12:18.993Z
- Expires at: 2026-05-06T12:12:18.993Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/clawtime-setup)
- [Send to Agent page](https://openagent3.xyz/skills/clawtime-setup/agent)
- [JSON manifest](https://openagent3.xyz/skills/clawtime-setup/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/clawtime-setup/agent.md)
- [Download page](https://openagent3.xyz/downloads/clawtime-setup)