lark-event

Streams Lark/Feishu real-time events as NDJSON via lark-cli event consume.

Updated Jun 29, 2026
One-click install
npx skills add https://github.com/trungpr1990-coder/AMI-MAKEUP --skill lark-event-trungpr1990-coder
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lark-event
Source: https://github.com/trungpr1990-coder/AMI-MAKEUP/tree/main/.agents/skills/lark-event
Command: npx skills add https://github.com/trungpr1990-coder/AMI-MAKEUP --skill lark-event-trungpr1990-coder

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 (messages, reactions, meeting starts, task updates) normally requires standing up webhook servers and handling subscription lifecycles. This Skill lets an AI agent subscribe to and consume those events directly as NDJSON streams with bounded runs and a well-defined subprocess contract. ## Core Features & Use Cases - Event discovery and schema inspection: List all subscribable EventKeys and inspect each key's params, output schema, and jq root path before consuming. - Streaming consumption: Consume events from IM (12 keys), Task, VC meetings, Minutes, and Whiteboard as NDJSON to stdout, with jq filtering/projection and --max-events / --timeout bounded runs. - Subprocess contract for AI agents: A stderr ready marker, stdin-EOF graceful shutdown, structured JSON error envelopes, and documented exit codes make it safe to run as a long-lived subprocess. - Use Case: Run lark-cli event consume im.message.receive_v1 --as bot to stream every incoming message, then filter with --jq 'select(.chat_type=="p2p")' to process only direct messages. ## Quick Start Ask the agent to listen for incoming Lark messages by running lark-cli event consume im.message.receive_v1 as the bot identity and show each received message.

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 received 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 find which Lark event keys I can subscribe to?▼

Run lark-cli event list --json to list all subscribable EventKeys, then lark-cli event schema <EventKey> --json to see its parameters, output schema, and jq root path before writing any filter expressions.

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

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

Why does my jq filter drop every Lark event silently?▼

A jq runtime error skips the event with only a one-line WARN on stderr. A common cause is applying fromjson to .content, which lark-cli already pre-decodes to plain text for most message types; only interactive card messages need fromjson.

Why does my Lark event consumer exit immediately when run in the background?▼

For unbounded runs, stdin EOF triggers a graceful shutdown, so nohup or /dev/null stdin causes an immediate exit. Feed stdin a source that never EOFs, or use --max-events or --timeout, which make bounded runs ignore stdin EOF.

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

For EventKeys with a PreConsume hook that registers server-side subscriptions, kill -9 skips the OAPI unsubscribe call and leaks the subscription, causing subscription-already-exists errors or duplicate delivery. Use SIGTERM or close stdin instead.