← 返回 Skills 市场
blackswan-mohu

feishu-card-sender

作者 blackswan-mohu · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
316
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install feishucard-sender
功能描述
发送飞书卡片消息(支持纯文本和图片)。使用 message 工具的 card 参数,需要配置飞书应用凭证(App ID + App Secret)。
使用说明 (SKILL.md)

feishu-card-sender

发送飞书卡片消息。

前置配置

在 USER.md 中配置飞书应用凭证:

- **Feishu App ID:** cli_xxx
- **Feishu App Secret:** xxx

权限要求

飞书开放平台 → 应用 → 权限管理 → 开通 im:message

使用方法

纯文本卡片

message
  action: send
  card: {"config":{"wide_screen_mode":true},"header":{"title":{"content":"标题","tag":"plain_text"},"template":"blue"},"elements":[{"tag":"div","text":{"content":"内容","tag":"lark_md"}}]}
  target: ou_xxx

带图片的卡片

步骤 1:上传图片获取 img_key

使用 scripts/upload_image.py 脚本:

python scripts/upload_image.py --image /path/to/image.jpg

返回 img_key

步骤 2:发送卡片

message
  action: send
  card: {"config":{"wide_screen_mode":true},"header":{"title":{"content":"标题","tag":"plain_text"},"template":"blue"},"elements":[{"tag":"img","img_key":"img_v3_xxx"},{"tag":"div","text":{"content":"内容","tag":"lark_md"}}]}
  target: ou_xxx

卡片格式

{
  "config": {"wide_screen_mode": true},
  "header": {
    "title": {"content": "标题", "tag": "plain_text"},
    "template": "blue"
  },
  "elements": [...]
}

header.template 颜色

blue | green | red | orange | grey | purple | warning | error

elements 常用元素

  • div - 文本块,支持 tag: "lark_md"(粗体/斜体/链接)
  • hr - 分割线
  • note - 备注脚注
  • img - 图片(需要 img_key)
  • action + button - 按钮组

注意事项

  1. 优先用 message 工具,不要用 feishu_im_bot_message(需要额外权限)
  2. 图片必须上传获取 img_key,不能用 URL
  3. 机器人只能发给好友或群聊,不能直接发给陌生人
  4. 其他"龙虾"要使用:需要配置相同的 app_id + app_secret

示例

示例 1:简单通知卡片

message
  action: send
  card: {"config":{"wide_screen_mode":true},"header":{"title":{"content":"通知","tag":"plain_text"},"template":"blue"},"elements":[{"tag":"div","text":{"content":"这是内容","tag":"plain_text"}}]}
  target: ou_xxx

示例 2:带图片和按钮

message
  action: send
  card: {"config":{"wide_screen_mode":true},"header":{"title":{"content":"产品介绍","tag":"plain_text"},"template":"green"},"elements":[{"tag":"img","img_key":"img_v3_xxx"},{"tag":"div","text":{"content":"**亮点**\
• 功能 1\
• 功能 2","tag":"lark_md"}},{"tag":"action","actions":[{"tag":"button","text":{"content":"查看详情","tag":"plain_text"},"type":"primary","url":"https://example.com"}]}]}
  target: ou_xxx
安全使用建议
This skill's code and instructions match its stated purpose (upload images and send Feishu card messages), but the package metadata fails to declare the required Feishu credentials and the script's Python dependency. Before installing: 1) Verify the script source and review scripts/upload_image.py locally. 2) Provide FEISHU_APP_ID and FEISHU_APP_SECRET via environment variables (or pass them to the script) and avoid storing secrets in repo files like USER.md. 3) Ensure Python and the 'requests' package are available in the runtime. 4) Prefer creating a Feishu app with minimal permissions and rotate credentials if you decide to use this. If you need the skill to run in an automated/hosted agent, confirm where the agent stores env vars and whether that storage is secure.
功能分析
Type: OpenClaw Skill Name: feishucard-sender Version: 1.0.1 The skill bundle provides legitimate functionality for sending Feishu (Lark) card messages and uploading images. The Python script `scripts/upload_image.py` interacts exclusively with official Feishu API endpoints (open.feishu.cn) to obtain access tokens and upload media. The instructions in `SKILL.md` are consistent with the code's purpose and do not contain any prompt-injection attacks or attempts to exfiltrate sensitive data beyond the intended platform.
能力评估
Purpose & Capability
The SKILL.md and included script implement Feishu image upload and card sending as advertised. However the registry metadata declares no required environment variables or primary credential even though the skill clearly needs Feishu App ID and App Secret; that's an inconsistency between claimed requirements and actual needs.
Instruction Scope
Runtime instructions are scoped to sending cards and uploading images to Feishu. The SKILL.md and script only call Feishu Open API endpoints and read app credentials; they do not attempt to read unrelated system files or external endpoints. One small oddity: the doc tells the user to put credentials into a USER.md file (not included) while the script reads environment variables — the mapping is implied but not explicit.
Install Mechanism
This is instruction-only with no install spec (low risk). However a Python script is included that depends on the 'requests' library and a working Python runtime; those dependencies are not declared in the metadata or SKILL.md, so users might be missing required runtime components.
Credentials
The script expects FEISHU_APP_ID and FEISHU_APP_SECRET (it also accepts CLI flags). Those credentials are appropriate for the skill's purpose, but the skill registry metadata did not declare any required env vars or a primary credential. The omission of declared secrets is a mismatch that could cause accidental misconfiguration or secret placement in insecure locations (e.g., putting secrets into repo files).
Persistence & Privilege
The skill does not request persistent/always-on presence and does not modify other skill or system configurations. It is user-invocable only (default) and does not request elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishucard-sender
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishucard-sender 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
feishucard-sender 1.0.1 - No changes to the code or documentation were detected in this release. - All existing instructions and usage examples remain unchanged.
v1.0.0
Initial release with major simplification. - Reduced codebase to only one script: scripts/upload_image.py - Removed all template files, sample rules, callback handlers, and documentation specific to previous custom card features. - Updated documentation for new, simplified use focusing on sending Feishu cards with support for images and plain text. - Usage now requires uploading images via upload_image.py and configuring via standard message tools.
元数据
Slug feishucard-sender
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

feishu-card-sender 是什么?

发送飞书卡片消息(支持纯文本和图片)。使用 message 工具的 card 参数,需要配置飞书应用凭证(App ID + App Secret)。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 316 次。

如何安装 feishu-card-sender?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishucard-sender」即可一键安装,无需额外配置。

feishu-card-sender 是免费的吗?

是的,feishu-card-sender 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

feishu-card-sender 支持哪些平台?

feishu-card-sender 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 feishu-card-sender?

由 blackswan-mohu(@blackswan-mohu)开发并维护,当前版本 v1.0.1。

💬 留言讨论