lark-event

Subscribe to Lark events via WebSocket and stream NDJSON output.

1.3k|142|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/MiniMax-AI/minimax-code --skill lark-event-minimax-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lark-event
Source: https://github.com/MiniMax-AI/minimax-code/tree/main/packages/local-runtime/assets/skills/lark-tools/cli-skills/lark-event
Command: npx skills add https://github.com/MiniMax-AI/minimax-code --skill lark-event-minimax-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Building event-driven automations on Lark (Feishu) normally requires standing up a webhook server and handling callback verification. This Skill lets you listen to Lark events in real time over a WebSocket long connection directly from the terminal, streaming structured NDJSON events that agents and shell pipelines can consume immediately. ## Core Features & Use Cases - Real-time event subscription: Connect via WebSocket long connection and receive messages, contact changes, calendar updates, approvals, tasks, and drive events as NDJSON on stdout. - Agent-friendly compact output: The --compact mode flattens event payloads, parses double-encoded message content, and strips noise fields so LLM pipelines can process events directly. - Filtering and routing: Register specific event types, apply client-side regex filters, and route events to different directories or files with --route and --output-dir. - Use Case: Pipe incoming IM messages into an AI assistant and automatically reply as the bot, or append every received message to a Lark document for logging. ## Quick Start Ask the agent to subscribe to incoming Lark messages with lark-cli event +subscribe using compact output and reply to each message as the bot.

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 from the command line?

Run lark-cli event +subscribe to open a WebSocket long connection and stream events as NDJSON to stdout. Use --event-types to limit which event types are received, or omit it to register 24 common event types in catch-all mode.

How to filter Lark events by type with regex?

Use the --filter flag with a regular expression, such as --filter "^im\." to keep only IM events. The filter is applied client-side after the SDK delivers events and can be combined with --event-types registration.

Does lark-cli event subscription require a webhook server?

No, it uses a WebSocket long connection instead of HTTP callbacks, so no public endpoint is needed. You must still enable long-connection mode and add event types in the Lark Open Platform console, and only bot identity with App ID and App Secret is required.

Why am I only receiving some of my Lark events?

The server splits events randomly across multiple connections for the same app, so running more than one +subscribe process means each instance gets only a subset. The single-instance lock prevents this; avoid using --force unless you accept partial delivery.

Can I route different Lark event types to separate files?

Yes, use repeatable --route flags in the form regex=dir:./path to send matching events to specific directories, with unmatched events falling through to --output-dir or stdout. Each event is written as an individual JSON file named by type, id, and timestamp.