# Send Pywayne Lark Custom Bot to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "lark-custom-bot",
    "name": "Pywayne Lark Custom Bot",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/wangyendt/lark-custom-bot",
    "canonicalUrl": "https://clawhub.ai/wangyendt/lark-custom-bot",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/lark-custom-bot",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lark-custom-bot",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "lark-custom-bot",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T16:02:19.626Z",
      "expiresAt": "2026-05-14T16:02:19.626Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lark-custom-bot",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lark-custom-bot",
        "contentDisposition": "attachment; filename=\"lark-custom-bot-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "lark-custom-bot"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/lark-custom-bot"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/lark-custom-bot",
    "downloadUrl": "https://openagent3.xyz/downloads/lark-custom-bot",
    "agentUrl": "https://openagent3.xyz/skills/lark-custom-bot/agent",
    "manifestUrl": "https://openagent3.xyz/skills/lark-custom-bot/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/lark-custom-bot/agent.md"
  }
}
```
## Documentation

### Pywayne Lark Custom Bot

飞书自定义机器人模块，用于通过 webhook 向飞书渠道发送消息。

### Quick Start

from pywayne.lark_custom_bot import LarkCustomBot

# 初始化
bot = LarkCustomBot(
    webhook="your_webhook_url",
    secret="your_secret",  # 可选，用于签名验证
    bot_app_id="your_app_id",  # 上传图片时需要
    bot_secret="your_app_secret"  # 上传图片时需要
)

# 发送文本
bot.send_text("Hello, 飞书!")

# 发送文本并 @所有人
bot.send_text("重要通知！", mention_all=True)

### Text Message

发送纯文本消息。

bot.send_text("这是一条文本消息")
bot.send_text("@所有人请注意", mention_all=True)

### Image Message

发送图片消息，需要先上传获取 image_key。

# 从文件上传
image_key = bot.upload_image("/path/to/image.jpg")
bot.send_image(image_key)

# 从 OpenCV 图像上传
import cv2
cv2_img = cv2.imread("/path/to/image.jpg")
image_key = bot.upload_image_from_cv2(cv2_img)
bot.send_image(image_key)

注意: 上传图片需要配置 bot_app_id 和 bot_secret。

### Rich Text Post

发送富文本消息，支持文本、链接、@用户、图片等元素。

from pywayne.lark_custom_bot import (
    create_text_content,
    create_link_content,
    create_at_content,
    create_image_content
)

content = [
    [create_text_content("欢迎使用飞书机器人\\n")],
    [create_link_content(href="https://www.feishu.cn", text="点击访问飞书")],
    [create_at_content(user_id="user_id", user_name="用户名")],
    [create_image_content(image_key="img_xxx", width=400, height=300)]
]

bot.send_post(content, title="富文本消息标题")

### Interactive Card

发送交互式卡片消息。

card = {
    "header": {
        "title": {
            "content": "卡片标题",
            "tag": "plain_text"
        }
    },
    "elements": [
        {
            "tag": "div",
            "text": {
                "tag": "plain_text",
                "content": "卡片内容"
            }
        }
    ]
}
bot.send_interactive(card)

### Share Chat

分享会话。

bot.send_share_chat(share_chat_id="oc_xxxxxxxxxxxxxxxx")

### create_text_content

创建文本内容元素。

create_text_content("文本内容", unescape=False)

### create_link_content

创建超链接内容元素。

create_link_content(href="https://example.com", text="点击访问")

### create_at_content

创建 @用户内容元素。

create_at_content(user_id="user_id", user_name="用户名")

### create_image_content

创建图片内容元素。

create_image_content(image_key="img_xxx", width=400, height=300)

### Signature Verification

为增强安全性，可配置 secret 进行签名验证：

bot = LarkCustomBot(
    webhook="your_webhook_url",
    secret="your_signing_secret"
)

### Image Upload Authentication

上传图片需要应用凭证：

bot = LarkCustomBot(
    webhook="your_webhook_url",
    bot_app_id="cli_xxxxxxxxxxxxxxxx",
    bot_secret="xxxxxxxxxxxxxxx"
)

### Error Handling

所有方法内部已实现日志记录和异常处理。发送失败时会记录错误日志并抛出 requests.RequestException。
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: wangyendt
- Version: 0.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-07T16:02:19.626Z
- Expires at: 2026-05-14T16:02:19.626Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/lark-custom-bot)
- [Send to Agent page](https://openagent3.xyz/skills/lark-custom-bot/agent)
- [JSON manifest](https://openagent3.xyz/skills/lark-custom-bot/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/lark-custom-bot/agent.md)
- [Download page](https://openagent3.xyz/downloads/lark-custom-bot)