← 返回 Skills 市场
alex098929

Feishu Notify

作者 alex098929 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
185
总下载
1
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install feishu-notify
功能描述
This skill should be used when users need to send notifications to Feishu (Lark) via webhook. It supports multiple message types including text, rich text, i...
使用说明 (SKILL.md)

Feishu Notify Skill

This skill enables sending notifications to Feishu (Lark) using webhook URLs. It supports various message types including text messages, rich text posts, interactive cards, and images.

Configuration Requirements

IMPORTANT: Before using this skill, you must configure your Feishu webhook URLs:

Create the configuration file at ~/.openclaw/skills/feishu-notify/config.json with the following content:

{
  "webhooks": {
    "default": "https://open.feishu.cn/open-apis/bot/v2/hook/your-webhook-url",
    "alerts": "https://open.feishu.cn/open-apis/bot/v2/hook/your-alerts-webhook-url",
    "notifications": "https://open.feishu.cn/open-apis/bot/v2/hook/your-notifications-webhook-url"
  }
}

Configuration Structure

  • default: Default webhook URL used when no specific webhook is specified
  • alerts: Webhook URL for alert messages
  • notifications: Webhook URL for general notifications
  • custom: You can add as many custom webhooks as needed (e.g., "devops", "finance", "marketing")

Configuration Priority

The skill loads configuration from:

  • User's config.json at ~/.openclaw/skills/feishu-notify/config.json (only source)

When to Use This Skill

Activate this skill when:

  • Users want to send notifications to Feishu groups
  • Users need to send alerts or notifications to Feishu
  • Users mention "send to Feishu", "notify Feishu", or "message Feishu"
  • Users want to send different types of messages (text, card, image) to Feishu

Skill Components

Scripts

The scripts/send_message.py script provides a reliable way to send messages to Feishu via webhook. This script:

  • Loads webhook URLs from user's config.json file
  • Supports multiple message types (text, post, interactive, image)
  • Handles message templates from templates directory (with security restrictions)
  • Provides error handling and response validation

Templates

The templates/ directory contains message templates for different scenarios:

  • text_simple.json: Simple text message template
  • post_rich.json: Rich text (post) message template
  • card_alert.json: Interactive card for alerts
  • card_notification.json: Interactive card for notifications
  • card_task.json: Interactive card for task updates

References

The references/api_documentation.md contains documentation about Feishu webhook API, including:

  • Webhook authentication and format
  • Supported message types and structures
  • Message template specifications
  • Error handling and response codes

Workflow

When this skill is activated:

  1. Check configuration - Verify that ~/.openclaw/skills/feishu-notify/config.json exists and contains valid webhook URLs. If not, prompt user to configure it.

  2. Determine message type based on user's request:

    • Text message: For simple text notifications
    • Post (Rich text): For formatted messages with elements
    • Interactive card: For rich cards with buttons, images, and structured content
    • Image message: For sending image URLs
  3. Select webhook based on context:

    • Use "default" if no specific webhook is mentioned
    • Use named webhooks (e.g., "alerts", "notifications") if specified
    • Use custom webhooks if provided by name
  4. Build or load message:

    • Use a predefined template from templates directory
    • Or build a custom message based on user's content
    • Fill in template variables with user-provided data
  5. Send message using webhook URL:

    • Run scripts/send_message.py with webhook name and message type
    • The script loads appropriate webhook URL from config.json
    • Returns delivery status and response
  6. Present results to user:

    • Confirm message delivery status
    • Display any errors if delivery failed
    • Provide feedback on what was sent

Important Notes

  • Feishu webhooks use POST method with JSON body
  • Each webhook URL is specific to a Feishu group/chat
  • Message types include: "text", "post", "interactive", "image"
  • Webhook URLs are secrets and should be kept secure
    • Never commit config.json to version control
    • Set file permissions to restrict access (chmod 600 on Unix/Linux)
    • Treat webhook URLs like API keys
  • Message size limit: 200KB for most message types
  • Interactive cards support buttons, images, markdown, and more
  • The script validates the response from Feishu API
  • Template loading is restricted to the templates/ directory for security
  • The agent can call this skill autonomously (messages may be sent without explicit confirmation)

Message Types

1. Text Message

Simple text-only messages.

{
  "msg_type": "text",
  "content": {
    "text": "Your message here"
  }
}

2. Post (Rich Text) Message

Messages with rich formatting including text, links, @mentions, images, and more.

3. Interactive Card Message

Rich cards with structured content, buttons, images, and interactive elements.

4. Image Message

Messages with image URLs (image_key or image_url).

Example Interactions

User: "Send a notification to Feishu: 'Deployment completed successfully'" Action: Use "default" webhook, send text message with provided text

User: "Send an alert to Feishu about server error: 'Connection timeout'" Action: Use "alerts" webhook, use card_alert template with error details

User: "Send a task update to Feishu: Task #123 completed by John" Action: Use "notifications" webhook, use card_task template with task information

User: "Send a rich message to devops webhook about deployment status" Action: Use "devops" webhook, use post_rich template with deployment details

User: "Notify the team about the meeting at 3 PM" Action: Use "default" webhook, send text message with meeting details

Error Handling

If configuration is missing:

  • Inform user that webhook URLs need to be configured
  • Provide instructions on creating ~/.openclaw/skills/feishu-notify/config.json
  • Show required JSON format
  • Remind user to keep webhook URLs secret

If webhook is not found:

  • Check if the specified webhook name exists in config
  • Suggest using "default" webhook or adding the named webhook

If message sending fails:

  • Check if the webhook URL is valid
  • Verify network connectivity
  • Display error message from Feishu API
  • Suggest checking the webhook configuration

If template loading fails:

  • Ensure the template file is within the templates/ directory
  • For security reasons, arbitrary JSON files cannot be used as templates
  • Use predefined templates or add new ones to the templates/ directory

Template Usage

Templates are stored in the templates/ directory with JSON format. Each template includes:

  • Message type definition
  • Content structure with placeholders
  • Variable replacement support

Security: For security reasons, template loading is restricted to the templates/ directory only. Arbitrary JSON files cannot be used as templates.

To use a template:

  1. Select the appropriate template based on the message type
  2. Replace placeholder variables with actual content
  3. Send using the send_message.py script with the template path

Note: When adding custom templates, place them in the templates/ directory to ensure they can be loaded by the script.

安全使用建议
This skill appears to do what it says: send messages to Feishu webhooks using a local config file and templates. Before installing: - Keep your webhook URLs secret and stored only in ~/.openclaw/skills/feishu-notify/config.json with restrictive permissions (chmod 600). The webhook URL itself is the authentication token for posting. - Be aware that the agent may invoke this skill autonomously and send messages without an explicit prompt if the agent chooses to; if you need manual confirmation, disable autonomous invocation or only configure non-critical webhooks. - The template loader has a weak directory check (uses startswith); consider reviewing or hardening the code (use os.path.commonpath or compare path components / add trailing slash) if you worry about template-path trickery or symlink-based escapes. - Test using a disposable webhook or a non-production Feishu group before enabling in production. If you want a higher security posture, review the script locally (send_message.py) and optionally modify it to: validate template paths via os.path.commonpath, avoid accepting arbitrary template path input from untrusted prompts, and log less/avoid printing secrets. Overall the skill is internally consistent and there are no unexplained external endpoints or extra credentials requested.
功能分析
Type: OpenClaw Skill Name: feishu-notify Version: 1.0.1 The feishu-notify skill is a legitimate utility for sending various types of messages (text, rich text, interactive cards) to Feishu (Lark) via webhooks. The Python script `scripts/send_message.py` includes proactive security measures, such as path traversal validation when loading templates and proper JSON escaping when substituting variables. It correctly handles sensitive webhook URLs by requiring them to be stored in a local configuration file (`~/.openclaw/skills/feishu-notify/config.json`) rather than hardcoding them or accepting them as direct input. No evidence of malicious intent, data exfiltration, or unauthorized command execution was found.
能力评估
Purpose & Capability
Name and description (send messages to Feishu via webhook) match the included files and runtime behavior. The skill only needs webhook URLs stored in a user config file and uses templates and a small Python script to POST messages to Feishu webhooks.
Instruction Scope
SKILL.md instructs the agent to read a single config file in the user's home (~/.openclaw/skills/feishu-notify/config.json) and to load templates from the skill's templates/ directory — this matches the script. One implementation issue: load_template uses a string startswith() check to ensure template paths are in the templates directory; that can be bypassed by paths whose absolute path begins with the templates path string (e.g., '/.../templates_malicious/...') or via certain symlink scenarios. Otherwise the instructions do not ask for unrelated files or credentials.
Install Mechanism
No install spec (instruction-only plus a small script). No external downloads or package installs are performed by the skill bundle itself.
Credentials
The skill requests no environment variables or platform credentials. The only secret required is the Feishu webhook URL stored by the user in a local config file — this is proportional to the stated purpose.
Persistence & Privilege
The skill is not forced-always and does not request special privileges, but SKILL.md explicitly states the agent can call this skill autonomously. That means an autonomous agent could send messages (to whatever webhooks are configured) without explicit user confirmation — expected for messaging skills but worth user awareness.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-notify
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-notify 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
feishu-notify 1.0.1 changelog: - Clarified that configuration is only loaded from the user's config.json; removed mentions of platform environment variables and default values. - Added detailed security guidance: emphasized that webhook URLs are secrets, not to be committed to version control, and should have restricted file permissions. - Documented that template loading is strictly restricted to the templates/ directory for security; arbitrary JSON files cannot be used as templates. - Updated notes to clarify that the agent may send messages autonomously using this skill. - Improved and tightened instructions regarding error handling and secret management.
v1.0.0
Initial release of feishu-notify skill. - Send notifications to Feishu (Lark) via configured webhooks. - Supports multiple message types: text, rich text (post), interactive cards, and images. - Users must set up webhook URLs in ~/.openclaw/skills/feishu-notify/config.json. - Includes message templates and a script for sending different types of messages. - Provides error handling, configuration priority, and usage guidance.
元数据
Slug feishu-notify
版本 1.0.1
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 2
常见问题

Feishu Notify 是什么?

This skill should be used when users need to send notifications to Feishu (Lark) via webhook. It supports multiple message types including text, rich text, i... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 185 次。

如何安装 Feishu Notify?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-notify」即可一键安装,无需额外配置。

Feishu Notify 是免费的吗?

是的,Feishu Notify 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Feishu Notify 支持哪些平台?

Feishu Notify 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Feishu Notify?

由 alex098929(@alex098929)开发并维护,当前版本 v1.0.1。

💬 留言讨论