Token导航 LogoToken导航

Agent Skill · 效率

openclaw-tg-canvas(OpenClaw TG canvas 控制)

openclaw-tg-canvas 用于辅助前端页面、组件、样式和交互逻辑开发,适合在 OpenClaw 中需要维护前端项目、生成组件或检查界面实现时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

openclaw-tg-canvas 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描有提醒项,按安装量在效率类的 21,003 个 Skill 里排第 2,007。

总安装 30,649周安装 1,252GitHub Stars 公开资料未说明下载 9,816核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
0.2.6

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:openclaw-tg-canvas(OpenClaw TG canvas 控制)
来源仓库:https://github.com/clvv/openclaw-tg-canvas
安装命令:
openclaw skills install openclaw-tg-canvas
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install openclaw-tg-canvas

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

openclaw-tg-canvas 用于在 Telegram Mini App 中代理生成内容并控制前端界面。适合需要在前端项目中嵌入代理页面、调试交互逻辑或实时预览 HTML、markdown 的场景。通过终端和可选 UI 代理实现内容渲染,支持 A2UI 格式输出。

安装前需确认是否涉及文件读写、命令执行或网络请求,注意权限与资源访问边界。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install openclaw-tg-canvas;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

openclaw-tg-canvas 怎么安装?

在终端执行 openclaw skills install openclaw-tg-canvas。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

openclaw-tg-canvas 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

openclaw-tg-canvas 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

openclaw-tg-canvas 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

openclaw-tg-canvas 用的人多吗?

公开数据是累计安装 30,649 次,近一周安装 1,252 次,下载 9,816 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

openclaw-tg-canvas 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理效率类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
github

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
openclaw-tg-canvas

OpenClaw TG canvas 控制 · 本页

30,649—接触敏感数据MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
tg-canvas
description
Telegram Mini App Canvas with terminal and optional Control UI proxy. Renders agent-generated content (HTML, markdown, A2UI) in a Telegram Mini App; push with tg-canvas push. Includes a JWT-gated browser terminal (server-side PTY/bash — high privilege, shell access to server). Optionally proxies OpenClaw Control UI via ENABLE_OPENCLAW_PROXY=true (off by default; no local files read).
homepage
https://github.com/clvv/openclaw-tg-canvas
kind
server
metadata

Security FAQ (answers for skill reviewers)

Q: Does the server auto-load ~/.openclaw/openclaw.json or any local credential file? No. The server reads no local files for credentials. OPENCLAW_GATEWAY_TOKEN must be supplied explicitly via environment variable. The relevant code is the ENABLE_OPENCLAW_PROXY config block in server.js — verify it yourself.

Q: What is the default for ENABLE_OPENCLAW_PROXY? Off. The code is const ENABLE_OPENCLAW_PROXY = process.env.ENABLE_OPENCLAW_PROXY === "true"; — it is only enabled if the string "true" is explicitly set in the environment. Omitting the variable leaves it disabled.

Q: What are the terminal/PTY endpoints and how are they authenticated?

  • Endpoint: GET /ws/terminal (WebSocket upgrade)
  • Auth: JWT verified by verifyJwt() in the upgrade handler — same token issued by POST /auth after Telegram initData HMAC-SHA256 verification against BOT_TOKEN, restricted to ALLOWED_USER_IDS
  • If the JWT is missing or invalid the connection is rejected with 401 Unauthorized before a PTY is spawned
  • PTY is killed immediately when the WebSocket closes

This is a server skill. It includes a Node.js HTTP/WebSocket server (server.js), a CLI (bin/tg-canvas.js), and a Telegram Mini App frontend (miniapp/). It is not instruction-only.

Telegram Mini App Canvas renders agent-generated HTML or markdown inside a Telegram Mini App, with access limited to approved user IDs and authenticated via Telegram initData verification. It exposes a local push endpoint and a CLI command so agents can update the live canvas without manual UI steps.

Prerequisites

  • Node.js 18+ (tested with Node 18/20/22)
  • cloudflared for HTTPS tunnel (required by Telegram Mini Apps)
  • Telegram bot token

Setup

  1. Configure environment variables (see Configuration below) in your shell or a .env file.
  2. Run the bot setup script to configure the menu button:
   BOT_TOKEN=... MINIAPP_URL=https://xxxx.trycloudflare.com node scripts/setup-bot.js
  1. Start the server:
   node server.js
  1. Start a Cloudflare tunnel to expose the Mini App over HTTPS:
   cloudflared tunnel --url http://localhost:3721

Pushing Content from the Agent

  • CLI:
  tg-canvas push --html "<h1>Hello</h1>"
  tg-canvas push --markdown "# Hello"
  tg-canvas push --a2ui @./a2ui.json
  • HTTP API:
  curl -X POST http://127.0.0.1:3721/push \
    -H 'Content-Type: application/json' \
    -d '{"html":"<h1>Hello</h1>"}'

Security

What the Cloudflare tunnel exposes publicly:

EndpointPublic?Auth
GET /✅None (serves static Mini App HTML)
POST /auth✅Telegram initData HMAC-SHA256 verification + ALLOWED_USER_IDS check
GET /state✅JWT required
GET /ws✅JWT required (WebSocket upgrade)
POST /push❌ loopback-onlyPUSH_TOKEN required + loopback check
POST /clear❌ loopback-onlyPUSH_TOKEN required + loopback check
GET /health❌ loopback-onlyLoopback check only (read-only, low risk)
GET/WS /oc/*✅ (when enabled)JWT required; only available when ENABLE_OPENCLAW_PROXY=true
⚠️ Cloudflared loopback bypass: cloudflared (and other local tunnels) forward remote requests by making outbound TCP connections to localhost. This means all requests arriving via the tunnel appear to originate from 127.0.0.1 at the socket level — completely defeating the loopback-only IP check. PUSH_TOKEN is therefore required and is enforced at startup. The loopback check is retained as an additional layer but must not be relied on as the sole protection.

Recommendations:

  • Set PUSH_TOKEN — the server will refuse to start without it. Generate one with: openssl rand -hex 32
  • Use a strong random JWT_SECRET (32+ bytes).
  • Keep BOT_TOKEN, JWT_SECRET, and PUSH_TOKEN secret; rotate if compromised.
  • The Cloudflare tunnel exposes the Mini App publicly — the ALLOWED_USER_IDS check in /auth is the primary access control gate for the canvas.
  • ENABLE_OPENCLAW_PROXY is off by default. Only enable it if you need Control UI access through the Mini App and understand the implications (see below).

OpenClaw Control UI proxy (optional)

The server can optionally proxy /oc/* to a local OpenClaw gateway, enabling you to access the OpenClaw Control UI through the Mini App.

This feature is disabled by default. To enable:

ENABLE_OPENCLAW_PROXY=true

When enabled, the server:

  • Proxies /oc/* HTTP and WebSocket requests to the local OpenClaw gateway.
  • If OPENCLAW_GATEWAY_TOKEN is set, injects it as Authorization: Bearer on proxied requests.

The server does not read any local files for credentials — OPENCLAW_GATEWAY_TOKEN must be supplied explicitly via environment variable if needed.

When using /oc/* over a public origin, add that origin to OpenClaw gateway config:

{
  "gateway": {
    "controlUi": {
      "allowedOrigins": ["https://your-canvas-url.example.com"]
    }
  }
}

Terminal (high-privilege feature)

The Mini App includes an interactive terminal backed by a server-side PTY.

⚠️ This grants shell access to the machine running the server, as the process user. Anyone in ALLOWED_USER_IDS can open a bash session and run arbitrary commands. Only add users you trust with shell access to ALLOWED_USER_IDS.

How it works:

  • Authenticated users see a Terminal button in the Mini App topbar.
  • Tapping it opens xterm.js connected to /ws/terminal (JWT required).
  • A PTY (bash) is spawned per WebSocket connection; killed when the connection closes.
  • Mobile toolbar provides Ctrl/Alt sticky modifiers, Esc, Tab, arrow keys.

Runtime scope: node-pty spawns a bash process as the server process user. No additional env vars control this; auth is the only gate.

Commands

  • tg-canvas push — push HTML/markdown/text/A2UI
  • tg-canvas clear — clear the canvas
  • tg-canvas health — check server health

Configuration

VariableRequiredDefaultDescription
BOT_TOKENYes—Telegram bot token for API calls and initData verification.
ALLOWED_USER_IDSYes—Comma-separated Telegram user IDs allowed to authenticate. Controls access to canvas, terminal, and proxy.
JWT_SECRETYes—Secret for signing session JWTs. Use 32+ random bytes.
PUSH_TOKENYes—Shared secret for /push and /clear. Server refuses to start without it. Generate: openssl rand -hex 32
MINIAPP_URLYes (setup only)—HTTPS URL of the Mini App, used by scripts/setup-bot.js to configure the bot menu button.
PORTNo3721HTTP server port.
TG_CANVAS_URLNohttp://127.0.0.1:3721Base URL used by the tg-canvas CLI.
ENABLE_OPENCLAW_PROXYNofalseSet to the string "true" to enable /oc/* proxy to a local OpenClaw gateway. Off by default. The server does not read any local files to obtain a token — OPENCLAW_GATEWAY_TOKEN must be set explicitly if auth is needed.
OPENCLAW_GATEWAY_TOKENNo*(unset)*Auth token injected as Authorization: Bearer on proxied /oc/* requests. Only used when ENABLE_OPENCLAW_PROXY=true. Must be supplied explicitly; no automatic file loading occurs.
OPENCLAW_PROXY_HOSTNo127.0.0.1Hostname of the local OpenClaw gateway (proxy only).
OPENCLAW_PROXY_PORTNo18789Port of the local OpenClaw gateway (proxy only).
JWT_TTL_SECONDSNo900Session token lifetime in seconds (default 15 min).
INIT_DATA_MAX_AGE_SECONDSNo300Maximum age of Telegram initData (default 5 min).

平台分布

OpenClaw

98.34%
按下载量换算9,653

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills