用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/kweaver-ai/kweaver-dip --skill feishu-push命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
数据权限管理技能:支持资源权限查询与权限申请。 先判定“查询权限”还是“申请权限”,再按资源类型执行对应接口。 当用户提出“申请权限”、“查是否有权限”、“给某资源授权”时使用。
Guides creation of BKN (Business Knowledge Network) definition files following v2.0.1 spec. Covers network, object_type, relation_type, action_type, concept_group. Use when creating knowledge networks, BKN files, object types, relation types, action types, concept groups, or when user asks to model business knowledge in BKN format. When kweaver-core is also loaded, use it to run kweaver CLI (auth, bkn push) after files exist.
数据分析员工(Data Analyst Agent)的唯一总入口:凡与数据资产、取数、指标、表/视图、 治理职责、知识网络等相关的问题,必须先经本 skill 做编排与路由,再进入找表或问数等子流程。 当用户提出数据类问题、需要知识网络选择、或需要在找表与问数之间切换时使用。
基于 SOC 职业分类
正在显示 SKILL.md
| name | feishu-push |
| description | 向飞书指定用户(通过 user_id)推送消息。 支持文本、卡片、图片、文件等多种消息类型。当用户需要给飞书用户发送推送消息时自动使用。 |
| allowed-tools | Bash(curl *), node(*) |
| argument-hint | <user_id> <message-content> [msg_type] |
通过飞书开放平台 API 向指定飞书用户推送消息。
im:message(或 im:message:send_as_bot)权限FEISHU_APP_ID: 飞书应用 App ID (如 cli_a94a1d897cb85cbb)FEISHU_APP_SECRET: 飞书应用 App SecretPOST https://open.feishu.cn/open-apis/im/v1/messages
# 获取 tenant_access_token
TOKEN=$(curl -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
-H "Content-Type: application/json; charset=utf-8" \
-d "{\"app_id\":\"$FEISHU_APP_ID\",\"app_secret\":\"$FEISHU_APP_SECRET\"}" | \
node -e "let s=''; process.stdin.on('data', c => s += c); process.stdin.on('end', () => console.log(JSON.parse(s).tenant_access_token));")
# 发送文本消息
curl --request POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=user_id" \
--header "Authorization: Bearer $TOKEN" \
--header "Content-Type: application/json; charset=utf-8" \
--data-raw '{
"receive_id": "<USER_ID>",
"msg_type": "text",
"content": "{\"text\":\"你的消息内容\"}"
}'
当前技能只接收飞书租户内用户 ID,即 receive_id_type=user_id。调用时传入的第一个参数必须是 user_id。
| msg_type | 说明 |
|---|---|
text | 文本消息 |
post | 富文本消息 |
image | 图片消息(需要先上传图片获取 key) |
file | 文件消息(需要先上传文件获取 key) |
audio | 音频消息 |
media | 视频消息 |
sticker | 表情 |
interactive | 互动卡片 |
share_chat | 分享群名片 |
share_user | 分享个人名片 |
system | 系统消息(仅单会话有效) |
# 用法: feishu-push text <user_id> "你的消息内容"
推荐在环境中配置应用凭证:
export FEISHU_APP_ID="cli_a94a1d897cb85cbb"
export FEISHU_APP_SECRET="your_app_secret_here"
常见错误码及处理:
230013: Bot 对该用户无可用权限 → 将用户添加到应用可用范围230006: 未启用机器人能力 → 在飞书开发者后台启用 bot 能力230029: 用户已离职 → 无法发送给已离职用户230053: 用户停止接收机器人消息 → 用户需要取消拉黑const tokenUrl = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal";
const messageUrl = "https://open.feishu.cn/open-apis/im/v1/messages";
async function postJson(url, payload, headers = {}) {
const response = await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf-8",
...headers,
},
body: JSON.stringify(payload),
});
return response.json();
}
async function getTenantAccessToken() {
const data = await postJson(tokenUrl, {
app_id: process.env.FEISHU_APP_ID,
app_secret: process.env.FEISHU_APP_SECRET,
});
if (data.code !== 0) {
throw new Error(`Failed to get token: ${data.msg}`);
}
return data.tenant_access_token;
}
async function sendTextMessage(userId, content) {
const token = ();
(
,
{
: userId,
: ,
: .({ : content }),
},
{
: ,
},
);
}
[, , userId, message] = process.;
(userId && message) {
result = (userId, message);
.(.(result, , ));
}
/feishu-push 给用户 7g9f6e2d 发送文本消息 "Hello from OpenClaw!"
/feishu-push send user_id 7g9f6e2d "这是一条测试推送消息"