lark-event

Consume Lark/Feishu real-time events as NDJSON streams via lark-cli event commands.

Updated Jun 26, 2026
One-click install
npx skills add https://github.com/dulltackle/kangkang-skills --skill lark-event-dulltackle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lark-event
Source: https://github.com/dulltackle/kangkang-skills/tree/main/lark-event
Command: npx skills add https://github.com/dulltackle/kangkang-skills --skill lark-event-dulltackle

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Building Lark/Feishu bots and integrations that react to real-time events (messages, approvals, meetings, tasks) normally requires standing up webhook servers and handling push infrastructure. This Skill lets an AI agent subscribe to and consume Lark events directly as NDJSON streams through lark-cli event consume, with a subprocess contract designed for agent-driven long-running listeners. ## Core Features & Use Cases - Event catalog discovery: List all subscribable EventKeys with lark-cli event list and inspect each key's params and output schema with event schema before writing filters. - Streaming consumption with jq filtering: Consume one EventKey per process, projecting or filtering each event with --jq, and bound runs with --max-events / --timeout. - Subprocess contract for AI agents: A stderr ready-marker ([event] ready event_key=...), stdin-EOF graceful shutdown, structured JSON error envelopes, and documented exit codes make orchestration deterministic. - Domain coverage: IM messages/reactions/chat changes, Approval status changes, Task updates, VC meeting lifecycle and notes, Minutes generation, Whiteboard edits, and bot menu events. - Use Case: Run lark-cli event consume im.message.receive_v1 --as bot to stream every incoming message to a bot, then add a --jq filter to react only to p2p text messages. ## Quick Start Ask the AI to listen for incoming Lark messages by running lark-cli event consume im.message.receive_v1 as the bot identity and show each message's sender and text.

Frequently Asked Questions about lark-event

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

FAQPage Schema
How do I listen for Lark/Feishu events from the command line?

Use lark-cli event consume with an EventKey, for example lark-cli event consume im.message.receive_v1 --as bot. Events stream to stdout as NDJSON. Discover available keys first with lark-cli event list --json.

How do I filter Lark events with jq?

Pass a jq expression via --jq, such as --jq 'select(.chat_type=="p2p")'. Check lark-cli event schema <key> --json first: jq_root_path tells you whether fields are at the top level or under .event, and field descriptions tell you if content is already decoded.

Can I consume multiple Lark EventKeys in one process?

No, each event consume process accepts exactly one EventKey. To listen to multiple keys, start one subprocess per key; they share a single local bus daemon, so overhead is small and each key gets its own filters and identity.

Why does my Lark event consumer exit immediately?

For unbounded runs, closing stdin (for example via /dev/null or nohup) triggers a graceful shutdown. Keep stdin open with a never-ending source like tail -f /dev/null, or run bounded with --max-events or --timeout, which ignore stdin EOF.

Why is kill -9 dangerous for Lark event consumers?

Keys like minutes, vc, and board register a server-side subscription on startup and unsubscribe on graceful exit. kill -9 skips the unsubscribe call, leaking the subscription and causing 'subscription already exists' errors or duplicate delivery on restart.

Does lark-cli event support both user and bot identities?

Yes, via --as user or --as bot, but support varies by EventKey. Approval, VC, and Minutes keys require user identity, while Task and Whiteboard keys support both. Check the scopes and auth table for each key in the references.