본문으로 건너뛰기
cccskills
무료GitHub에 공개

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xjtulyc/MedgeClaw스타 617(GitHub 617 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(2)

  • SKILL.md3.7 KB
  • references/send_card.py10.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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 中的辅助函数:

# 完整用法参见 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)

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:

# 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 中设置)

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Dispatch biomedical research and data analysis tasks to Claude Code with K-Dense Scientific Skills. Use this skill when the user asks to run any bioinformatics, genomics, drug discovery, clinical data analysis, proteomics, multi-omics, medical imaging, or scientific computation task. Also use for literature search (PubMed, bioRxiv), pathway analysis, protein structure prediction, or scientific writing tasks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xjtulyc/MedgeClaw6172026년 3월 12일 업데이트

CHARLS (China Health and Retirement Longitudinal Study) database-specific knowledge for reproducing published papers. Use when reproducing or analyzing papers that use CHARLS data, including variable mapping from harmonized to raw questionnaire items, cognitive function scoring (episodic memory, mental status, TICS), CESD-10 depression screening, social isolation index construction, and chronic disease coding. Also use for any CHARLS data cleaning, variable construction, or cohort selection task.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xjtulyc/MedgeClaw6172026년 3월 12일 업데이트

cjk-viz

무료

CJK (中日韩) 字体检测与 matplotlib 配置。任何涉及中文标签、标题、图例的 可视化任务启动前必须先执行本 skill 的字体检测流程,确保不会出现方块乱码。 适用于 matplotlib / seaborn / plotly 静态导出等场景。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xjtulyc/MedgeClaw6172026년 3월 12일 업데이트

Systematic methodology for reproducing published academic papers using provided data. Use when the user asks to reproduce, replicate, or verify results from a published paper, including sample selection, descriptive statistics, regression analyses, and generating reproduction reports (Markdown + LaTeX PDF). Covers the full pipeline: data exploration, variable identification/mapping, sample filtering, variable construction, statistical analysis, result comparison, and documentation. Applicable to any observational study, clinical cohort, or survey-based research paper.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xjtulyc/MedgeClaw6172026년 3월 12일 업데이트

Generate professional SVG UI panels for structured information display. Use when presenting lists, task checklists, pipeline/dependency status diagrams, or rich-text report layouts as SVG images. Covers four templates - list-panel, checklist-panel, pipeline-status, richtext-layout. Style is professional, business-oriented, academic-grade with Material Design color palette.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xjtulyc/MedgeClaw6172026년 3월 12일 업데이트

xjtulyc의 스킬 모두 보기

이 스킬의 문제 신고