Skip to content

Guide · Agent skill

How to use the Lark Event Listener agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The lark-event skill teaches an AI agent how to subscribe to live Lark/Feishu events, such as new chat messages, reactions, approval status changes, task updates, meeting start and end, minutes generated, and whiteboard updates. It is useful for developers building a Lark or Feishu bot, teams automating workflows when approvals or tasks change, and engineers running long-lived or time-bounded listeners. After this guide you will know how to install the skill, ask for events in plain language, and run listeners safely.

Lark Event Listenerlarksuite/cli · MIT

Quick start

  1. 1Download and unzip the skill. Download the lark-event ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder.
  2. 2Install and authenticate lark-cli. Make sure the lark-cli tool is installed and authenticated, and that your Lark/Feishu app has permission for the event types you need.
  3. 3Ask for the event in plain words. Tell the agent which Lark or Feishu event you want and what should happen when it arrives.
  4. 4Let the agent check the fields. The agent uses event schema to read the field paths and types before writing any filter.
  5. 5Set a bound for the run. Specify --max-events or --timeout so the listener exits on its own, or keep stdin open for an unbounded run.
  6. 6Read the ready line before consuming. Wait for [event] ready event_key=<key> on stderr, then read the NDJSON on stdout.
  7. 7Stop the listener cleanly. Use SIGTERM or close stdin, and check the final exited line for the reason.

What is an agent skill and what does lark-event make the agent do?

An agent skill is a folder of instructions and reference files that an AI agent loads when a task matches it. The lark-event skill is one such folder. Its SKILL.md and reference files cover the lark-cli command-line tool and its event commands.

With this skill, the agent can list the event types it can subscribe to, read the fields of an event, and stream live events from Lark/Feishu as one line of JSON per event. The agent can then read those lines, filter them with jq expressions, and act on them.

  • Stream events such as im.message.receive_v1 (new IM messages) and im.message.reaction.created_v1 (reactions added)
  • Consume approval, task, VC meeting, minutes and whiteboard events
  • Run listeners as background subprocesses with readiness signals, exit codes and shutdown rules

Install the lark-event skill

Download the ZIP of the skill from this page. Then choose one of two ways to install it.

Option A: unzip into your personal skills folder ~/.claude/skills/, or into a project's .claude/skills/ folder for use in one project only.

Option B: in the Claude apps, open Settings, go to Capabilities, then Skills, and upload the ZIP.

  • Personal: unzip into ~/.claude/skills/
  • Single project: unzip into the project's .claude/skills/ folder
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

Set up lark-cli and authentication first

The skill does nothing without the lark-cli command-line tool installed and authenticated, and a Lark/Feishu tenant. The skill's metadata lists lark-cli as a required binary. Authentication, the --as user or --as bot switch, and Permission denied handling are described in the lark-shared skill, which the lark-event skill tells the agent to read first.

Your Lark app or bot also needs permissions for the event types you subscribe to. Some event types only work with a specific identity: the approval keys require --as user.

  • lark-cli installed and on the PATH
  • Authenticated Lark/Feishu account with the scopes the event needs
  • lark-shared skill available for authentication details
  • Bot or app permissions for each subscribed event type

Trigger the skill with natural requests

You do not need to type commands yourself. Describe the event and what you want done with it, and mention Lark or Feishu. The skill is written to handle requests such as listening for new messages, streaming reactions, or reacting to meeting end events.

The agent will look up the correct event key, check its fields, and then start the consumer. Be specific about how long the listener should run and what should happen to each event.

  • "Listen for new messages sent to my Lark bot and reply to any that mention deployment."
  • "Watch approval status changes for the next 30 minutes and tell me when one is approved."
  • "Stream task updates from Lark for 10 minutes and summarise them."
  • "Show me one sample event for VC meeting ended so I can see the fields."

Commands the agent runs

The core commands are lark-cli event list to see subscribable keys, lark-cli event schema to see one key's fields, and lark-cli event consume to stream events. Each event is written to stdout as NDJSON. Useful flags include --param (or -p) for business parameters, --jq to filter or reshape each event, --max-events to exit after N events, and --timeout to exit after a duration such as 30s or 2m.

  • lark-cli event list --json
  • lark-cli event schema <EventKey> --json
  • lark-cli event consume <EventKey> [flags]
  • Flags: --param, --jq, --max-events, --timeout, --output-dir, --as user|bot|auto
lark-cli event consume im.message.receive_v1 --max-events 1 --timeout 30s --as bot

Run listeners safely as subprocesses

When an agent runs a listener in the background, the parent process should wait for the ready line on stderr, which looks like [event] ready event_key=<key>, before reading stdout. Do not use sleep as a substitute. Bounded runs with --max-events or --timeout exit on their own. For unbounded runs, stdin must stay open, because stdin closing causes a graceful exit.

Shut down with SIGTERM or by closing stdin. Avoid kill -9 on consume processes for minutes, vc and board keys, because it skips the server-side unsubscribe and can leave a subscription behind. To listen to several event types, start one consume process per key.

  • Exit 0 with reason limit, timeout or signal means the run completed; non-zero means failure
  • Exit 1 covers Lark API failures, 2 validation errors, 3 auth failures, 4 and 5 network or internal failures
  • Do not use --quiet for AI runs, because it hides readiness and drop warnings
  • Under nohup or systemd defaults, stdin is closed and an unbounded run exits at once; keep stdin open with < <(tail -f /dev/null) or use a bound
lark-cli event consume im.message.reaction.created_v1 --as bot > reaction.ndjson &

Filter events with jq

Use lark-cli event schema <key> --json to find where the fields start. A value of "." means fields sit at the top level, so you write .chat_id. A value of ".event" means fields are inside a V2 envelope, so you write .event.chat_id. Check each field's type and description before writing a filter.

For IM messages, the content field is already rendered to readable text for text, post, image, file and audio messages. Only interactive cards keep the raw JSON string, so do not run fromjson on every message.

  • Filter a menu event: --jq 'select(.event_key == "start_eval")' on application.bot.menu_v6
  • An empty jq output skips the event
lark-cli event consume application.bot.menu_v6 --as bot --jq 'select(.event_key == "start_eval")'

What people use it for

  • Build a Lark bot that answers new messages sent to it in real time
  • React to reactions added to a message, such as tracking approvals by emoji
  • Watch approval instance status changes and notify a team when they change
  • Track task updates and summarise them for a project channel
  • Log VC meeting started, joined and ended events, or pick up minutes once generated

Frequently asked questions

How do I install the lark-event skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project. In the Claude apps, you can instead upload the ZIP under Settings, Capabilities, Skills.

What do I need before the lark-event skill works?

You need the lark-cli command-line tool installed and authenticated, a Lark/Feishu account with the right scopes, and app or bot permissions for each event type. The lark-shared skill covers authentication and identity switching.

Is the lark-event skill free?

The skill is released under the MIT licence. The source does not state any pricing, so check the lark-cli and Lark/Feishu terms for their own requirements.

Why does my listener exit immediately?

If the run is unbounded and stdin is closed, as happens under nohup or systemd's default StandardInput=null, the listener exits gracefully with reason signal. Keep stdin open with < <(tail -f /dev/null), or set --max-events or --timeout.

Can one listener consume several event types at once?

Not in one process. Each consume command takes exactly one event key, and wildcards and comma lists are unsupported. Run one subprocess per key; they share a single local bus daemon.

How is this different from calling the Lark API directly?

A one-off API read is simpler and is better for single lookups. This skill is for continuous event streams, and it needs more setup, including a subscription, authentication and readiness handling.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use lark-event if you are building a Lark or Feishu bot or workflow that must react to events as they happen, and you can set up lark-cli and permissions. If you only need to read Lark data once, a direct API call or the lark-shared workflow is simpler and a better fit.

Download the skill