Feishu Rich Card logo

Feishu Rich Card

Community
xjtulyc
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.

Overview

Publisherxjtulyc
RepositoryMedgeClaw
Skill namefeishu-rich-card
Stars
617
Forks
134
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by xjtulyc on GitHub. Read the source before you install it.

Installation

Install the Feishu Rich Card AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/xjtulyc/MedgeClaw/tree/main/skills/feishu-rich-card
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/xjtulyc/MedgeClaw.git /tmp/MedgeClaw
mkdir -p .claude/skills
cp -r /tmp/MedgeClaw/skills/feishu-rich-card .claude/skills/feishu-rich-card
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Feishu Rich Card in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Feishu Rich Card on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Feishu Rich Card is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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/violet/wathet/turquoise/yellow/grey
)

Step 3: Quick One-liner (for simple cases)

python
sender.send_image_report(
    chat_id="oc_xxx",
    title="🧬 单细胞分析完成",
    intro="UMAP 降维完成,共识别 12 个细胞群:",
    image_path="/tmp/umap.png",
    conclusion="Cluster 5 为目标细胞群,marker: CD8A, GZMB, PRF1",
    header_template="indigo"
)

Card Elements Reference

ElementTag说明
Markdownmarkdown支持加粗、斜体、链接、列表、引用块、代码块
Imageimg需要 image_key(上传后获取)
Dividerhr水平分割线
Column Setcolumn_set多列并排布局
Notenote底部灰色备注

Header Templates (颜色)

blue wathet turquoise green yellow orange red carmine violet purple indigo grey

Key Rules

  1. 图片必须先上传到飞书获取 image_key,不能用 URL
  2. Card schema 必须是 "2.0"
  3. 每张卡片最多 50 个元素
  4. 图片建议宽度 600-1200px,飞书会自动缩放
  5. markdown 中不能嵌入图片,图片必须是独立的 img 元素
  6. 发送后 OpenClaw 的正常回复会重复,用 NO_REPLY 避免

Integration with SVG UI Templates

当需要专业级可视化时,结合 svg-ui-templates skill:

bash
# 1. 生成 SVG(用模板或自定义)
# 2. 转 PNG
python3 -c "import cairosvg; cairosvg.svg2png(url='report.svg', write_to='report.png', output_width=2400)"
# 3. 用本 skill 上传并发送卡片

Default Chat ID

通过环境变量配置:FEISHU_DEFAULT_CHAT_ID(在 .env 中设置)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Feishu Rich Card AI 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.

Why use Feishu Rich Card on TypingMind?

Because you install it once and use it with any model. Feishu Rich Card is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Feishu Rich Card in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/xjtulyc/MedgeClaw/tree/main/skills/feishu-rich-card. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Feishu Rich Card?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Feishu Rich Card?

As many as you like. As long as a model supports skills, you can use Feishu Rich Card with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Feishu Rich Card AI skill free?

It is published on GitHub by xjtulyc. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇