feishu-mention
/install feishu-mention
Feishu Mention Resolver - 飞书@提及解析器
将飞书消息中的 @name 自动转换为 \x3Cat> XML 格式,实现更精确的提及提醒。
核心概念:Account ID
本工具使用 OpenClaw Account ID (accountId) 而非原始的飞书 App ID。
accountId 是在 ~/.openclaw/openclaw.json 中配置的账号别名(如 product, backend, elves)。
工具会自动读取配置文件,获取对应的 appId 和 appSecret,并自动发现配置中所有机器人的 OpenID。
快速开始
基本用法
// JavaScript/Node.js
const { resolve } = require('./index.js');
async function processMessage() {
const text = '你好 @product,请确认一下';
const accountId = 'elves'; // 使用 'elves' 账号的凭证来调用 API
const chatId = 'oc_1234567890abcdef';
// 解析文本中的所有@提及
// 系统会自动识别 @product 是另一个机器人,并获取其 OpenID
const resolvedText = await resolve(text, accountId, chatId);
console.log(resolvedText);
// 输出: "你好 \x3Cat user_id="ou_c610...">product\x3C/at>,请确认一下"
}
优先级逻辑
- 已配置的机器人 (Priority 1): 自动匹配
openclaw.json中配置的所有账号名称(如@product、@Product、@PRODUCT),不区分大小写。 - 用户别名 (Priority 2): 匹配
options.aliases中的别名配置。 - 群成员 (Priority 3): 检查本地缓存或调用飞书 API 获取群成员。
API 参考
resolve(text, accountId, chatId, [options])
批量解析文本中的所有 @提及。
参数:
text(string): 输入文本accountId(string): OpenClaw 账号别名 (如 "elves")chatId(string): 会话 IDoptions(object): 可选配置aliases: 额外的别名配置[{ name: '张三', alias: ['小王'] }]
返回值:
Promise\x3Cstring>: 解析后的 XML 文本
版本: 2.0.0 (支持 Account ID 和自动发现)
作者: OpenClaw AI Assistant
最后更新: 2026-03-06
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install feishu-mention - 安装完成后,直接呼叫该 Skill 的名称或使用
/feishu-mention触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
feishu-mention 是什么?
**PRIORITY: HIGHEST**. **CRITICAL**: You **MUST** use this tool **BEFORE sending any message** to Feishu/Lark if it contains an "@" mention. **Trigger**: You... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 290 次。
如何安装 feishu-mention?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-mention」即可一键安装,无需额外配置。
feishu-mention 是免费的吗?
是的,feishu-mention 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
feishu-mention 支持哪些平台?
feishu-mention 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 feishu-mention?
由 helong0911-alt(@helong0911-alt)开发并维护,当前版本 v2.0.2。