ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

telegram-footer-patch

Add a Telegram private-chat footer (`🧠 Model + 💭 Think + 📊 Context`) to OpenClaw replies, with dry-run preview, backup, syntax validation, rollback, and restart guidance.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/c-joey/telegram-footer-patch
Or

Telegram Footer Patch

Footer Preview

给 Telegram 私聊回复追加平台层尾注,不依赖模型记忆。

Features

  • Add a Telegram private-chat footer: 🧠 Model + 💭 Think + 📊 Context
  • Support dry-run, backup, rollback, and reapply after upgrades

功能

  • 给 Telegram 私聊回复追加 🧠 Model + 💭 Think + 📊 Context 尾注
  • 支持预览、备份、回滚,以及升级后重打

当前实现:优先命中并修改当前版本实际可能生效的 dist 文件(包含 agent-runner.runtime-*.jsreply-*.jscompact-*.jspi-embedded-*.js 等),支持按内容 needle 自动发现、自动备份、重复覆盖更新与回滚。注意:这表示“尽量兼容不同 bundle 布局”,不等于已经证明跨版本都兼容;最终是否修好,以真实 Telegram 私聊回复是否出现脚注为准。

版本支持 / Validation Boundary

  • 已实测通过(live Telegram 私聊验收):OpenClaw 2026.3.22
  • 对应实际验证的 bundle 路径(2026.3.22)/usr/lib/node_modules/openclaw/dist/agent-runner.runtime-BWpOtdxK.js
  • 已实测通过(live Telegram 私聊验收):OpenClaw 2026.4.5
  • 对应实际验证的 bundle 路径(2026.4.5)/usr/lib/node_modules/openclaw/dist/agent-runner.runtime-UIIO4kss.js
  • 已完成的静态验证--dry-run--auto-discover --verify、smoke test、node --check
  • 未实测覆盖:其它 OpenClaw 版本、其它 dist 命名/布局、其它未命中的真实 reply path
  • 发布口径:除非做过真实 Telegram 私聊验收,否则只能写“可能兼容/已做兼容处理”,不能写“已支持”

What to consider before installing / 安装前需要考虑的事项

This skill does what it says (patches OpenClaw dist JS files to append a Telegram footer), but it writes into your OpenClaw installation directory and requires Node.js + Python 3.

Before installing/running:

  1. Inspect the scripts yourself and run --dry-run to see which files would be touched.
  2. Ensure node is installed and you have a plan for filesystem permissions (consider a staging instance/container).
  3. Confirm backups are created (*.bak.telegram-footer.*) and test the revert script.
  4. Only run the patch on systems you control and trust.

这项技能的功能正如其名(修改 OpenClaw 分发目录中的 JS 文件,添加 Telegram 页脚),但它会写入 OpenClaw 安装目录,并且需要 Node.js + Python 3

安装/运行前:

  1. 请自行检查脚本,并运行 --dry-run 先预览将会修改哪些文件。
  2. 确保已安装 node,并规划好文件系统权限(建议先在测试环境/容器中跑)。
  3. 确认已创建备份(查找 *.bak.telegram-footer.*)并测试还原脚本。
  4. 仅在你控制且信任的系统上运行;不确定就先上 staging。

使用

1) 预览

python3 scripts/patch_reply_footer.py --dry-run --list-targets

2) 应用

python3 scripts/patch_reply_footer.py --auto-discover
python3 scripts/patch_reply_footer.py --auto-discover --verify

2.5) 跑 smoke test / verify(推荐)

bash scripts/smoke_test_footer_patch.sh
# 或指定 dist
bash scripts/smoke_test_footer_patch.sh /usr/lib/node_modules/openclaw/dist

这个流程会依次执行:

  • target discovery
  • dry-run auto-discover
  • apply auto-discover patch
  • marker verification
  • 对已打 marker 的文件逐个 node --check
  • 额外检查 patched file 中没有残留 formatTokens(

边界说明: 这一步只证明“当前 dist 样本里的候选 bundle 已被 patch 且语法正常”,不等于真实回复链路一定已经生效,也不等于跨版本兼容已经被证明。

3) 重启网关(必须,才能生效)

说明:补丁改的是 OpenClaw 的 dist bundle;Gateway 不重启就不会重新加载,Telegram 私聊脚注不会生效。

openclaw gateway restart

3.5) 真实验收(必须

Metadata

Author@c-joey
Stars4097
Views0
Updated2026-04-14
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-c-joey-telegram-footer-patch": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.