feishu-rich-card
Send rich interactive cards with embedded images in Feishu group chats. Use when reporting progress, sharing analysis results, or presenting any content that benefits from mixed text+image layout in Feishu. Combines SVG UI templates (or matplotlib/PIL charts) with Feishu Card Kit API.
npx skills add BioTender-max/awesome-bio-agent-skills --skill feishu-rich-card --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Feishu Rich Card — 飞书图文混排卡片 在飞书群聊中发送**图文并茂**的交互式卡片,用于汇报进展、展示分析结果、项目状态等。 ## When to Use - 汇报任务进展、项目状态 - 展示数据分析结果(图表 + 解读) - 发送研究简报、阶段性成果 - 任何需要图文混排的飞书消息 ## Architecture ``` 生成图片(SVG→PNG / matplotlib / PIL) ↓ 上传图片到飞书 → 获取 image_key ↓ 构造 Card JSON (schema 2.0) → 嵌入 img 元素 + markdown 元素 ↓ 调用飞书 API 发送 interactive 消息 ``` ## Workflow ### Step 1: Prepare Images 图片来源可以是: - **SVG UI 模板** → 用 `svg-ui-templates` skill 生成 SVG → cairosvg 转 PNG - **matplotlib/seaborn** → 直接 savefig 为 PNG - **PIL/Pillow** → 程序化生成图片 - **已有文件** → 直接使用本地 PNG/JPG ### Step 2: Upload & Send 使用 `references/send_card.py` 中的辅助函数: ```python # 完整用法参见 references/send_card.py from send_card import FeishuCardSender sender = FeishuCardSender() # 自动读取 openclaw.json 凭证 # 发送图文卡片 sender.send_rich_card( chat_id="oc_xxx", title="📊 分析报告", elements=[ {"type": "markdown", "content": "## 结果摘要\n\n发现 **3 个**显著差异基因"}, {"type": "image", "path": "/tmp/volcano_plot.png", "alt": "火山图"}, {"type": "markdown", "content": "> Gene X: FC=2.5, p<0.001"}, {"type": "hr"}, {"type": "image", "path": "/tmp/heatmap.png", "alt": "热图"}, {"type": "markdown", "content": "**结论:** 样本间差异显著,建议进一步验证。"}, ], header_template="blue" # blue/indigo/green/red/purple/viol
- When to Use
- Architecture
- Workflow
- Step 1: Prepare Images
- Step 2: Upload & Send
- Step 3: Quick One-liner (for simple cases)
- Card Elements Reference
- Header Templates (颜色)
- Key Rules
- Integration with SVG UI Templates
- Default Chat ID
python3 -c "import cairosvg; cairosvg.svg2png(url='report.svg', write_to='report.png', output_width=2400)"
What does the feishu-rich-card skill do?
Send rich interactive cards with embedded images in Feishu group chats. Use when reporting progress, sharing analysis results, or presenting any content that benefits from mixed text+image layout in Feishu. Combines SVG UI templates (or matplotlib/PIL charts) with Feishu Card Kit API.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill feishu-rich-card --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
