lark-event

Subscribe to Lark events via WebSocket and stream NDJSON output.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill lark-event-yuezhen-huang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lark-event
Source: https://github.com/yuezhen-huang/my-bytedance-skillhub/tree/main/lark-event
Command: npx skills add https://github.com/yuezhen-huang/my-bytedance-skillhub --skill lark-event-yuezhen-huang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lark-cli, and includes references (resource) components.

What problem does it solve? Building event-driven automations on Lark requires continuously listening to platform events like incoming messages, contact changes, and calendar updates. This Skill establishes a WebSocket long connection to receive these events in real time and outputs them as structured NDJSON, removing the need to run a public webhook server. ## Core Features & Use Cases - Real-time Event Subscription: Connect via WebSocket long connection and receive events such as im.message.receive_v1, contact changes, and calendar updates as NDJSON on stdout. - Agent-Friendly Output: Use --compact to flatten event payloads, parse message content into readable text, and strip noise fields for direct consumption by AI pipelines. - Filtering and Routing: Filter events by type or client-side regex, and route different event types to separate output directories or files. - Use Case: Build a bot that listens for incoming Lark messages, pipes each compact event to an LLM for a reply, and responds via the Lark API, all in a single shell pipeline. ## Quick Start Subscribe to incoming Lark messages in compact mode by running lark-cli event +subscribe --event-types im.message.receive_v1 --compact --quiet.

Frequently Asked Questions about lark-event

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I subscribe to Lark events with lark-cli?

Run lark-cli event +subscribe to receive all 24 common event types, or pass --event-types like im.message.receive_v1 to limit the subscription. Events stream as NDJSON to stdout over a WebSocket long connection.

How to filter Lark events by type or pattern?

Use --event-types with a comma-separated list to register specific event types with the SDK dispatcher. For client-side filtering after delivery, add --filter with a regex such as ^im\. to match only IM events.

Does Lark event subscription require a public webhook server?

No, it uses a WebSocket long connection instead of webhooks. You must select the long connection subscription method in the Lark Open Platform console, add the desired events, and enable the corresponding permission scopes.

Can I run multiple Lark event subscription processes at once?

Only one +subscribe process is allowed per app by default, enforced by a single-instance lock. Using --force bypasses the lock but is unsafe because the server splits events randomly across connections, so each instance receives only a subset.

What is the difference between raw and compact event output?

Raw output is full NDJSON including schema, token, and app_id fields. Compact mode flattens the structure, parses message content into readable text, extracts sender_id, and strips noise fields, making it suitable for agent pipelines.