AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Lark Event

skill-dropfan-claude-code-plugins-lark-event · by DropFan

Lark/Feishu real-time event listening / subscribing / consuming: stream events as NDJSON via `lark-cli event consume <EventKey>` (covers IM messages/reactions/chat changes, Task updates, VC meeting started/joined/ended, Minutes generated, Whiteboard updated, etc.). Use for Lark bots, real-time message processing, long-running subscribers, streaming webhook/push handlers. Supports `--max-events` /…

No reviews yet
0 installs
19 views
0.0% view→install

Install

$ agentstack add skill-dropfan-claude-code-plugins-lark-event

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution Used
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-dropfan-claude-code-plugins-lark-event)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Lark Event? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

> ⚙️ Cowork / Claude Desktop 执行环境说明(自动注入) > > 本技能依赖本地 lark-cli@larksuite/cli,可用 command -v lark-cli 定位)及其 ~/.lark-cli 登录态(应用密钥存于 macOS keychain)。 > > 在 Cowork 中运行任何 lark-cli 命令时,必须在本地 macOS 上执行(使用 Desktop Commander 的 start_process / interact_with_process,或其它本地 shell 工具),不要用隔离的 Linux 沙箱 mcp__workspace__bash——沙箱里没有 lark-cli、也读不到 keychain。 > 执行前确保 npm 全局 bin 目录(npm prefix -g 输出目录下的 bin)在 PATH 中。 > > (在 Claude Code 中可忽略本说明,lark-cli 在本机 shell 直接可用。)

Lark Events

> Prerequisite: Read [../lark-shared/SKILL.md](../lark-shared/SKILL.md) first for authentication, --as user/bot switching, Permission denied handling, and safety rules.

Core commands

| Command | Purpose | |------|------| | lark-cli event list [--json] | List all subscribable EventKeys | | lark-cli event schema [--json] | Show an EventKey's params and output schema | | lark-cli event consume [flags] | Blocking consume; events → stdout NDJSON | | lark-cli event status [--json] [--fail-on-orphan] | Inspect the local bus daemon status | | lark-cli event stop [--all] [--force] | Stop the bus daemon |

Common flags

| Flag | Description | |---|---| | --param key=value / -p | Business params (repeatable; comma-separated for multi-value). Unknown keys fail with valid names listed inline | | --jq | jq expression to filter / transform each event; empty output skips the event | | --max-events N | Exit after N events. Default 0 = unlimited | | --timeout D | Exit after duration D (e.g. 30s, 2m). Default 0 = no timeout. Whichever of --max-events / --timeout fires first wins | | --output-dir | Write each event as a file (relative paths only; prevents traversal) | | --quiet | Suppress stderr diagnostics. AI should not use this — it silences the ready marker | | --as user\|bot\|auto | Identity for the session (see lark-shared) |

Examples

# Default: stream every event for the key (no filter, no projection)
lark-cli event consume im.message.receive_v1 --as bot

# Grab one sample event to inspect payload shape
lark-cli event consume im.message.receive_v1 --max-events 1 --timeout 30s --as bot

# Run for 10 minutes then auto-exit
lark-cli event consume im.message.receive_v1 --timeout 10m --as bot

# Consume multiple EventKeys concurrently (one shape per process, no dispatcher)
lark-cli event consume im.message.receive_v1          --as bot > receive.ndjson &
lark-cli event consume im.message.reaction.created_v1 --as bot > reaction.ndjson &
wait

Call flow

  1. lark-cli event list --json → pick a legal key
  2. lark-cli event schema --json → read resolved_output_schema + jq_root_path to determine field paths
  3. lark-cli event consume [--jq ''] → consume

Subprocess contract

Ready marker

event consume's stderr emits a fixed line [event] ready event_key=. Parent processes should block on stderr until this line appears, then start reading stdout. Do not fall back to sleep.

stdin EOF = graceful exit

event consume treats stdin close as a shutdown signal (wired for AI subprocess callers). Bounded runs are exempt: when --max-events or --timeout is set (> 0), stdin EOF is ignored and the run exits only via its own bound, timeout, or SIGTERM. For unbounded runs, --json is the source of truth for writing --jq. Four things to look at:

(1) Where fields start — see jq_root_path

  • Value "." → fields are at the top level, write .chat_id
  • Value ".event" → fields are inside a V2 envelope, write .event.chat_id

(2) Field list and types — see resolved_output_schema.properties.

Each field carries type / description, and some also have format. Snippet (from event schema im.message.receive_v1 --json):

{
  "chat_id":     {"type":"string", "format":"chat_id",      "description":"Chat ID, prefixed with oc_"},
  "sender_id":   {"type":"string", "format":"open_id",      "description":"Sender open_id, prefixed with ou_"},
  "create_time": {"type":"string", "format":"timestamp_ms", "description":"Send time as ms-epoch string"}
}

(3) Field semantics — see the format tag

Lark-defined semantic tags (not JSON Schema's standard format). Common values: open_id / chat_id / message_id / timestamp_ms / email. Purpose: distinguish "same string type, different meanings" fields so you can reverse-lookup via API or convert formats.

(4) Decoded state — read the field's description

event consume runs Process hooks that may pre-decode some payload fields (flattening V2 envelopes, rendering .content to plain text, etc.) — behavior differs from raw OAPI. Always read the field's description before writing jq, especially for generic field names like content / data / body / payload.

Why it matters: blindly applying fromjson to an already-decoded text field makes jq error on every event and silently drop it — the consumer looks alive but emits nothing, with only a single WARN line buried on stderr. (This is the general behavior: any jq runtime error skips the event with a one-line WARN; the loop does not abort.)

Don't shortcut the schema: when projecting event schema --json with jq, do not strip .description from properties — that's the field that tells you whether a field is already decoded. Dump the full property objects, not just keys.


Aside: --param's valid parameters also live in the schema — the params section lists name / type / required / enum / default / description; section missing = this key accepts no --param.

Topic index

| Topic | Reference | Coverage | |------------|------------------------------------------------------------------------------|---| | IM | [references/lark-event-im.md](references/lark-event-im.md) | Catalog of 12 IM EventKeys + shape notes (flat vs V2 envelope) + im.message.receive_v1 field gotchas (sender_id is openid only; .content is plain text except for interactive cards) + common jq recipes (filter by chattype / messagetype / sender); for card.action.trigger see also [../lark-im/references/lark-im-card-action-reply.md](../lark-im/references/lark-im-card-action-reply.md) | | Task | [references/lark-event-task.md](references/lark-event-task.md) | Catalog of 1 Task EventKey (task.task.update_user_access_v2) + Native V2 envelope shape + task commit types + user/bot subscription notes | | VC | [references/lark-event-vc.md](references/lark-event-vc.md) | Catalog of 4 VC EventKeys (vc.meeting.participant_meeting_started_v1, vc.meeting.participant_meeting_joined_v1, vc.meeting.participant_meeting_ended_v1, vc.note.generated_v1) + field reference + source type semantics (meeting only) | | Minutes | [references/lark-event-minutes.md](references/lark-event-minutes.md) | Catalog of 1 Minutes EventKey (minutes.minute.generated_v1) + field reference + source type semantics (meeting only) | | Whiteboard | [references/lark-event-whiteboard.md](references/lark-event-whiteboard.md) | Catalog of 1 Board EventKey (board.whiteboard.updated_v1) + per-whiteboard subscription model (requires -p whiteboard_id=) + payload field reference (whiteboardid / operator_ids triple-id) |

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.