Feishu Card Sender Skill
飞书卡片消息发送技能包 - 专业级interactive卡片发送解决方案
by calmtime · published 2026-03-22
$ claw add gh:calmtime/calmtime-lark-card-sender# Feishu Card Sender Skill
飞书卡片消息发送技能包 - 专业级interactive卡片发送解决方案
🎯 功能概述
本技能包提供完整的飞书interactive卡片发送能力,绕过OpenClaw内置限制,直接调用飞书OpenAPI实现专业级卡片消息发送。
✨ 核心特性
🛠️ 核心工具
1. 高级卡片发送器 (`feishu_card_sender_advanced.py`)
from feishu_card_sender_advanced import AdvancedFeishuCardSender
sender = AdvancedFeishuCardSender(app_id, app_secret)
result = sender.send_simple_card(
receive_id="ou_xxx",
receive_id_type="open_id",
title="🎯 测试卡片",
content="**精彩内容**展示"
)2. 基础发送器 (`direct_feishu_card_sender.py`)
from direct_feishu_card_sender import FeishuCardSender
sender = FeishuCardSender(app_id, app_secret)
card = sender.build_interactive_card("标题", "内容")
result = sender.send_interactive_card("ou_xxx", "open_id", card)3. 卡片模板库 (`feishu_card_templates.py`)
from feishu_card_templates import (
build_news_card,
build_flight_deal_card,
build_task_management_card
)
# 新闻简报卡片
news_card = build_news_card([
{"category": "国际新闻", "title": "重大事件", "source": "路透社", "time": "2024-02-28 15:30"}
])
# 机票特价卡片
flight_card = build_flight_deal_card({
"route": "上海 → 东京",
"price": 899,
"original_price": 2500,
"date": "2024-03-15",
"discount": "3.6折"
})📋 支持的卡片类型
📰 新闻简报卡片
✈️ 机票特价卡片
📊 任务管理卡片
🎯 基础信息卡片
🔧 使用方法
环境配置
export FEISHU_APP_ID="your_app_id"
export FEISHU_APP_SECRET="your_app_secret"快速开始
# 导入发送器
from feishu_card_sender_advanced import AdvancedFeishuCardSender
# 初始化发送器
sender = AdvancedFeishuCardSender(
app_id="cli_xxx",
app_secret="your_secret"
)
# 发送基础卡片
result = sender.send_simple_card(
receive_id="ou_xxx",
receive_id_type="open_id",
title="🎉 欢迎使用",
content="**飞书卡片**发送成功!"
)
print(f"消息ID: {result['message_id']}")高级用法
# 构建复杂卡片
card = sender.build_news_card([
{
"category": "科技新闻",
"title": "AI技术突破",
"source": "TechNews",
"time": "2024-02-28 16:00"
},
{
"category": "财经动态",
"title": "市场分析",
"source": "财经网",
"time": "2024-02-28 15:30"
}
])
# 发送到群组
result = sender.send_interactive_card(
receive_id="oc_xxx",
receive_id_type="chat_id",
card=card
)🎨 卡片设计指南
颜色主题
内容格式
布局建议
⚠️ 注意事项
1. **权限要求**: 需要`im:message:send_as_bot`权限
2. **大小限制**: 卡片内容不超过30KB
3. **频率限制**: 5 QPS(每秒5次)
4. **用户范围**: 接收者必须在应用可用范围内
5. **群组要求**: 机器人必须在目标群组中
🔍 错误处理
常见错误码及解决方案:
📚 相关资源
🚀 更新日志
v1.0.0 (2026-02-28)
---
**技能状态**: 生产就绪 ✅
**维护状态**: 活跃维护 🔄
**最后更新**: 2026-02-28
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...