← 返回 Skills 市场
daaab

Even G2 Bridge

作者 Ju Chun Ko · GitHub ↗ · v5.2.0
cross-platform ⚠ suspicious
371
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install even-g2-bridge
功能描述
Connect Even Realities G2 smart glasses to OpenClaw via Cloudflare Worker. Deploys a bridge that routes G2 voice commands to your OpenClaw Gateway — same age...
使用说明 (SKILL.md)

Even Realities G2 × OpenClaw Bridge

Deploy a Cloudflare Worker that connects Even Realities G2 smart glasses to your OpenClaw Gateway.

What It Does

G2 Glasses → (voice→text) → CF Worker → OpenClaw Gateway → Full Agent
                                ↓                              ↓
                          G2 display (text)            Telegram (rich content)
  • Short tasks (chat, questions): Gateway responds → displayed on G2
  • Long tasks (write code, articles): G2 shows "Working on it..." → result sent to Telegram
  • Image generation: DALL-E generates → sent to Telegram (G2 can't show images)
  • Fallback: If Gateway is down, falls back to direct Claude API

Prerequisites

  1. Even Realities G2 glasses with Even app (v0.0.7+ with "Add Agent" support)
  2. OpenClaw Gateway with HTTP API enabled
  3. Cloudflare account (free plan works)
  4. Anthropic API key (fallback)
  5. Optional: OpenAI API key (image gen), Telegram bot token (rich content delivery)

Setup

1. Enable OpenClaw Gateway HTTP API

On your OpenClaw host, enable the chat completions endpoint:

openclaw config set gateway.http.endpoints.chatCompletions.enabled true
openclaw gateway restart

Verify:

curl -X POST https://YOUR_GATEWAY_URL/v1/chat/completions \
  -H "Authorization: Bearer YOUR_GATEWAY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model":"openclaw","messages":[{"role":"user","content":"hi"}]}'

2. Deploy Cloudflare Worker

Copy scripts/worker.js to your project, then deploy:

# Install wrangler
npm install -g wrangler

# Login to Cloudflare
wrangler login

# Deploy
wrangler deploy

Or use the Cloudflare Dashboard: Workers & Pages → Create → Upload worker.js.

3. Set Secrets

# Required
wrangler secret put GATEWAY_URL      # Your OpenClaw Gateway URL
wrangler secret put GATEWAY_TOKEN    # Your Gateway auth token
wrangler secret put G2_TOKEN         # Token for G2 glasses auth (you choose)
wrangler secret put ANTHROPIC_API_KEY # Fallback when Gateway is down

# Optional (for Telegram delivery of rich content)
wrangler secret put TELEGRAM_BOT_TOKEN
wrangler secret put TELEGRAM_CHAT_ID

# Optional (for image generation)
wrangler secret put OPENAI_API_KEY

4. Configure G2 Glasses

In Even app → Settings → Add Agent:

  • Name: Your agent name (e.g., "Cloud Lobster")
  • URL: https://YOUR_WORKER.workers.dev
  • Token: The G2_TOKEN you set above

5. Test

curl -X POST https://YOUR_WORKER.workers.dev \
  -H "Authorization: Bearer YOUR_G2_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model":"openclaw","messages":[{"role":"user","content":"Hello, who are you?"}]}'

Architecture

Request Flow

  1. G2 converts speech → text, sends as OpenAI chat completion format
  2. Worker authenticates via G2_TOKEN
  3. Worker classifies request:
    • Image gen → DALL-E + Telegram (immediate G2 ack)
    • Long task → immediate G2 ack + background Gateway call → Telegram
    • Short task → proxy to Gateway → return to G2
  4. Gateway runs full agent loop (memory, tools, skills)
  5. Response filtered for G2 display (no URLs, code blocks → Telegram)

Security

Two-layer token auth:

G2 --[G2_TOKEN]--> Worker --[GATEWAY_TOKEN]--> Gateway
  • G2 only knows G2_TOKEN — if glasses are lost, change only this token
  • GATEWAY_TOKEN stays in Worker secrets, never exposed to glasses
  • Gateway HTTP API should be behind auth (token or password mode)

G2 Display Limitations

  • 576×136 pixels, monochrome green, ~48 chars wide
  • Text only (no images, no markdown rendering)
  • Worker auto-filters: URLs → [link], code blocks → [code], long text → truncated
  • Non-displayable content forwarded to Telegram

Customization

Edit the task classification regex in worker.js:

  • isLongTask() — patterns that trigger background processing
  • isImageGenRequest() — patterns that trigger DALL-E

Troubleshooting

  • G2 says "Unauthorized": Check G2_TOKEN matches in Worker secrets and Even app
  • "Gateway not configured": Verify GATEWAY_URL and GATEWAY_TOKEN secrets are set
  • Timeout on short tasks: Gateway may be slow; increase SHORT_TIMEOUT (max ~25s for CF Workers)
  • No Telegram delivery: Check TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID secrets
  • Gateway returns 404: Ensure chatCompletions.enabled: true in OpenClaw config + restart
安全使用建议
Before installing or deploying: - Treat the registry metadata as incomplete: SKILL.md and worker.js require secrets (GATEWAY_URL, GATEWAY_TOKEN, G2_TOKEN, ANTHROPIC_API_KEY) even though the registry entry lists none. Confirm the seller/author and correct metadata before proceeding. - Do not deploy the Worker without setting G2_TOKEN. The code will only enforce request auth if G2_TOKEN is present; leaving it unset could let anyone call your worker which (if GATEWAY_TOKEN is set) will forward requests to your Gateway. Always set a G2_TOKEN and a scoped GATEWAY_TOKEN. - Review why ANTHROPIC_API_KEY is marked required in SKILL.md: it is used as a fallback when the Gateway is unreachable and could reasonably be optional. If you don't want third-party fallbacks, omit/clear that secret and adjust the code. - Use a least-privilege Gateway token (scoped, limited TTL) for the Worker; verify the Worker never returns or leaks GATEWAY_TOKEN in responses/logs. - If you enable image or Telegram features, be aware those services will receive user content (OpenAI, Telegram). Confirm you accept that behavior and that privacy policies are appropriate. - Confirm the author/source (SKILL.md claims a GitHub repo). If the repository is available, review it and compare versions. If the source is unknown, treat the skill as higher risk. If these issues (metadata mismatch, mandatory Anthropic key, auth-enforcement behavior) are clarified and fixed, the skill's behavior is coherent for its purpose; until then, consider this suspicious and proceed cautiously.
功能分析
Type: OpenClaw Skill Name: even-g2-bridge Version: 5.2.0 The skill provides a Cloudflare Worker bridge to connect Even Realities G2 smart glasses with an OpenClaw Gateway. The implementation in `worker.js` follows the documented architecture, using a two-layer token authentication system and standard API integrations (Anthropic, OpenAI, Telegram) to handle voice commands and rich content delivery. No indicators of malicious intent, data exfiltration, or unauthorized execution were found; the code is transparent and aligned with its stated purpose.
能力评估
Purpose & Capability
The code and SKILL.md align with the stated purpose: a Cloudflare Worker proxies G2 requests to an OpenClaw Gateway and optionally calls Anthropic, OpenAI, and Telegram. However registry metadata lists no required environment variables or binaries while SKILL.md and worker.js require several secrets (GATEWAY_URL, GATEWAY_TOKEN, G2_TOKEN, ANTHROPIC_API_KEY, etc.). That mismatch between registry metadata and the skill's own instructions is incoherent and should be corrected.
Instruction Scope
SKILL.md instructions are specific and limited to deploying a Cloudflare Worker, setting worker secrets, and configuring the OpenClaw Gateway and G2 app. The instructions direct traffic only to the Gateway, Anthropic, OpenAI, and Telegram — all services documented in the skill. A minor scope discrepancy: SKILL.md instructs installing and using the 'wrangler' CLI (npm), but the registry metadata does not declare any required binaries.
Install Mechanism
This is an instruction-only skill with an included worker.js file (no install spec). There are no downloads from arbitrary URLs or obscure installers. The explicit instruction to npm install -g wrangler is reasonable for deploying Cloudflare Workers but should have been declared as an expected binary in the registry metadata.
Credentials
The worker expects several secrets appropriate for its function (gateway URL/token, G2_TOKEN, optional Telegram/OpenAI). Two issues raise concern: (1) SKILL.md marks ANTHROPIC_API_KEY as required even though it is only a fallback — requiring a third-party API key for basic operation is disproportionate; (2) the code enforces G2 authentication only if env.G2_TOKEN is present (it checks 'if (env.G2_TOKEN) { require auth }'), meaning a deployed worker without G2_TOKEN would accept unauthenticated requests and simply forward them to the Gateway (if gateway token present). Combined with the registry metadata claiming no required env vars, this creates potential for misconfiguration and unintended exposure.
Persistence & Privilege
The skill is not always-enabled and does not request persistent system-wide privileges. It uses Cloudflare Worker background tasks (ctx.waitUntil) for long work, which is normal. It does not attempt to modify other skills or agent config files.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install even-g2-bridge
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /even-g2-bridge 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v5.2.0
Add Even Realities logo as skill icon
v5.1.0
Declare all required/optional secrets in SKILL.md metadata to pass ClawHub security scan
v5.0.0
Initial release: G2 smart glasses x OpenClaw Bridge with short/long task routing, image gen, Telegram delivery
元数据
Slug even-g2-bridge
版本 5.2.0
许可证
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Even G2 Bridge 是什么?

Connect Even Realities G2 smart glasses to OpenClaw via Cloudflare Worker. Deploys a bridge that routes G2 voice commands to your OpenClaw Gateway — same age... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 371 次。

如何安装 Even G2 Bridge?

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

Even G2 Bridge 是免费的吗?

是的,Even G2 Bridge 完全免费(开源免费),可自由下载、安装和使用。

Even G2 Bridge 支持哪些平台?

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

谁开发了 Even G2 Bridge?

由 Ju Chun Ko(@daaab)开发并维护,当前版本 v5.2.0。

💬 留言讨论