Examples write potentially sensitive message content and identifiers from unbounded streams into plaintext local files
Source references: 4The Skill shows two background IM consumers with no event limit or timeout and redirects them directly to receive.ndjson and reaction.ndjson. Received-message content can contain readable message text, while sender_id and chat_id identify senders and conversations.
For as long as the processes run, chat content, reactions, and identifiers accumulate in workspace files. Other local users, backup or synchronization tools, and later processes may read them, while disk usage continues to grow.
The risk is supported, although the commands are examples and take effect only if an agent follows them. They redirect two background event streams to plaintext NDJSON files without an event or time bound; the documented defaults make the run unlimited. Message events can expose readable content plus sender and chat identifiers, so sensitive communications may accumulate on disk. Users can require bounds, minimal field projection, and advance confirmation of storage location, permissions, retention, and deletion.
# 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 &waitShow 3 other places
| `--jq <expr>` | 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 <dir>` | Write each event as a file (relative paths only; prevents traversal) || `--quiet` | Suppress ready/exit markers and per-event stderr diagnostics, including drop warnings. This can hide event loss. **AI should not use this** — it removes readiness and integrity signals || `--as user\|bot\|auto` | Identity for the session (see lark-shared) |**sender_id is open_id only**: the event payload carries no display name. Call the contact API separately if you need the sender's name.**`.content` shape depends on `message_type`** (this key uses a flat Custom schema; see [`events/im/message_receive.go`](../../../events/im/message_receive.go)):| message_type | `.content` shape | How to read ||---|---|---|| `text` / `post` / `image` / `file` / `audio` / `sticker` / `share_chat` / `share_user` / `media` / `system` | Human-readable text (convertlib-processed; `@mentions` resolved to display names) | Use `.content` directly || `interactive` (card) | Raw card JSON string (structured actions can't be losslessly flattened) | `.content \| fromjson` to get the card object |# group onlylark-cli event consume im.message.receive_v1 --as bot \ --jq 'select(.chat_type=="group") | {chat: .chat_id, from: .sender_id, msg: .content}'```