원클릭으로
Read and search emails from Lark Mail via IMAP with local caching. Use when user asks about email, inbox, or messages.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Read and search emails from Lark Mail via IMAP with local caching. Use when user asks about email, inbox, or messages.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Read and write Lark documents - get content as markdown or blocks, create new documents, append content (text, headings, lists, code), list folders. Use when user asks about a Lark doc, wants to read/create/edit a document, or mentions a document URL/ID.
Read and query Lark Sheets (spreadsheets) - list sheets in a spreadsheet, read cell data. Use when user asks about a spreadsheet, wants to read data from a Lark sheet, or mentions a spreadsheet URL/ID.
Manage Lark calendar - view schedule, create/update/delete events, check availability, find meeting slots, RSVP to invitations. Use when user asks about meetings, schedule, availability, or calendar.
Retrieve chat message history, send messages, and manage reactions in Lark - get messages from group chats, private chats, threads, send messages to users or chats, and add/list/remove reactions. Use when user asks about chat messages, conversation history, what was discussed in a group, or wants to send a message or react.
Access Lark Bitable databases - list tables, view fields, and read records. Use when user asks about a Bitable, database, or wants to query structured data.
Look up employee information via Lark - find colleagues by ID, list department members, search users by name, search departments. Use when user asks about a person, colleague, job title, department, or org structure.
SOC 직업 분류 기준
| name | |
| description | Read and search emails from Lark Mail via IMAP with local caching. Use when user asks about email, inbox, or messages. |
Read and search emails from Lark Mail via the lark CLI using IMAP with local caching.
Before using mail commands, IMAP credentials must be configured:
lark mail setup
This will prompt for IMAP credentials. See: https://www.larksuite.com/hc/en-US/articles/378111206512-log-in-to-lark-mail-through-a-third-party-email-client
Ensure lark is in your PATH, or use the full path to the binary. Set the config directory if not using the default:
lark mail <command>
# Or with explicit config:
LARK_CONFIG_DIR=/path/to/.lark lark mail <command>
lark mail status
Shows connection status and cache freshness. The freshness field indicates how stale the cached data is.
lark mail list
Fetch new emails from the server into the local cache:
# Sync INBOX (default)
lark mail sync
# Sync with more parallel connections (faster for large mailboxes)
lark mail sync --workers 20
# Sync specific mailbox
lark mail sync --mailbox Sent
Flags:
--mailbox, -m: Mailbox to sync (default: INBOX)--workers, -w: Number of parallel connections (default: 10)Important:
Search the local cache (fast, no network calls):
# List recent emails
lark mail search
# Filter by sender
lark mail search --from alice@example.com
# Filter by subject
lark mail search --subject "Q4 Report"
# Filter by date range
lark mail search --since 2025-01-01 --before 2025-01-15
# Combined filters
lark mail search --from boss@example.com --since 2025-01-01 --limit 10
# Search different mailbox
lark mail search --mailbox Sent
lark mail show --uid <uid>
The UID is obtained from search results.
lark mail fetch --uid <uid>
lark mail fetch --uid <uid> --output ./emails/
All commands output JSON.
{
"configured": true,
"host": "imap.larksuite.com",
"port": 993,
"username": "user@example.com",
"connection": "ok",
"cache": {
"last_sync": "2025-01-14T10:30:00+08:00",
"freshness": "15 minutes ago",
"uidvalidity": 12345,
"last_uid": 4521
}
}
{
"mailbox": "INBOX",
"last_sync": "2025-01-14T10:30:00+08:00",
"freshness": "15 minutes ago",
"total_cached": 1523,
"results": [
{
"uid": 4521,
"message_id": "<abc123@mail.example.com>",
"date": "2025-01-14T09:15:00+08:00",
"from_addr": "alice@example.com",
"from_name": "Alice",
"subject": "Q4 Report"
}
],
"count": 1
}
{
"uid": 4521,
"from": {
"email": "alice@example.com",
"name": "Alice"
},
"subject": "Q4 Report",
"date": "2025-01-14T09:15:00+08:00",
"message_id": "<abc123@mail.example.com>",
"body": "Hi,\n\nPlease find the Q4 report attached...\n\nBest,\nAlice"
}
{
"mailbox": "INBOX",
"new_messages": 5,
"total_cached": 1523,
"message": "synced 5 new messages"
}
Errors return JSON:
{
"error": true,
"code": "ERROR_CODE",
"message": "Description"
}
Common error codes:
CONNECTION_ERROR - IMAP connection failed (check credentials)SCOPE_ERROR - Missing mail permissions. Run lark auth login --add --scopes mailSYNC_ERROR - Failed to sync emailsSEARCH_ERROR - Cache query failedVALIDATION_ERROR - Missing required fields (e.g., --uid)IO_ERROR - File system errorThis skill requires the mail scope group. If you see a SCOPE_ERROR, the user needs to add mail permissions:
lark auth login --add --scopes mail
To check current permissions:
lark auth status
Check cache freshness:
lark mail status
Sync if needed (based on freshness):
lark mail sync
Search emails:
lark mail search --from boss@example.com --since 2025-01-01
View email details using UID from search:
lark mail show --uid 4521
Download if needed:
lark mail fetch --uid 4521