lark-event

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

Updated May 22, 2026
One-click install
npx skills add https://github.com/CalWade/aigc-creator --skill lark-event-calwade
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lark-event
Source: https://github.com/CalWade/aigc-creator/tree/main/.agents/skills/lark-event
Command: npx skills add https://github.com/CalWade/aigc-creator --skill lark-event-calwade

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Building Lark/Feishu bots or automation that reacts to real-time events (incoming messages, reactions, meeting endings, generated minutes, whiteboard edits) normally requires standing up webhook servers and managing subscriptions. This Skill lets an AI agent subscribe to and stream those events directly as NDJSON via lark-cli event consume, with a subprocess contract designed for agent callers. ## Core Features & Use Cases - Event discovery and schema inspection: List all subscribable EventKeys with lark-cli event list and inspect each key's params and output schema with lark-cli event schema before writing jq filters. - Bounded or unbounded consumption: Stream events to stdout as NDJSON, with --max-events / --timeout for bounded runs, --jq for filtering and projection, and a stderr ready-marker plus structured exit codes for reliable subprocess orchestration. - Domain references: Detailed catalogs for 11 IM EventKeys, 2 VC EventKeys, 1 Minutes EventKey, and 1 Whiteboard EventKey, including field semantics, auth scopes, and jq recipes. - Use Case: Build a Lark bot that watches im.message.receive_v1, filters for group text messages mentioning a keyword, and pipes matching events into a downstream summarization pipeline. ## 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 you the streamed events.

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 incoming Lark/Feishu messages in real time?▼

Run lark-cli event consume im.message.receive_v1 --as bot to stream every incoming message as NDJSON to stdout. Add --jq filters to narrow by chat type, message type, or sender, and use --max-events or --timeout for bounded runs.

How do I filter Lark events with jq before processing them?▼

Pass a jq expression via the --jq flag, for example --jq 'select(.message_type=="text") | .content'. Check lark-cli event schema <key> --json first to learn the jq_root_path and field types, since some fields are pre-decoded and must not be passed through fromjson.

Can I consume multiple Lark event types in one process?▼

No, each event consume process handles exactly one EventKey. To listen to multiple keys, run one subprocess per key; they all share a single local bus daemon, so overhead is small and each stream keeps one consistent output shape.

Why does my Lark event consumer exit immediately after starting?▼

For unbounded runs, closing stdin (for example via /dev/null or nohup defaults) signals 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.

What happens if I kill -9 a Lark event consume process?▼

kill -9 skips the OAPI unsubscribe step for EventKeys with PreConsume hooks, leaking server-side subscriptions and causing 'subscription already exists' errors or duplicate delivery later. Use SIGTERM or close stdin instead for graceful cleanup.

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

Yes, the --as user|bot|auto flag selects the identity, but support varies by EventKey. For example, VC and Minutes keys require --as user, while board.whiteboard.updated_v1 supports both user and bot with manage access to the whiteboard.