โ† All skills
Tencent SkillHub ยท Developer Tools

claw-lark Patches

Re-apply custom patches to claw-lark plugin dist files after updates. Use when claw-lark plugin is updated/reinstalled and custom behaviors (requireMention f...

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Re-apply custom patches to claw-lark plugin dist files after updates. Use when claw-lark plugin is updated/reinstalled and custom behaviors (requireMention f...

โฌ‡ 0 downloads โ˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
SKILL.md, references/patch-details.md, scripts/apply-patches.sh

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.0

Documentation

ClawHub primary doc Primary doc: SKILL.md 10 sections Open source page

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: channel.js โ€” messaging.targetResolver (target ID recognition) + outbound account resolution monitor.js โ€” requireMention filtering + reply-in-thread for deliver callback provider.js โ€” reply-in-thread for sendTextMessage send.js โ€” reply-in-thread for SDK reply calls

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: Send a group message WITHOUT @bot โ†’ should be silently ignored Send a group message WITH @bot โ†’ should reply in thread Send a DM โ†’ should reply in thread @ another bot โ†’ should be silently ignored

See Also

references/patch-details.md โ€” Full code diffs for each patch

Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
2 Docs1 Scripts
  • SKILL.md Primary doc
  • references/patch-details.md Docs
  • scripts/apply-patches.sh Scripts