Community编程与开发github.com

Telegram Crabbox 端到端验证

用于评审、复现或证明 OpenClaw Telegram 在 Crabbox 上与真实 Telegram 用户交互的行为,包括需要 Agent 控制的 Telegram Desktop 录屏、TDLib 用户驱动命令、Convex 租赁凭证、WebVNC 观察以及基于运动裁剪的制品。

Telegram Crabbox 端到端验证 是什么?

该技能旨在为 OpenClaw Telegram PR 审查或 Bug 复现提供完整的端到端验证能力,特别是当机器人间互测不足时。它允许 AI Agent 在 Crabbox 上启动并维持一个真实的 Telegram 用户会话,通过租赁 Convex 上的共享匿名账户来模拟用户操作。技能支持使用 TDLib 和 Telegram Desktop 进行消息收发、通过 WebVNC 实时观察桌面状态、执行录屏并生成仅包含运动变化的 GIF 制品,从而为 PR 提供确凿的视觉证据。它兼容多种平台(OpenClaw 仓库、Crabbox 基础设施),并通过详细的命令集(start、send、view、run、screenshot、finish、publish)确保整个流程的自动化和可审计性。该技能特别强调安全性,禁止使用个人账户、禁止将凭证存入仓库或提示词,并在每次任务后正确释放资源。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/.agents/skills/telegram-crabbox-e2e-proof

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Telegram Crabbox 端到端验证 是做什么的?

当机器人间的互测不足以证明时,请使用此技能进行 Telegram PR 审查或 Bug 复现。目标是让 Agent 维持一个真实的 Telegram 用户会话,直到满意为止,然后附加视觉证据。

禁止使用个人账户。 不要将凭据添加到仓库、提示词或制品包中。运行程序从 Convex 租赁共享的匿名账户。

启动

在待测试的 OpenClaw 仓库和分支下运行:

proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
"$proof_cmd" start \
  --tdlib-url http://artifacts.openclaw.ai/tdlib-v1.8.0-linux-x64.tgz \
  --output-dir .artifacts/qa-e2e/telegram-user-crabbox/pr-review

这将启动一个被保持的会话:

  • 租赁独占的 telegram-user Convex 凭证
  • 使用同一用户账户恢复 TDLib 和 Telegram Desktop
  • 从当前检出启动一个模拟的 OpenClaw Telegram SUT(被测系统)
  • 在可见的 Linux 桌面中选择配置的 Telegram 聊天
  • 以 24fps 开始桌面录屏
  • 写入 .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json

在调查期间保持会话存活。Agent 可以测试几分钟、运行多条命令、使用 WebVNC、检查对话记录,只有在行为被理解后才结束。

为了实现确定性的视觉复现,将确切的模拟模型回复放入一个文件中,并传递给 start:

proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
"$proof_cmd" start \
  --tdlib-url http://artifacts.openclaw.ai/tdlib-v1.8.0-linux-x64.tgz \
  --mock-response-file .artifacts/qa-e2e/telegram-user-crabbox/reply.txt \
  --output-dir .artifacts/qa-e2e/telegram-user-crabbox/pr-review

运行程序默认使用 --class standard、--record-fps 24、--preview-fps 24 和 --preview-width 1920。除非验证需要其他设置,否则请保留这些默认值。

测试期间

为获取视觉证据,首先发送或识别一个底部标记消息,然后直接通过消息 ID 打开群组/话题:

proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
"$proof_cmd" view \
  --session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json \
  --message-id <消息ID>

这直接使用 Telegram Desktop 配合 tg://privatepost,而不是 xdg-open。它还会将 Telegram 窗口大小调整为 650x1000,并放置在测试桌面位置,以便裁剪时可以隔离聊天面板,即使 Telegram 保持分割/侧边栏布局。在此之后不要按 Escape 键;Escape 可能会关闭选中的聊天。

底部行为很重要:

  • 深度链接到最新消息会使 Telegram 固定在底部,使得后续消息在录屏中实时显示
  • 深度链接到较旧消息不会自动滚动到新消息;请再次链接到最新/最终标记,而不是点击向下箭头
  • 裁剪后的 GIF 特意使用聊天面板,而不是整个桌面或整个 Telegram 窗口

以真实 Telegram 用户身份发送消息:

proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
"$proof_cmd" send \
  --session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json \
  --text /status

对于斜杠命令,省略机器人用户名;运行程序会定位到 SUT 机器人。

在 Crabbox 上运行任意命令:

proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
"$proof_cmd" run \
  --session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json \
  -- bash -lc 'source /tmp/openclaw-telegram-user-crabbox/env.sh && python3 /tmp/openclaw-telegram-user-crabbox/user-driver.py transcript --limit 20 --json'

有用的远程用户驱动命令:

source /tmp/openclaw-telegram-user-crabbox/env.sh
python3 /tmp/openclaw-telegram-user-crabbox/user-driver.py status --json
python3 /tmp/openclaw-telegram-user-crabbox/user-driver.py chats --json
python3 /tmp/openclaw-telegram-user-crabbox/user-driver.py transcript --limit 20 --json
python3 /tmp/openclaw-telegram-user-crabbox/user-driver.py send --text '/status@{sut}'
python3 /tmp/openclaw-telegram-user-crabbox/user-driver.py probe --text '@{sut} Reply exactly: USER-E2E-{run}' --expect USER-E2E-

在不结束会话的情况下捕获当前桌面:

proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
"$proof_cmd" screenshot \
  --session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json

检查租约状态并获取 WebVNC 命令:

proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
"$proof_cmd" status \
  --session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json

结束

始终结束或显式保留盒子:

proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
"$proof_cmd" finish \
  --session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json \
  --preview-crop telegram-window

finish 会停止录制,创建基于运动裁剪的 MP4/GIF 制品,捕获最终截图和日志,释放 Convex 凭证,停止本地 SUT,并停止 Crabbox 租约。--preview-crop telegram-window 还会从测试的 Telegram 证明窗口创建一个固定几何尺寸的 GIF,用于清晰的并排 PR 表格;完整的桌面视频/GIF 会保留在制品目录中。仅在需要人类在凭证释放后继续 VNC 调试时传递 --keep-box。

在任何失败或中断之后,验证清理:

crabbox list --provider aws

如果存在会话文件且凭证可能仍被租用,请在重试前使用该会话文件运行 finish。

附加证明

除非需要日志,否则只将有用的视觉制品附加到 PR。运行程序默认仅生成 GIF:

proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
"$proof_cmd" publish \
  --session .artifacts/qa-e2e/telegram-user-crabbox/pr-review/session.json \
  --pr <PR编号> \
  --summary 'Telegram 真实用户 Crabbox 会话动态 GIF'

这将仅复制有用的 GIF 到临时发布包中,并评论该 GIF。如果 finish --preview-crop telegram-window 生成了裁剪后的 GIF,则发布使用该 GIF;否则使用 telegram-user-crabbox-session-motion.gif。仅在 PR 需要日志或 JSON 输出时使用 --full-artifacts。切勿发布凭证负载、本地环境文件、TDLib 数据库、Telegram Desktop 配置文件或原始会话存档。

对于前后对比验证,在 main 分支上运行一次会话,在 PR 头部运行一次,然后仅从干净的包中发布所需的 GIF:

mkdir -p .artifacts/qa-e2e/telegram-user-crabbox/pr-123/comparison
cp <main输出>/telegram-user-crabbox-session-motion-telegram-window.gif \
  .artifacts/qa-e2e/telegram-user-crabbox/pr-123/comparison/main-before.gif
cp <pr输出>/telegram-user-crabbox-session-motion-telegram-window.gif \
  .artifacts/qa-e2e/telegram-user-crabbox/pr-123/comparison/pr-after.gif
crabbox artifacts publish \
  --repo openclaw/openclaw \
  --pr 123 \
  --dir .artifacts/qa-e2e/telegram-user-crabbox/pr-123/comparison \
  --summary 'Telegram 前后对比证明' \
  --no-comment

然后发布一个包含这两个 URL 的简洁 Markdown 表格。除非明确需要这些制品,否则不要发布包含截图、原始视频、日志、会话 JSON 或裁剪实验的工作目录。

快速冒烟测试

对于快速的一次性检查,请使用:

proof_cmd="${OPENCLAW_TELEGRAM_USER_PROOF_CMD:-openclaw-telegram-user-crabbox-proof}"
"$proof_cmd" --text /status

这是一个 start/send/finish 快捷方式。对于 PR 审查、问题复现或 Agent 可能需要多次尝试的任何任务,推荐使用被保持的会话。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相关技能