Token导航 LogoToken导航TokenDH.com
开发需要联网clawhub未标认证来源可访问clear审计通过

claw-lark-patches爪百灵补丁

Agent Skill

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

总安装

15,324

周安装

626

GitHub Stars

公开资料未说明

下载量

4,958
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install claw-lark-patches

简介

claw-lark-patches 将自定义补丁重新应用到 claw-lark 插件 dist 文件。

  • 解决插件更新后的行为兼容性问题。claw-lark-patches 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 通过 clawhub 安装,需备份原始文件并校验 patch 完整性。
  • 使用前应评估 patch 来源可靠性、回滚方案及影响范围。
  • 确保插件功能稳定且不影响其他模块运行。

SKILL.md

name
claw-lark-patches
description
Re-apply custom patches to claw-lark plugin dist files after updates. Use when claw-lark plugin is updated/reinstalled and custom behaviors (requireMention filtering, reply_in_thread, thread-based replies) stop working. Also use when debugging Lark message routing issues.

claw-lark Patches

claw-lark is a compiled plugin — we patch dist files directly. Every plugin update wipes these patches. This skill documents exactly what to change and provides an auto-apply script.

Quick Apply

bash scripts/apply-patches.sh

Then restart gateway: openclaw gateway restart

Patches Overview

Four files are patched:

  1. channel.js — messaging.targetResolver (target ID recognition) + outbound account resolution
  2. monitor.js — requireMention filtering + reply-in-thread for deliver callback
  3. provider.js — reply-in-thread for sendTextMessage
  4. send.js — reply-in-thread for SDK reply calls

Patch Details

0. channel.js — Target Resolution + Account Resolution (2026-02-22)

Problem 1: message(send, lark, "oc_xxx") returns "Unknown target" because claw-lark has no messaging.targetResolver.looksLikeId. The core doesn't recognize oc_/ou_/on_ as valid IDs and falls through to directory lookup which fails.

Fix: Add messaging property to larkPlugin export:

  • Import looksLikeLarkId, normalizeLarkTarget from ./utils.js
  • Add messaging.targetResolver.looksLikeId using existing looksLikeLarkId()
  • Add messaging.normalizeTarget using existing normalizeLarkTarget()

Problem 2: outbound.sendText gets { cfg, to, accountId } from core but expects { account, recipientId }. The account object is undefined → "Cannot read properties of undefined (reading 'appId')".

Fix: All 5 outbound methods (sendText, sendMedia, downloadMedia, addReaction, removeReaction) add:

const account = args.account ?? resolveAccount(args.cfg, args.accountId ?? "default");
const recipientId = args.recipientId ?? args.to;

1. monitor.js — requireMention Filter

Location: routeMessage() function, after parseMessage(event) and the log line.

What: In group chats, skip messages that don't @mention our bot.

Key facts:

  • event.message is the correct path (NOT event.event.message)
  • Lark webhook message.mentions contains mention data with id.open_id
  • Bot open_id: set via BOT_OPEN_ID env var when running apply-patches.sh
  • All bots lack user_id (empty string) — cannot use !user_id to detect "is it me"
  • @_user_N text placeholders appear for ALL @'d bots, not just ours — don't use regex match
  • Fallback: if mentions array empty, check parsed.text.includes("@" + BOT_NAME) (set via BOT_NAME env var)

2. monitor.js — Reply in Thread (deliver callback)

Location: Inside dispatchReplyWithBufferedBlockDispatcher deliver callback.

What:

  • Set replyToId = payload.replyToId || parsed.threadId || parsed.messageId (always have a value)
  • Use client.im.message.reply() with reply_in_thread: true instead of client.im.message.create() with root_id

Key facts:

  • root_id on create only associates with existing thread, does NOT create new thread
  • reply_in_thread: true on reply API creates a new thread
  • Works in both p2p and group chats

3. provider.js — sendTextMessage Thread Reply

Location: sendTextMessage() function.

What: When threadId is provided, use client.im.message.reply() instead of client.im.message.create().

4. send.js — reply_in_thread on SDK Reply

Location: sendMessageLark() and sendCardLark() reply branches.

What: Add reply_in_thread: true to data object in client.im.message.reply() calls.

Verification

After applying patches and restarting gateway:

  1. Send a group message WITHOUT @bot → should be silently ignored
  2. Send a group message WITH @bot → should reply in thread
  3. Send a DM → should reply in thread
  4. @ another bot → should be silently ignored

See Also

  • references/patch-details.md — Full code diffs for each patch

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

75.75%
按下载量换算3,756

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills