Agent skill

Feishu Lark

by OpenClaudia in OpenClaudia/openclaudia-skills

Send messages and interactive cards to Feishu (飞书) and Lark channels via webhooks or Bot API.

MITAuto-check: notesProductivity & Automation

Install Feishu Lark

skills CLI
$ npx skills add OpenClaudia/openclaudia-skills --skill feishu-lark -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenClaudia/openclaudia-skills feishu-lark --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenClaudia/openclaudia-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/feishu-lark .claude/skills/feishu-lark && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
feishu-lark
GitHub stars
713
Token cost
~7.4k tokens
SKILL.md length
1,166 words
Files
1
Skills in repo
74
Repo updated
First seen
Licence
MIT

At a glance

Send messages and interactive cards to Feishu (飞书) and Lark channels via webhooks or Bot API.

  • Works in 9 steps: Custom Bot Webhook Messages → Interactive Card Messages → App Bot API (Full Featured) → …
  • Phrases: post to feishu
  • SKILL.md covers Prerequisites, 1. Custom Bot Webhook Messages, 2. Interactive Card Messages and 3. App Bot API (Full Featured), plus 4 more sections
  • Calls curl, python3 and openssl; reaches open.feishu.cn and open.larksuite.com; needs FEISHU_APP_SECRET and FEISHU_WEBHOOK_SECRET

What it does

Feishu Lark is an agent skill from OpenClaudia/openclaudia-skills. Send messages and interactive cards to Feishu (飞书) and Lark channels via webhooks or Bot API. Create rich-text announcements, marketing updates, and team notifications. Trigger phrases: "post to feishu", "feishu message", "lark message", "feishu webhook", "lark webhook", "send to feishu", "send to lark", "feishu bot", "lark bot", "飞书", "飞书机器人".

Its SKILL.md is about 7.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering Messaging and chat bots and Webhooks. It works with Feishu (Lark). The repository describes itself as: 77 open-source marketing skills for Claude Code, Codex, and other AI coding agents. SEO, content, email, ads, analytics, and growth. The licence is MIT.

When your agent uses it

  • Phrases: post to feishu
  • Tasks that involve Messaging and chat bots
  • Tasks that involve Webhooks

Example prompts

  • “post to feishu”
  • “feishu message”
  • “lark message”
  • “/feishu-lark”

Requirements

  • Python 3
  • A credential in FEISHU_WEBHOOK_SECRET
  • A credential in FEISHU_APP_SECRET
  • Pre-approved tools (allowed-tools): Bash, WebFetch, WebSearch

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Custom Bot Webhook Messages
  2. Interactive Card Messages
  3. App Bot API (Full Featured)
  4. Message Templates
  5. Helper: Build and Send Cards Programmatically
  6. Bilingual Support (Chinese + English)
  7. Error Handling
  8. Workflow: Post Marketing Content to Feishu/Lark
  9. Advanced: Message Card JSON Schema Quick Reference

What it can do on your machine

Read from SKILL.md and the folder at commit 28bf209. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • WebFetch
    • WebSearch

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • python3
    • openssl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • open.feishu.cn
    • open.larksuite.com
    • ads.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • FEISHU_APP_SECRET
    • FEISHU_WEBHOOK_SECRET
    • TENANT_TOKEN
    • IMAGE_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Feishu Lark loads about 7.4k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 1,166 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~7.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:43
    > 5. Copy the webhook URL and add to `.env`:
  • NoteMentions a .env fileSKILL.md:53
    ublish and approve the app, then add to `.env`:
  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, WebFetch, WebSearch

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenClaudia/openclaudia-skills at commit 28bf209, republished under its MIT licence (© OpenClaudia). 1,166 words, ~7,370 tokens.

Download SKILL.mdSave it as .claude/skills/feishu-lark/SKILL.md (or your agent's skills folder).
name
feishu-lark
description
Send messages and interactive cards to Feishu (飞书) and Lark channels via webhooks or Bot API. Create rich-text announcements, marketing updates, and team notifications. Trigger phrases: "post to feishu", "feishu message", "lark message", "feishu webhook", "lark webhook", "send to feishu", "send to lark", "feishu bot", "lark bot", "飞书", "飞书机器人".
allowed-tools
Bash, WebFetch, WebSearch

Feishu / Lark Messaging Skill

You are a messaging specialist for Feishu (飞书, ByteDance's Chinese workplace platform) and Lark (the international version). Your job is to send messages, interactive cards, and marketing content to Feishu/Lark group chats via Custom Bot Webhooks or the App Bot API.

Prerequisites

Check which credentials are available:

bash
echo "FEISHU_WEBHOOK_URL is ${FEISHU_WEBHOOK_URL:+set}"
echo "FEISHU_WEBHOOK_SECRET is ${FEISHU_WEBHOOK_SECRET:+set}"
echo "FEISHU_APP_ID is ${FEISHU_APP_ID:+set}"
echo "FEISHU_APP_SECRET is ${FEISHU_APP_SECRET:+set}"
Two Integration Modes
ModeCredentials RequiredCapabilities
Custom Bot Webhook (simple)FEISHU_WEBHOOK_URL (+ optional FEISHU_WEBHOOK_SECRET)Send text, rich text, interactive cards to a single group
App Bot API (full featured)FEISHU_APP_ID + FEISHU_APP_SECRETSend to any chat, upload images, at-mention users, manage cards, receive events

If no credentials are set, instruct the user:

Custom Bot Webhook (quickest setup):

  1. Open a Feishu/Lark group chat
  2. Click the group name at the top to open Group Settings
  3. Go to Bots > Add Bot > Custom Bot
  4. Name the bot and optionally set a Signature Verification secret
  5. Copy the webhook URL and add to .env:
    FEISHU_WEBHOOK_URL=https://open.feishu.cn/open-apis/bot/v2/hook/{webhook_id}
    FEISHU_WEBHOOK_SECRET=your_secret_here  # optional, for signed webhooks

App Bot API (for advanced use):

  1. Go to Feishu Open Platform or Lark Developer Console
  2. Create a new app, enable the Bot capability
  3. Add required permissions: im:message:send_as_bot, im:chat:readonly
  4. Publish and approve the app, then add to .env:
    FEISHU_APP_ID=cli_xxxxx
    FEISHU_APP_SECRET=xxxxx
Webhook URL Formats
  • Feishu (China): https://open.feishu.cn/open-apis/bot/v2/hook/{webhook_id}
  • Lark (International): https://open.larksuite.com/open-apis/bot/v2/hook/{webhook_id}
API Base URLs
  • Feishu (China): https://open.feishu.cn/open-apis
  • Lark (International): https://open.larksuite.com/open-apis

1. Custom Bot Webhook Messages

1.1 Plain Text Message
bash
curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d '{
    "msg_type": "text",
    "content": {
      "text": "Hello from OpenClaudia! This is a test message."
    }
  }'

At-mention everyone in the group:

bash
curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d '{
    "msg_type": "text",
    "content": {
      "text": "<at user_id=\"all\">Everyone</at> Important announcement: new release is live!"
    }
  }'
1.2 Rich Text Message (Post)

Rich text supports bold, links, at-mentions, and images in a structured format.

bash
curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d '{
    "msg_type": "post",
    "content": {
      "post": {
        "zh_cn": {
          "title": "产品更新公告",
          "content": [
            [
              {"tag": "text", "text": "我们很高兴地宣布 "},
              {"tag": "a", "text": "v2.0 版本", "href": "https://example.com/changelog"},
              {"tag": "text", "text": " 已正式发布!"}
            ],
            [
              {"tag": "text", "text": "主要更新:"}
            ],
            [
              {"tag": "text", "text": "1. 全新用户界面\n2. 性能提升 50%\n3. 支持暗色模式"}
            ],
            [
              {"tag": "at", "user_id": "all", "user_name": "所有人"}
            ]
          ]
        }
      }
    }
  }'

English version (for Lark):

bash
curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d '{
    "msg_type": "post",
    "content": {
      "post": {
        "en_us": {
          "title": "Product Update Announcement",
          "content": [
            [
              {"tag": "text", "text": "We are excited to announce that "},
              {"tag": "a", "text": "v2.0", "href": "https://example.com/changelog"},
              {"tag": "text", "text": " is now live!"}
            ],
            [
              {"tag": "text", "text": "Key updates:"}
            ],
            [
              {"tag": "text", "text": "1. Brand new UI\n2. 50% performance improvement\n3. Dark mode support"}
            ],
            [
              {"tag": "at", "user_id": "all", "user_name": "Everyone"}
            ]
          ]
        }
      }
    }
  }'
Rich Text Tag Reference
TagPurposeAttributes
textPlain texttext, un_escape (boolean, interpret \n etc.)
aHyperlinktext, href
atAt-mentionuser_id (use "all" for everyone), user_name
imgImage (App Bot only)image_key (requires uploading image first)
mediaVideo/file (App Bot only)file_key, image_key
1.3 Signed Webhook Requests

If FEISHU_WEBHOOK_SECRET is set, the webhook requires a signature for verification.

Generate a signed request:

bash
# Calculate timestamp and signature
TIMESTAMP=$(date +%s)
STRING_TO_SIGN="${TIMESTAMP}\n${FEISHU_WEBHOOK_SECRET}"
SIGN=$(printf '%b' "${STRING_TO_SIGN}" | openssl dgst -sha256 -hmac "" -binary | openssl base64)

# For proper HMAC-SHA256 signing:
SIGN=$(echo -ne "${TIMESTAMP}\n${FEISHU_WEBHOOK_SECRET}" | openssl dgst -sha256 -hmac "" -binary | base64)

curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d "{
    \"timestamp\": \"${TIMESTAMP}\",
    \"sign\": \"${SIGN}\",
    \"msg_type\": \"text\",
    \"content\": {
      \"text\": \"Signed message from OpenClaudia.\"
    }
  }"

Feishu signature algorithm details:

  1. Concatenate timestamp + "\n" + secret as the string to sign
  2. Compute HMAC-SHA256 with an empty key over that string
  3. Base64-encode the result
  4. Include both timestamp and sign in the request JSON body

2. Interactive Card Messages

Interactive cards are the most powerful message format. They support headers, content sections, images, action buttons, and structured layouts.

2.1 Basic Card Structure
json
{
  "msg_type": "interactive",
  "card": {
    "header": {
      "title": {
        "tag": "plain_text",
        "content": "Card Title Here"
      },
      "template": "blue"
    },
    "elements": []
  }
}
Header Color Templates
TemplateColorBest For
blueBlueGeneral info, updates
greenGreenSuccess, positive news
redRedUrgent, alerts, errors
orangeOrangeWarnings, action needed
purplePurpleEvents, creative
indigoIndigoTechnical, engineering
turquoiseTealGrowth, marketing
yellowYellowHighlights, tips
greyGreyNeutral, low priority
wathetLight blueDefault, clean
2.2 Card Elements Reference

Markdown Content Block:

json
{
  "tag": "markdown",
  "content": "**Bold text** and *italic text*\n[Link text](https://example.com)\nList:\n- Item 1\n- Item 2"
}

Divider:

json
{
  "tag": "hr"
}

Note (small gray footer text):

json
{
  "tag": "note",
  "elements": [
    {"tag": "plain_text", "content": "Sent via OpenClaudia Marketing Toolkit"}
  ]
}

Image Block:

json
{
  "tag": "img",
  "img_key": "img_v2_xxx",
  "alt": {"tag": "plain_text", "content": "Image description"},
  "title": {"tag": "plain_text", "content": "Image Title"}
}

Action Buttons:

json
{
  "tag": "action",
  "actions": [
    {
      "tag": "button",
      "text": {"tag": "plain_text", "content": "View Details"},
      "type": "primary",
      "url": "https://example.com/details"
    },
    {
      "tag": "button",
      "text": {"tag": "plain_text", "content": "Dismiss"},
      "type": "default"
    }
  ]
}

Button types: primary (blue), danger (red), default (gray)

Multi-column Layout:

json
{
  "tag": "column_set",
  "flex_mode": "bisect",
  "columns": [
    {
      "tag": "column",
      "width": "weighted",
      "weight": 1,
      "elements": [
        {"tag": "markdown", "content": "**Left Column**\nContent here"}
      ]
    },
    {
      "tag": "column",
      "width": "weighted",
      "weight": 1,
      "elements": [
        {"tag": "markdown", "content": "**Right Column**\nContent here"}
      ]
    }
  ]
}
2.3 Full Card Example: Product Announcement
bash
curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d '{
    "msg_type": "interactive",
    "card": {
      "header": {
        "title": {
          "tag": "plain_text",
          "content": "New Feature Launch: AI-Powered Analytics"
        },
        "template": "turquoise"
      },
      "elements": [
        {
          "tag": "markdown",
          "content": "We are thrilled to announce our latest feature!\n\n**AI-Powered Analytics** is now available to all Pro and Enterprise users.\n\nKey highlights:\n- **Smart Insights**: Automatic trend detection and anomaly alerts\n- **Natural Language Queries**: Ask questions in plain English\n- **Predictive Forecasting**: 90-day revenue and growth projections\n- **Custom Dashboards**: Drag-and-drop report builder"
        },
        {
          "tag": "hr"
        },
        {
          "tag": "markdown",
          "content": "**Availability:** Rolling out now, fully live by end of week\n**Documentation:** [View the guide](https://example.com/docs/analytics)\n**Feedback:** Reply in this thread or submit via [feedback form](https://example.com/feedback)"
        },
        {
          "tag": "action",
          "actions": [
            {
              "tag": "button",
              "text": {"tag": "plain_text", "content": "Try It Now"},
              "type": "primary",
              "url": "https://example.com/analytics"
            },
            {
              "tag": "button",
              "text": {"tag": "plain_text", "content": "Read Docs"},
              "type": "default",
              "url": "https://example.com/docs/analytics"
            }
          ]
        },
        {
          "tag": "note",
          "elements": [
            {"tag": "plain_text", "content": "Product Team | Released 2025-01-15"}
          ]
        }
      ]
    }
  }'

The App Bot API requires FEISHU_APP_ID and FEISHU_APP_SECRET. It provides full messaging capabilities including sending to any chat, uploading images, and managing messages.

3.1 Get Tenant Access Token

All App Bot API calls require a tenant_access_token. Tokens expire after 2 hours.

bash
# For Feishu (China)
FEISHU_API_BASE="https://open.feishu.cn/open-apis"

# For Lark (International)
# FEISHU_API_BASE="https://open.larksuite.com/open-apis"

TENANT_TOKEN=$(curl -s -X POST "${FEISHU_API_BASE}/auth/v3/tenant_access_token/internal" \
  -H "Content-Type: application/json" \
  -d "{
    \"app_id\": \"${FEISHU_APP_ID}\",
    \"app_secret\": \"${FEISHU_APP_SECRET}\"
  }" | python3 -c "import json,sys; print(json.load(sys.stdin).get('tenant_access_token',''))")

echo "Token: ${TENANT_TOKEN:0:10}..."
3.2 List Chats the Bot Belongs To
bash
curl -s "${FEISHU_API_BASE}/im/v1/chats?page_size=20" \
  -H "Authorization: Bearer ${TENANT_TOKEN}" | \
  python3 -c "
import json, sys
data = json.load(sys.stdin)
for chat in data.get('data', {}).get('items', []):
    print(f\"Chat ID: {chat['chat_id']}  |  Name: {chat.get('name', 'N/A')}  |  Type: {chat.get('chat_type', 'N/A')}\")
"
3.3 Send Message to a Chat
bash
CHAT_ID="oc_xxxxx"  # Replace with actual chat_id

# Send a text message
curl -s -X POST "${FEISHU_API_BASE}/im/v1/messages?receive_id_type=chat_id" \
  -H "Authorization: Bearer ${TENANT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d "{
    \"receive_id\": \"${CHAT_ID}\",
    \"msg_type\": \"text\",
    \"content\": \"{\\\"text\\\": \\\"Hello from the App Bot!\\\"}\"
  }"

Send a rich text message via the API:

bash
curl -s -X POST "${FEISHU_API_BASE}/im/v1/messages?receive_id_type=chat_id" \
  -H "Authorization: Bearer ${TENANT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d "{
    \"receive_id\": \"${CHAT_ID}\",
    \"msg_type\": \"post\",
    \"content\": $(python3 -c "
import json
content = {
    'zh_cn': {
        'title': 'App Bot 消息',
        'content': [
            [
                {'tag': 'text', 'text': '这是一条通过 App Bot API 发送的 '},
                {'tag': 'a', 'text': '富文本消息', 'href': 'https://example.com'},
                {'tag': 'text', 'text': '。'}
            ]
        ]
    }
}
print(json.dumps(json.dumps(content)))
")
  }"

Send an interactive card via the API:

bash
curl -s -X POST "${FEISHU_API_BASE}/im/v1/messages?receive_id_type=chat_id" \
  -H "Authorization: Bearer ${TENANT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d "{
    \"receive_id\": \"${CHAT_ID}\",
    \"msg_type\": \"interactive\",
    \"content\": $(python3 -c "
import json
card = {
    'header': {
        'title': {'tag': 'plain_text', 'content': 'Marketing Update'},
        'template': 'turquoise'
    },
    'elements': [
        {'tag': 'markdown', 'content': '**Campaign Performance This Week**\n\n- Impressions: **120,450** (+12%)\n- Clicks: **8,320** (+8%)\n- Conversions: **342** (+15%)\n- Cost per Conversion: **\$14.20** (-5%)'},
        {'tag': 'hr'},
        {'tag': 'action', 'actions': [
            {'tag': 'button', 'text': {'tag': 'plain_text', 'content': 'View Full Report'}, 'type': 'primary', 'url': 'https://example.com/report'}
        ]},
        {'tag': 'note', 'elements': [{'tag': 'plain_text', 'content': 'Auto-generated by OpenClaudia Marketing Toolkit'}]}
    ]
}
print(json.dumps(json.dumps(card)))
")
  }"
3.4 Upload an Image

Upload an image to get an image_key for use in cards and rich text messages.

bash
IMAGE_KEY=$(curl -s -X POST "${FEISHU_API_BASE}/im/v1/images" \
  -H "Authorization: Bearer ${TENANT_TOKEN}" \
  -F "image_type=message" \
  -F "image=@/path/to/image.png" | python3 -c "import json,sys; print(json.load(sys.stdin).get('data',{}).get('image_key',''))")

echo "Image key: ${IMAGE_KEY}"
3.5 Send to a Specific User (by email or user_id)
bash
# By email (receive_id_type=email)
curl -s -X POST "${FEISHU_API_BASE}/im/v1/messages?receive_id_type=email" \
  -H "Authorization: Bearer ${TENANT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d "{
    \"receive_id\": \"user@company.com\",
    \"msg_type\": \"text\",
    \"content\": \"{\\\"text\\\": \\\"Direct message from the marketing bot.\\\"}\"
  }"

4. Message Templates

4.1 Product Announcement
bash
send_product_announcement() {
  local TITLE="$1"
  local VERSION="$2"
  local FEATURES="$3"
  local DOCS_URL="$4"
  local CTA_URL="$5"

  curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
    -H "Content-Type: application/json" \
    -d "$(python3 -c "
import json
card = {
    'msg_type': 'interactive',
    'card': {
        'header': {
            'title': {'tag': 'plain_text', 'content': '${TITLE}'},
            'template': 'green'
        },
        'elements': [
            {'tag': 'markdown', 'content': '**Version ${VERSION}** is now available!\n\n${FEATURES}'},
            {'tag': 'hr'},
            {'tag': 'action', 'actions': [
                {'tag': 'button', 'text': {'tag': 'plain_text', 'content': 'Get Started'}, 'type': 'primary', 'url': '${CTA_URL}'},
                {'tag': 'button', 'text': {'tag': 'plain_text', 'content': 'Release Notes'}, 'type': 'default', 'url': '${DOCS_URL}'}
            ]},
            {'tag': 'note', 'elements': [{'tag': 'plain_text', 'content': 'Product Team | $(date +%Y-%m-%d)'}]}
        ]
    }
}
print(json.dumps(card))
")"
}
4.2 Team Update / Weekly Report
bash
curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d '{
    "msg_type": "interactive",
    "card": {
      "header": {
        "title": {"tag": "plain_text", "content": "Weekly Marketing Report - W03 2025"},
        "template": "blue"
      },
      "elements": [
        {
          "tag": "column_set",
          "flex_mode": "bisect",
          "columns": [
            {
              "tag": "column",
              "width": "weighted",
              "weight": 1,
              "elements": [
                {"tag": "markdown", "content": "**Traffic**\n\nSessions: **45,230**\nUnique Visitors: **32,100**\nBounce Rate: **42%**"}
              ]
            },
            {
              "tag": "column",
              "width": "weighted",
              "weight": 1,
              "elements": [
                {"tag": "markdown", "content": "**Conversions**\n\nSignups: **580**\nTrials: **120**\nPaid: **34**"}
              ]
            }
          ]
        },
        {"tag": "hr"},
        {
          "tag": "markdown",
          "content": "**Top Performing Content:**\n1. \"10 Tips for Better SEO\" - 8,200 views\n2. \"Product Comparison Guide\" - 5,100 views\n3. \"Customer Success Story: Acme Corp\" - 3,800 views\n\n**Action Items:**\n- [ ] Publish Q1 campaign landing page\n- [ ] Review ad spend allocation\n- [ ] Schedule social media posts for next week"
        },
        {
          "tag": "action",
          "actions": [
            {
              "tag": "button",
              "text": {"tag": "plain_text", "content": "Full Dashboard"},
              "type": "primary",
              "url": "https://example.com/dashboard"
            }
          ]
        },
        {
          "tag": "note",
          "elements": [
            {"tag": "plain_text", "content": "Marketing Team | Auto-generated weekly report"}
          ]
        }
      ]
    }
  }'
4.3 Event Notification
bash
curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d '{
    "msg_type": "interactive",
    "card": {
      "header": {
        "title": {"tag": "plain_text", "content": "Upcoming Webinar: AI in Marketing"},
        "template": "purple"
      },
      "elements": [
        {
          "tag": "markdown",
          "content": "Join us for an exclusive webinar on leveraging AI for marketing success.\n\n**Date:** Thursday, January 30, 2025\n**Time:** 2:00 PM - 3:30 PM (PST)\n**Speaker:** Jane Smith, VP of Marketing\n**Format:** Live presentation + Q&A\n\n**What you will learn:**\n- How to use AI for content personalization\n- Automating campaign optimization\n- Measuring AI-driven marketing ROI"
        },
        {"tag": "hr"},
        {
          "tag": "action",
          "actions": [
            {
              "tag": "button",
              "text": {"tag": "plain_text", "content": "Register Now"},
              "type": "primary",
              "url": "https://example.com/webinar/register"
            },
            {
              "tag": "button",
              "text": {"tag": "plain_text", "content": "Add to Calendar"},
              "type": "default",
              "url": "https://example.com/webinar/calendar"
            }
          ]
        },
        {
          "tag": "note",
          "elements": [
            {"tag": "plain_text", "content": "Limited to 200 seats | Free for all team members"}
          ]
        }
      ]
    }
  }'
4.4 Marketing Campaign Alert
bash
curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d '{
    "msg_type": "interactive",
    "card": {
      "header": {
        "title": {"tag": "plain_text", "content": "Campaign Alert: Budget Threshold Reached"},
        "template": "orange"
      },
      "elements": [
        {
          "tag": "markdown",
          "content": "**Google Ads - Q1 Brand Campaign** has reached **80%** of its monthly budget.\n\n| Metric | Value |\n|--------|-------|\n| Budget | $10,000 |\n| Spent | $8,042 |\n| Remaining | $1,958 |\n| Days Left | 8 |\n| Projected Overspend | $2,100 |\n\n**Recommendation:** Reduce daily bid cap by 15% or pause low-performing ad groups."
        },
        {
          "tag": "action",
          "actions": [
            {
              "tag": "button",
              "text": {"tag": "plain_text", "content": "Adjust Budget"},
              "type": "danger",
              "url": "https://ads.google.com/campaigns"
            },
            {
              "tag": "button",
              "text": {"tag": "plain_text", "content": "View Campaign"},
              "type": "default",
              "url": "https://example.com/campaigns/q1-brand"
            }
          ]
        }
      ]
    }
  }'

5. Helper: Build and Send Cards Programmatically

For complex or dynamic cards, use Python to construct the JSON payload:

bash
python3 -c "
import json, subprocess, os

webhook_url = os.environ.get('FEISHU_WEBHOOK_URL', '')
if not webhook_url:
    print('Error: FEISHU_WEBHOOK_URL not set')
    exit(1)

# Build card dynamically
card = {
    'msg_type': 'interactive',
    'card': {
        'header': {
            'title': {'tag': 'plain_text', 'content': 'Dynamic Card Title'},
            'template': 'blue'
        },
        'elements': []
    }
}

# Add content blocks
card['card']['elements'].append({
    'tag': 'markdown',
    'content': 'This card was built programmatically.\n\n**Key metrics:**\n- Users: 10,000\n- Revenue: \$50,000'
})

# Add a divider
card['card']['elements'].append({'tag': 'hr'})

# Add buttons
card['card']['elements'].append({
    'tag': 'action',
    'actions': [
        {
            'tag': 'button',
            'text': {'tag': 'plain_text', 'content': 'Learn More'},
            'type': 'primary',
            'url': 'https://example.com'
        }
    ]
})

# Add footer
card['card']['elements'].append({
    'tag': 'note',
    'elements': [{'tag': 'plain_text', 'content': 'Sent via OpenClaudia'}]
})

payload = json.dumps(card)
result = subprocess.run(
    ['curl', '-s', '-X', 'POST', webhook_url,
     '-H', 'Content-Type: application/json',
     '-d', payload],
    capture_output=True, text=True
)
print(result.stdout)
"

6. Bilingual Support (Chinese + English)

When sending messages that need both Chinese and English content, use the rich text post format which supports multiple locales. Feishu will display the locale matching the user's language setting.

bash
curl -s -X POST "${FEISHU_WEBHOOK_URL}" \
  -H "Content-Type: application/json" \
  -d '{
    "msg_type": "post",
    "content": {
      "post": {
        "zh_cn": {
          "title": "重要通知:系统维护",
          "content": [
            [
              {"tag": "text", "text": "我们将于 "},
              {"tag": "text", "text": "1月25日 22:00-02:00 (北京时间)", "un_escape": true},
              {"tag": "text", "text": " 进行系统维护。"}
            ],
            [
              {"tag": "text", "text": "维护期间服务将暂时不可用。如有问题请联系 "},
              {"tag": "a", "text": "技术支持", "href": "https://example.com/support"},
              {"tag": "text", "text": "。"}
            ]
          ]
        },
        "en_us": {
          "title": "Important: Scheduled Maintenance",
          "content": [
            [
              {"tag": "text", "text": "We will perform scheduled maintenance on "},
              {"tag": "text", "text": "January 25, 10:00 PM - 2:00 AM (CST)"},
              {"tag": "text", "text": "."}
            ],
            [
              {"tag": "text", "text": "Services will be temporarily unavailable. For questions, contact "},
              {"tag": "a", "text": "Support", "href": "https://example.com/support"},
              {"tag": "text", "text": "."}
            ]
          ]
        }
      }
    }
  }'

7. Error Handling

Webhook Response Codes
CodeStatusMessageMeaning
0"success"Message sent successfully
9499"Bad Request"Malformed JSON or missing required fields
19001"param invalid"Invalid msg_type or content format
19002"sign match fail"Signature verification failed (check timestamp and secret)
19021"request too fast"Rate limit: max 100 messages per minute per webhook
19024"bot not in chat"Bot has been removed from the group
Show full SKILL.md (452 more words)Show less
Common Troubleshooting

Message not delivered:

  • Verify the webhook URL is correct and the bot is still in the group
  • Check that msg_type matches the content structure
  • For signed webhooks, ensure the timestamp is within 1 hour of current time

Card not rendering:

  • Validate JSON structure: header and elements are both required
  • Button URLs must start with http:// or https://
  • Markdown in cards supports a limited subset: bold, italic, links, lists, tables

API token errors:

  • Tenant access tokens expire after 2 hours; re-fetch before sending
  • Ensure the app has been published and approved in the developer console
  • Verify im:message:send_as_bot permission is granted
Rate Limits
IntegrationLimit
Custom Bot Webhook100 messages/minute per webhook
App Bot API (messages)50 messages/second per app
App Bot API (token refresh)500 requests/hour

8. Workflow: Post Marketing Content to Feishu/Lark

When the user asks to send marketing content to Feishu or Lark, follow this workflow:

Step 1: Check Credentials

Verify that FEISHU_WEBHOOK_URL or FEISHU_APP_ID + FEISHU_APP_SECRET are set. If not, guide the user through setup.

Step 2: Determine Message Type
User IntentRecommended Format
Quick text updatePlain text (msg_type: text)
Formatted announcementRich text (msg_type: post)
Marketing report with metricsInteractive card with columns
Product launchInteractive card with buttons
Event notificationInteractive card with CTA buttons
Alert or warningInteractive card with red/orange header
Step 3: Compose the Message
  • Use the appropriate template from section 4
  • Adapt content to the user's requirements
  • For bilingual groups, provide both zh_cn and en_us content
Step 4: Preview and Confirm

Show the user the full JSON payload before sending. Explain what the message will look like.

Never auto-send without explicit user confirmation.

Step 5: Send

Execute the curl command and report the response.

Step 6: Verify

Check the response code. If code: 0, the message was delivered. If there is an error, troubleshoot using the error table above.


9. Advanced: Message Card JSON Schema Quick Reference

{
  "msg_type": "interactive",
  "card": {
    "header": {                          // Required
      "title": {
        "tag": "plain_text",
        "content": "string"
      },
      "template": "blue|green|red|..."   // Header color
    },
    "elements": [                        // Required, array of blocks
      {"tag": "markdown", "content": "..."}, // Rich content
      {"tag": "hr"},                         // Divider line
      {"tag": "img", "img_key": "...", "alt": {...}}, // Image
      {                                      // Multi-column layout
        "tag": "column_set",
        "flex_mode": "bisect|trisect|...",
        "columns": [
          {"tag": "column", "width": "weighted", "weight": 1, "elements": [...]}
        ]
      },
      {                                      // Action buttons
        "tag": "action",
        "actions": [
          {"tag": "button", "text": {...}, "type": "primary|danger|default", "url": "..."}
        ]
      },
      {                                      // Footer note
        "tag": "note",
        "elements": [{"tag": "plain_text", "content": "..."}]
      }
    ]
  }
}

Tips

  • Start with webhooks. Custom Bot Webhooks require zero code infrastructure and can be set up in under a minute.
  • Use interactive cards for anything beyond simple text. They are more readable and actionable.
  • Include action buttons in every marketing card. Drive recipients to a landing page, dashboard, or sign-up form.
  • Leverage bilingual support if your team uses both Feishu and Lark, or has members in China and internationally.
  • Respect rate limits. For bulk messaging (e.g., sending to multiple groups), add a 1-second delay between requests.
  • Test in a private group first before sending to large team channels.
  • Keep card content concise. Cards have a maximum content size of approximately 30KB. For very long reports, link to an external page.
  • Use the Feishu Message Card Builder for visual card design: https://open.feishu.cn/tool/cardbuilder (Feishu) or https://open.larksuite.com/tool/cardbuilder (Lark).

© OpenClaudia, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/feishu-lark of OpenClaudia/openclaudia-skills.

Open the folder on GitHubat commit 28bf209

Compare with similar skills

Feishu Lark next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Feishu Lark compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Feishu Lark this skillOpenClaudia/openclaudia-skills713—~7.4kAutomated safety check: NotesMIT
Paper Feishu Digestchtc66/academic-skills360—~348Automated safety check: PassMIT
Feishu BridgeAlexAnys/feishu-openclaw3171 repos~615Automated safety check: PassNone
Lark Eventrongxinzy/RongxinAI1543 repos~2.7kAutomated safety check: PassAGPL-3.0
Lark Eventappleweiping/WEIPING_WIKI119—~1.9kAutomated safety check: PassMIT
Feishucodewhale-hq/Codewhale41k—~413Automated safety check: PassMIT

Similar skills

  • Paper Feishu Digest

    chtc66/academic-skills

    monitor recent arxiv papers and produce a chinese digest when the user needs a filtered paper watchlist, a ranked update for agent or rag related topics, or an optional feishu webhook push from…

    360 GitHub stars~348 tokensUpdated 6 mo ago
    Backend & APIsAuto-check passed
  • Feishu Bridge

    AlexAnys/feishu-openclaw

    Connect a Feishu (Lark) bot to Clawdbot via WebSocket long-connection.

    317 GitHub starsUsed in 1 repo~615 tokens
    Productivity & AutomationAuto-check passed
  • Lark Event

    rongxinzy/RongxinAI

    Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via lark-cli event consume <EventKey (covers IM messages/reactions/chat changes, Approval status changes…

    154 GitHub starsUsed in 3 repos~2.7k tokens
    Productivity & AutomationAuto-check passed
  • Lark Event

    appleweiping/WEIPING_WIKI

    Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via lark-cli event consume <EventKey (covers IM message receive, reactions, chat member changes, etc.).

    119 GitHub stars~1.9k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Feishu

    codewhale-hq/Codewhale

    Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.

    41k GitHub stars~413 tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Feishu Notify

    AI4Scientist/nano-scientist

    Send notifications to Feishu/Lark. An agent skill from AI4Scientist/nano-scientist.

    128 GitHub starsUsed in 4 repos~1.6k tokens
    Productivity & AutomationAuto-check passed

More from OpenClaudia/openclaudia-skills

All 74 skills in this repo
  • Competitor Traffic Report

    OpenClaudia/openclaudia-skills

    Build an interactive competitive-traffic report for any company and its rivals — monthly visits (SimilarWeb), organic search traffic and Domain Rating (Ahrefs) — as one self-contained HTML page with…

    713 GitHub stars~1.2k tokensUpdated 22 days ago
    Auto-check passed
  • Geo Difficulty

    OpenClaudia/openclaudia-skills

    Score how hard a keyword is to rank for in the AI-search era — page-level URL Rating of real competitors (not just domain DR), Ahrefs keyword difficulty, and whether a given site already ranks or is…

    713 GitHub stars~694 tokensUpdated 22 days ago
    Auto-check passed
  • Gsc Portfolio Audit

    OpenClaudia/openclaudia-skills

    Audit EVERY Google Search Console property at once — rank all sites by clicks and impressions with period-over-period deltas, then diff keywords per site to surface what is newly ranking, rising…

    713 GitHub stars~1k tokensUpdated 22 days ago
    Auto-check passed
  • Similarweb Traffic

    OpenClaudia/openclaudia-skills

    Fetch website traffic estimates (monthly visits, traffic sources, top countries, keywords, engagement, ranks) for any domain from SimilarWeb.

    713 GitHub stars~882 tokensUpdated 22 days ago
    Auto-check passed
  • Ahrefs Python

    OpenClaudia/openclaudia-skills

    Manages Ahrefs API usage in Python using ahrefs-python library.

    713 GitHub stars~1.9k tokensUpdated 22 days ago
    Auto-check passed
  • Ab Test Setup

    OpenClaudia/openclaudia-skills

    Design, plan, and analyze A/B tests with statistical rigor. An agent skill from OpenClaudia/openclaudia-skills.

    713 GitHub stars~1.7k tokensUpdated 22 days ago
    Auto-check passed

Works with

Questions about Feishu Lark

What does Feishu Lark do?

Send messages and interactive cards to Feishu (飞书) and Lark channels via webhooks or Bot API. Feishu Lark is an agent skill from OpenClaudia/openclaudia-skills. Send messages and interactive cards to Feishu (飞书) and Lark channels via webhooks or Bot API.

When should I use Feishu Lark?

Feishu Lark fits situations like: phrases: post to feishu; tasks that involve Messaging and chat bots; tasks that involve Webhooks.

How do I install Feishu Lark in Claude Code?

Run `npx skills add OpenClaudia/openclaudia-skills --skill feishu-lark -a claude-code`. Or copy the skill folder (skills/feishu-lark in OpenClaudia/openclaudia-skills) into .claude/skills/feishu-lark in your project. Claude Code loads it when a task matches its description.

How do I install Feishu Lark in Codex?

Run `npx skills add OpenClaudia/openclaudia-skills --skill feishu-lark -a codex`. Or copy the skill folder (skills/feishu-lark in OpenClaudia/openclaudia-skills) into .agents/skills/feishu-lark in your project. Codex loads it when a task matches its description.

Can I use Feishu Lark in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenClaudia/openclaudia-skills --skill feishu-lark -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/feishu-lark, .gemini/skills/feishu-lark, .github/skills/feishu-lark and .opencode/skills/feishu-lark in your project.

What does Feishu Lark need to run?

Going by SKILL.md and its folder, Feishu Lark needs the command-line tools its instructions call (curl, python3 and openssl) and credentials named FEISHU_APP_SECRET, FEISHU_WEBHOOK_SECRET, TENANT_TOKEN and IMAGE_KEY. Our summary lists: Python 3; A credential in FEISHU_WEBHOOK_SECRET; A credential in FEISHU_APP_SECRET. Its frontmatter pre-approves these tools: Bash, WebFetch, WebSearch.

Does Feishu Lark access the network?

SKILL.md names 3 domains. In commands or code: open.feishu.cn, open.larksuite.com and ads.google.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Feishu Lark safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file; pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Feishu Lark use?

Feishu Lark is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Feishu Lark use?

About 7.4k tokens (SKILL.md is roughly 29k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Feishu Lark?

Skills that share tags, products or a category with Feishu Lark: Paper Feishu Digest (chtc66/academic-skills, 360 stars), Feishu Bridge (AlexAnys/feishu-openclaw, 317 stars), Lark Event (rongxinzy/RongxinAI, 154 stars) and Lark Event (appleweiping/WEIPING_WIKI, 119 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Feishu Lark?

OpenClaudia (a GitHub organization) maintains it in OpenClaudia/openclaudia-skills, which has 713 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on September 18, 2026.

Source: OpenClaudia/openclaudia-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.