搜索

PythonReactSEOPDF
OpenClaw

feishu-card-sender

通过飞书 OpenAPI 发送卡片消息(interactive card),支持模板化 JSON 卡片与变量替换。用于用户要求“发送飞书卡片/模板消息/互动卡片”时,或需要把结构化通知发到指定 open_id/chat_id 时。该技能只走 OpenAPI(appid/appsecret + tenant_access_token),不使用 message 通道。

dobbey0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install dobbey/feishu-card-sender

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Feishu Card Sender

概览

用统一方式通过飞书 OpenAPI 发送卡片消息,避免每次手写 curl。 本技能固定使用 scripts/send_feishu_card.py(appid/appsecret 鉴权),不走 message 通道。

快速决策

  1. 发送到当前会话用户 → 使用当前会话 sender_id 作为 --receive-id(open_id)
  2. 发送到指定用户/群 → 显式传 --receive-id + --receive-id-type
  3. 需要复用模板 → 把模板放到 assets/templates/*.json,再用 --template + 变量替换

发送方式:脚本发送(OpenAPI,唯一方式)

脚本:scripts/send_feishu_card.py

凭证

按以下优先级自动获取(从高到低):

  1. 命令参数:--app-id / --app-secret
  2. 环境变量:FEISHU_APP_ID / FEISHU_APP_SECRET
  3. OpenClaw 配置:/root/.openclaw/openclaw.json 的 channels.feishu.accounts
    • 可用 --account-id 指定账户(不传则取第一个)
    • 可用 --account-id current 自动读取会话上下文 account_id(从运行时环境变量 best-effort 获取)
常用命令
# 1) 列出内置模板
python3 scripts/send_feishu_card.py --list-templates

# 2) 用 movie 模板发送到 open_id(变量文件)
export FEISHU_APP_ID="cli_xxx"
export FEISHU_APP_SECRET="xxx"
python3 scripts/send_feishu_card.py \
  --template movie \
  --receive-id ou_xxx \
  --receive-id-type open_id \
  --vars-file references/vars.example.env

# 3) 直接指定模板文件 + 行内变量
python3 scripts/send_feishu_card.py \
  --template-file assets/templates/movie.json \
  --receive-id ou_xxx \
  --var title='星际穿越' \
  --var rating='8.7'

# 4) 只有海报 URL 时,自动上传飞书并注入 poster_img_key
python3 scripts/send_feishu_card.py \
  --template movie-custom \
  --receive-id ou_xxx \
  --receive-id-type open_id \
  --poster-url 'https://image.tmdb.org/t/p/original/xxx.jpg' \
  --var title='星际穿越' \
  --var overview='...'

变量替换规则

  • 模板中占位符写法:${key}
  • 变量来源(后者覆盖前者):
    1. --vars-file(KEY=VALUE)
    2. 多次 --var key=value
  • 未提供的变量保持原样,不报错(便于渐进调试)

参数规范(必读)

发送前先读:

  • references/template-params.md(movie-cus...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/dobbey/feishu-card-sender
Version
—
Commit
ad02724cf6a315810e3a5f41ae8f559624eddb30
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# Feishu Card Sender

## 概览

用统一方式通过飞书 OpenAPI 发送卡片消息,避免每次手写 curl。
本技能固定使用 `scripts/send_feishu_card.py`(appid/appsecret 鉴权),不走 `message` 通道。

## 快速决策

1. **发送到当前会话用户** → 使用当前会话 `sender_id` 作为 `--receive-id`(open_id)
2. **发送到指定用户/群** → 显式传 `--receive-id` + `--receive-id-type`
3. **需要复用模板** → 把模板放到 `assets/templates/*.json`,再用 `--template` + 变量替换

## 发送方式:脚本发送(OpenAPI,唯一方式)

脚本:`scripts/send_feishu_card.py`

### 凭证

按以下优先级自动获取(从高到低):
1. 命令参数:`--app-id` / `--app-secret`
2. 环境变量:`FEISHU_APP_ID` / `FEISHU_APP_SECRET`
3. OpenClaw 配置:`/root/.openclaw/openclaw.json` 的 `channels.feishu.accounts`
   - 可用 `--account-id` 指定账户(不传则取第一个)
   - 可用 `--account-id current` 自动读取会话上下文 account_id(从运行时环境变量 best-effort 获取)

### 常用命令

```bash
# 1) 列出内置模板
python3 scripts/send_feishu_card.py --list-templates

# 2) 用 movie 模板发送到 open_id(变量文件)
export FEISHU_APP_ID="cli_xxx"
export FEISHU_APP_SECRET="xxx"
python3 scripts/send_feishu_card.py \
  --template movie \
  --receive-id ou_xxx \
  --receive-id-type open_id \
  --vars-file references/vars.example.env

# 3) 直接指定模板文件 + 行内变量
python3 scripts/send_feishu_card.py \
  --template-file assets/templates/movie.json \
  --receive-id ou_xxx \
  --var title='星际穿越' \
  --var rating='8.7'

# 4) 只有海报 URL 时,自动上传飞书并注入 poster_img_key
python3 scripts/send_feishu_card.py \
  --template movie-custom \
  --receive-id ou_xxx \
  --receive-id-type open_id \
  --poster-url 'https://image.tmdb.org/t/p/original/xxx.jpg' \
  --var title='星际穿越' \
  --var overview='...'
```

## 变量替换规则

- 模板中占位符写法:`${key}`
- 变量来源(后者覆盖前者):
  1) `--vars-file`(`KEY=VALUE`)
  2) 多次 `--var key=value`
- 未提供的变量保持原样,不报错(便于渐进调试)

## 参数规范(必读)

发送前先读:
- `references/template-params.md`(movie-cus...

相关技能

OpenClaw

x402hub

capncoconut

Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...

OpenClaw

claw

capevace

Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.

OpenClaw

captchas-openclaw

captchasco

OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.