lark-event

Streams Lark/Feishu platform events as NDJSON via lark-cli event consume subprocesses.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/U1traVeno/skills --skill lark-event-u1traveno
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lark-event
Source: https://github.com/U1traVeno/skills/tree/main/profiles/lark/lark-event
Command: npx skills add https://github.com/U1traVeno/skills --skill lark-event-u1traveno

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Building Lark/Feishu bots and real-time integrations normally requires standing up webhook servers and handling push callbacks. This Skill lets an AI agent subscribe to and consume Lark events (IM messages, reactions, task updates, VC meetings, minutes, whiteboard edits) directly as NDJSON streams from a CLI subprocess, with a defined ready-marker and exit-code contract. ## Core Features & Use Cases - Event discovery and schema inspection: List all subscribable EventKeys with lark-cli event list and inspect params, output schemas, and jq root paths via lark-cli event schema before consuming. - Bounded or unbounded consumption: Stream events to stdout as NDJSON with --max-events / --timeout bounds, --jq filtering/projection, and --output-dir file capture. - 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 (0-5) make it safe to orchestrate as a child process. - Use Case: Run lark-cli event consume im.message.receive_v1 --as bot to power a chatbot that reacts to incoming messages, or run multiple consumers in parallel for reactions, task updates, and meeting events with fault isolation per key. ## Quick Start Ask the AI to list available Lark event keys, then start consuming im.message.receive_v1 as the bot identity with a one-event sample to inspect the payload shape.

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 messages in real time?▼

Run lark-cli event consume im.message.receive_v1 --as bot to stream incoming messages as NDJSON to stdout. Use lark-cli event list to discover other EventKeys and event schema to inspect payload fields before writing jq filters.

How to filter Lark event streams with jq?▼

Pass a jq expression via --jq, for example --jq 'select(.message_type=="text") | .content'. Check event schema <key> --json first for jq_root_path and field descriptions, since some fields like .content are pre-decoded and fromjson will fail on them.

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

No, each event consume process takes exactly one EventKey. To listen to N keys, start N subprocesses; they share a single local bus daemon, so overhead is small and each key gets independent filtering and identity settings.

Why does my Lark event consumer exit immediately?▼

Unbounded runs treat stdin EOF as a graceful shutdown signal, so running with /dev/null stdin or nohup causes immediate exit. Feed stdin a never-ending source like < <(tail -f /dev/null), or use --max-events / --timeout for bounded runs.

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

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

Does lark event consume support both user and bot identity?▼

Yes, the --as user|bot|auto flag selects the identity, but support varies per EventKey. For example task and whiteboard events support both, while VC meeting and minutes events require --as user with specific scopes granted.