# Stream Lark Events for Real-Time Workflows

Real-time Lark workflows need reliable event streams, filtering, and clean shutdown behavior. This skill guides AI agents through bounded event consumption with lark-cli.

## Install

```bash
npx skillstore add larksuite/lark-event
```

## Metadata

- Status: approved
- Slug: larksuite-lark-event
- Version: 1.0.0
- Author version: 1.0.0
- Skillstore revision: r2
- Version status: valid
- Tree hash: a2fe28af84cfddff2a9f39f7858221791b9884bc85214eab6be732e63227cfac
- Author: larksuite
- GitHub username: larksuite
- License: MIT
- Repository: https://github.com/larksuite/cli/tree/main/skills/lark-event/
- Ref: ebdfe608f5de2b66ff37ab4af12af8ac4f5e8006
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: filesystem, external\_commands
- Quality score: 79
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/larksuite-lark-event
- Manifest: https://skillstore.pages.dev/api/skills/larksuite-lark-event/manifest

## Capabilities

- Lists subscribable event keys and inspects their schema metadata with lark-cli.
- Streams IM, Task, VC, Minutes, and Whiteboard events as NDJSON.
- Filters and transforms individual events with schema-aware jq expressions.
- Bounds consumers by event count or duration and interprets ready and exit markers.
- Runs separate consumers for multiple event keys and supports graceful shutdown.
- Explains required identities, scopes, and event-specific subscription behavior.

## Use Cases

- Build a responsive Lark bot: Consume message and reaction events, then filter them for a bot response workflow.
- Automate task and meeting workflows: Monitor task updates, meeting lifecycle events, and generated notes for downstream automation.
- Operate reliable event subscribers: Use readiness markers, bounded runs, structured errors, and graceful termination in managed subprocesses.

## Prompt Templates

### Discover available events

```
Use lark-cli to list available Lark event keys. Show the relevant schemas for [topic], but do not start a consumer.
```

### Sample one event

```
Consume one [EventKey] event as [user or bot] with a 60-second timeout. Explain required scopes and summarize the output fields.
```

### Create a filtered stream

```
Create a bounded consumer for [EventKey] that selects [condition] and emits [fields]. Validate field paths against the event schema before writing jq.
```

### Design multi-event orchestration

```
Design a multi-process subscription for [EventKey list]. Include ready-marker handling, independent bounds, structured errors, SIGTERM shutdown, deduplication, and sensitive-data controls.
```

## Limitations

- Requires lark-cli, configured credentials, required API scopes, and access to each target resource.
- Each consumer handles exactly one event key, so multiple keys require separate processes.
- Unbounded consumers require persistent stdin and may exit when stdin closes.
- Some fields can be empty or absent because of scopes, source types, or enrichment failures.

## Best Practices

- Inspect each event schema before writing filters because root paths and decoded fields vary.
- Use event count or timeout bounds during development, and preserve stderr ready and exit markers.
- Use least-privilege identities, protect streamed content, and terminate with SIGTERM or stdin closure.

## Anti Patterns

- Do not assume raw API payload shapes or apply fromjson to every content field.
- Do not use kill -9 for subscriptions that require server-side cleanup.
- Do not combine multiple event keys in one consumer or ignore nonzero exit codes.

## Security Audit

- Audited at: 2026-07-23T16:19:08.624\+00:00
- Summary: All 77 static findings are false positives from Markdown links, inline code, API documentation, identifier examples, and benign /dev/null usage. The files contain no executable scripts, dynamic shell construction, prompt injection, or malicious intent. Running lark-cli can still expose sensitive event data under the configured identity and scopes.

## Stats

- Views: 129
- Downloads: 11
- Favorites: 0
- Popularity score: 0
