Lark (international) communication channel. For Feishu (飞书, China) use the separate feishu component instead. Use when: (1) replying to Lark messages (DM or group @mentions), (2) sending proactive messages or media (images, files) to Lark users or groups, (3) managing DM access control (dmPolicy: open/allowlist/owner, dmAllowFrom list), (4) managing group access control (groupPolicy, per-group allowFrom, smart/mention modes), (5) operating Lark productivity surfaces via the bundled lark-cli — documents, sheets, slides, multidim Base, calendar, tasks, mail, drive, wiki, OKR, approval, attendance, video conferencing, minutes, Miaoda/Spark apps, native OpenAPI explorer (see "Bundled Capability Modules" in SKILL.md body — full module index under references/), (6) configuring the bot (admin CLI, markdown card settings, verification token), (7) troubleshooting Lark webhook or service issues. Config at ~/zylos/components/lark/config.json. Service: pm2 zylos-lark.
Lark (international) communication channel. For Feishu (飞书, China) use the separate feishu component instead. Use when: (1) replying to Lark messages (DM or group @mentions), (2) sending proactive messages or media (images, files) to Lark users or groups, (3) managing DM access control (dmPolicy: open/allowlist/owner, dmAllowFrom list), (4) managing group access control (groupPolicy, per-group allowFrom, smart/mention modes), (5) operating Lark productivity surfaces via the bundled lark-cli — documents, sheets, slides, multidim Base, calendar, tasks, mail, drive, wiki, OKR, approval, attendance, video conferencing, minutes, Miaoda/Spark apps, native OpenAPI explorer (see "Bundled Capability Modules" in SKILL.md body — full module index under references/), (6) configuring the bot (admin CLI, markdown card settings, verification token), (7) troubleshooting Lark webhook or service issues. Config at ~/zylos/components/lark/config.json. Service: pm2 zylos-lark.
{"required":[{"name":"LARK_APP_ID","description":"App ID (open.larksuite.com/app -> Credentials)"},{"name":"LARK_APP_SECRET","description":"App Secret (same page as App ID)","sensitive":true}]}
next-steps
BEFORE starting the service: 1) Ask user for their Verification Token (REQUIRED — from developer console Event Subscriptions page). Write to config.bot.verification_token in ~/zylos/components/lark/config.json. The service will refuse to start without it. 2) Optionally ask for Encrypt Key — if provided, write to config.bot.encrypt_key. 3) Read domain from ~/zylos/.zylos/config.json and tell user to configure webhook URL in the developer console — open.larksuite.com/app (Event Subscriptions → Request URL → https://{domain}/lark/webhook). 4) Start the service (pm2 restart zylos-lark).
Lark (international) communication channel for zylos.
Depends on: comm-bridge (C4 message routing).
Bundled Capability Modules (lark-cli)
This skill bundles 27 capability modules under references/, each operating against Lark via the lark-cli binary. They are not auto-loaded as top-level skills — Claude Code's skill discovery only scans top-level directories, and these sub-modules live inside this skill. The parent SKILL.md (this file) is the entry point.
How to use a module: when a user's request maps to one of the modules below, Read that module's SKILL.md first to learn its exact commands/flags, then invoke lark-cli <module> ....
Prerequisites (installed automatically by zylos add lark / zylos upgrade lark — see hooks/post-install-shared.js):
lark-cli binary on PATH (npm install -g @larksuite/cli).
27 sub-skill folders under references/lark-*/ (npx xc-skills add larksuite/cli).
App credentials in lark-cli's keychain (~/.lark-cli/config.json + AES-256-GCM encrypted file under ~/.local/share/lark-cli/); pushed from ~/zylos/.env automatically.
Identity (--as bot vs --as user):
⚠️ Prefer user identity for content operations. When querying or editing documents, wiki / knowledge bases, drive files, sheets, or Base via lark-cli, default to --as user (OAuth-authorized; 7-day rolling refresh token). The bot identity is not a member of any knowledge space and lacks drive scopes, so bot-identity content queries silently find nothing. Bot identity is appropriate for IM messaging operations.
--as bot works out of the box for app/tenant-level operations (IM messaging, contacts, events). No extra login needed.
--as user is the default for content operations (docs, wiki, drive, sheets, Base — see note above) and is required for surfaces tied to a real user's data (calendar, mail-write, tasks, attendance, OKR, minutes, VC-agent). The user runs lark-cli auth login --domain <name> once. On auth failure lark-cli exits with a error envelope; the agent should detect this and notify the owner of the login command.
<domain>_user_login_required
Module Index
Path prefix for all entries: references/
Messaging & people
Module
Use when…
lark-im/SKILL.md
Send/search messages, manage groups and members, upload/download media (chunked for large files)
lark-contact/SKILL.md
Resolve names/emails ↔ open_ids; look up department / contact info
Video conferencing history, meeting summaries (notes/todos/chapters/transcripts), participant snapshots
lark-vc-agent/SKILL.md
Have the bot join/leave a live meeting on the user's behalf; consume real-time events
lark-minutes/SKILL.md
Minutes: list, basic info, transcripts, AI summaries
lark-note/SKILL.md
Meeting notes (纪要): query note detail by note_id, get note_doc_token / verbatim_doc_token, read unified transcripts
Apps & low-code
Module
Use when…
lark-apps/SKILL.md
Miaoda/Spark apps: create, publish HTML sites, local full-stack dev, cloud-based generation, DB ops, release management
Workflows & platform
Module
Use when…
lark-workflow-meeting-summary/SKILL.md
Roll up meeting minutes over a time range
lark-workflow-standup-report/SKILL.md
Orchestrate calendar + task into a standup summary
lark-event/SKILL.md
Subscribe / consume real-time events as NDJSON streams
lark-openapi-explorer/SKILL.md
Discover native OpenAPI endpoints not yet wrapped by CLI shortcuts
lark-skill-maker/SKILL.md
Author new sub-skills wrapping lark-cli (atomic APIs or multi-step flows)
lark-shared/SKILL.md
Shared utilities / types referenced by other modules (rarely invoked directly)
Loading Convention
Before running lark-cli <module> <subcmd>:
Read references/<module>/SKILL.md to confirm exact subcommands, flags, and required vs. optional args.
If that module's SKILL.md references additional docs under its own references/ subdirectory, read those as well.
Run the command.
Skipping step 1 risks calling wrong subcommand names or missing required flags — lark-cli is feature-rich and each module covers dozens of subcommands.
# Test authentication
npm run cli test# Send messages
npm run cli send-group oc_xxx "Hello"# Documents
npm run cli doc <doc_id>
npm run cli sheet-read <token> <range>
# Calendar
npm run cli calendar --days 7
# Groups
npm run cli chats
Admin CLI
Manage bot configuration via admin.js:
ADM="node ~/zylos/.claude/skills/lark/src/admin.js"# General$ADM show # Show full config$ADM show-owner # Show current owner$ADMhelp# Show all commands# DM Access Control$ADM set-dm-policy <open|allowlist|owner> # Set DM policy$ADM list-dm-allow # Show DM policy + allowFrom list$ADM add-dm-allow <user_id_or_open_id> # Add user to dmAllowFrom$ADM remove-dm-allow <user_id_or_open_id> # Remove user from dmAllowFrom# Group Management$ADM list-groups # List all configured groups$ADM add-group <chat_id> <name> [mode] # Add group (mode: mention|smart)$ADM remove-group <chat_id> # Remove a group$ADM set-group-policy <disabled|allowlist|open> # Set group policy$ADM set-group-allowfrom <chat_id> <id1,id2> # Set per-group allowed senders$ADM set-group-history-limit <chat_id> <n> # Set per-group context message limit$ADM migrate-groups # Migrate legacy group config to new format# Legacy aliases (backward-compatible, map to commands above)# list-allowed-groups, add-allowed-group, remove-allowed-group → list-groups, add-group, remove-group# list-smart-groups, add-smart-group, remove-smart-group → list-groups, add-group, remove-group# enable-group-whitelist, disable-group-whitelist → set-group-policy allowlist|open# list-whitelist, add-whitelist, remove-whitelist → list-dm-allow, add-dm-allow, remove-dm-allow# enable-whitelist, disable-whitelist → set-dm-policy allowlist|open
After changes, restart: pm2 restart zylos-lark
Downloading Media by Resource Key
In smart group mode, images and files sent without @mention are logged with
metadata only (image_key/file_key). Use download.js to fetch them on demand:
If your domain is behind Cloudflare proxy with Flexible SSL mode, Caddy's automatic HTTPS will cause a redirect loop. Options:
Change Cloudflare SSL to Full: In Cloudflare dashboard → SSL/TLS → set mode to "Full" (recommended)
Use HTTP mode: Run zylos config set protocol http (automatically updates Caddyfile and reloads Caddy)
Owner
First user to send a private message becomes the owner (primary partner).
Owner bypasses DM policy and per-group/per-channel allowlist checks. However, groupPolicy: disabled blocks all group messages, including from the owner.
Outgoing messages can be rendered as interactive cards with proper markdown formatting (code blocks, tables, headers, etc.):
{"message":{"useMarkdownCard":true}}
On by default. Note mobile display limitation: cards cannot be long-pressed to copy on mobile. Can be disabled via node admin.js set-markdown-card off. When enabled (cards cannot be long-pressed to copy on mobile). When enabled, messages containing markdown are auto-detected and sent as cards; plain text messages are sent normally. Falls back to plain text if card sending fails.
Group Context
When responding to @mentions in groups, the bot includes recent message context
so Claude understands the conversation. Context is retrieved from logged messages
since the last response.
Configuration in config.json:
{"message":{"context_messages":10}}
Message logs are stored in ~/zylos/components/lark/logs/<chat_id>.log.
Service Management
pm2 status zylos-lark
pm2 logs zylos-lark
pm2 restart zylos-lark