lark-event

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

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

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 Lark platform events (IM messages, reactions, chat changes, VC meeting endings, Minutes generation) directly from the command line, streaming them as NDJSON without any server infrastructure. ## Core Features & Use Cases - Event Discovery & Schema Inspection: List all subscribable EventKeys and inspect each key's parameters, output schema, and field semantics before consuming. - Bounded or Continuous Consumption: Stream events with --max-events / --timeout limits, jq-based filtering and projection, and per-event file output. - Subprocess Contract for AI Agents: A stderr ready-marker, stdin-EOF graceful shutdown, and documented exit codes make it safe to run as a long-lived subprocess. - Use Case: Build a Lark bot that watches im.message.receive_v1, filters for group text messages with jq, and reacts to each message in real time — all orchestrated by an AI agent running lark-cli event consume as a subprocess. ## 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 Lark/Feishu messages in real time?

Run lark-cli event consume im.message.receive_v1 --as bot to stream incoming messages as NDJSON on 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?

Pass a jq expression via --jq to filter or transform each event; empty output skips the event. First run lark-cli event schema <EventKey> --json to check jq_root_path and field descriptions, since some fields are pre-decoded and fromjson will fail on them.

Can I consume multiple Lark event types at once?

One consume process handles exactly one EventKey; wildcards and comma-separated keys are unsupported. To listen to multiple keys, run one subprocess per key — they share a single local bus daemon, so overhead is small and failures are isolated.

Why does my Lark event consumer exit immediately?

event consume treats stdin EOF as a graceful shutdown signal, so running with /dev/null stdin or nohup causes immediate exit. Feed stdin a source that never EOFs, such as tail -f /dev/null, or use --max-events / --timeout for bounded runs.

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

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