Lark Calendar & Task Skill
Create, update, and delete calendar events and tasks in Lark (Feishu).
Overview
This skill provides full CRUD operations for:
- - Calendar Events — meetings, appointments, schedules
- Tasks (Todo) — action items with deadlines
Configuration
Required Environment Variables (in .secrets.env):
CODEBLOCK0
Default Calendar: feishu.cn_caF80RJxgGcbBGsQx64bCh@group.calendar.feishu.cn (Claw calendar)
Default Timezone: INLINECODE2
Quick Reference
Create Calendar Event
CODEBLOCK1
Parameters:
| Param | Required | Description |
|---|
| INLINECODE3 | ✅ | Event title |
| INLINECODE4 |
❌ | Event description |
|
--start | ✅ | Start time (YYYY-MM-DD HH:MM:SS) |
|
--end | ✅ | End time (YYYY-MM-DD HH:MM:SS) |
|
--attendees | ❌ | Comma-separated names (auto-resolved to user_ids) |
|
--attendee-ids | ❌ | Comma-separated user_ids directly |
|
--location | ❌ | Event location |
|
--timezone | ❌ | Timezone (default: Asia/Singapore) |
|
--calendar | ❌ | Calendar ID (uses default if omitted) |
Update Calendar Event
CODEBLOCK2
Delete Calendar Event
CODEBLOCK3
List Calendar Events
CODEBLOCK4
Create Task
CODEBLOCK5
Parameters:
| Param | Required | Description |
|---|
| INLINECODE12 | ✅ | Task title |
| INLINECODE13 |
❌ | Task description |
|
--due | ✅ | Due date (YYYY-MM-DD HH:MM:SS) |
|
--assignees | ❌ | Comma-separated names (auto-resolved) |
|
--assignee-ids | ❌ | Comma-separated user_ids directly |
|
--timezone | ❌ | Timezone (default: Asia/Singapore) |
Update Task
CODEBLOCK6
Delete Task
CODEBLOCK7
Manage Event Attendees
CODEBLOCK8
Manage Task Members
CODEBLOCK9
Employee Directory
Names are auto-resolved to Lark user_ids. Supported names:
| user_id | Names | Role |
|---|
| INLINECODE18 | Boyang, by, 博洋 | Boss |
| INLINECODE19 |
RK | Leadership, R&D |
|
53gc5724 | Ding | Leadership, Operations |
|
217ec2c2 | Charline | HR |
|
f2bfd283 | 曾晓玲, xiaoling | HR |
|
f26fe45d | HH | Research |
|
45858f91 | zan, Eva | - |
|
7f79b6de | Issac | Operations |
|
1fb2547g | 王铁柱 | Operations |
|
e5997acd | 尼克, Nico | Operations |
|
438c3c1f | Ivan | Operations |
|
17g8bab2 | Dodo | R&D, Product |
|
73b45ec5 | 启超, QiChaoShi | R&D, Design |
|
d1978a39 | chenglin | R&D, Frontend |
|
ef6fc4a7 | 冠林, Green | R&D, Frontend |
|
b47fa8f2 | sixian, sx, Sixian-Yu | R&D, Frontend |
|
934fbf15 | jc, sagiri, 俊晨 | R&D, Backend |
|
8c4aad87 | 大明, daming | R&D, Backend |
|
ab87g5e1 | Emily Yobal | Intern |
|
55fa337f | jingda, 景达 | Intern |
|
333c7cf1 | 刘纪源, 纪源, Aiden | Intern |
Business Rules
- 1. Boyang is always added as attendee to every calendar event (automatic)
- Timezone handling: Uses IANA identifiers (e.g.,
Asia/Singapore, Asia/Shanghai) - Time format: Always INLINECODE41
- userid vs openid: This skill uses
user_id format (e.g., dgg163e1), NOT open_id (e.g., ou_xxx)
Programmatic Usage
CODEBLOCK10
Lark API Reference
Permissions Required
Ensure your Lark app has these scopes:
- -
calendar:calendar — Read/write calendar ✅ (already enabled) - INLINECODE47 — Read calendar ✅ (already enabled)
- INLINECODE48 — Write tasks ⚠️ (needs to be added for task creation)
- INLINECODE49 — Read tasks
- INLINECODE50 — Read user info ✅ (already enabled)
To add permissions:
- 1. Go to Lark Open Platform
- Add scopes:
task:task:write, contact:contact:readonly (for dynamic employee lookup) - Re-publish the app version
Note: Without contact:contact:readonly, the skill uses a static fallback employee list. Update lib/employees.mjs when team changes.
Lark日历与任务技能
在Lark(飞书)中创建、更新和删除日历事件与任务。
概述
本技能提供以下完整CRUD操作:
- - 日历事件 — 会议、预约、日程安排
- 任务(待办事项) — 带截止日期的行动项
配置
所需环境变量(在.secrets.env中):
bash
FEISHUAPPID=cli_a9f52a4ed7b8ded4
FEISHUAPPSECRET=<你的应用密钥>
默认日历: feishu.cn_caF80RJxgGcbBGsQx64bCh@group.calendar.feishu.cn(Claw日历)
默认时区: Asia/Singapore
快速参考
创建日历事件
bash
node skills/lark-calendar/scripts/create-event.mjs \
--title 与团队会议 \
--description 讨论Q2路线图 \
--start 2026-02-03 14:00:00 \
--end 2026-02-03 15:00:00 \
--attendees Boyang,RK \
--location A会议室
参数:
| 参数 | 必填 | 说明 |
|---|
| --title | ✅ | 事件标题 |
| --description |
❌ | 事件描述 |
| --start | ✅ | 开始时间(YYYY-MM-DD HH:MM:SS) |
| --end | ✅ | 结束时间(YYYY-MM-DD HH:MM:SS) |
| --attendees | ❌ | 逗号分隔的姓名(自动解析为user_id) |
| --attendee-ids | ❌ | 直接使用逗号分隔的user_id |
| --location | ❌ | 事件地点 |
| --timezone | ❌ | 时区(默认:Asia/Singapore) |
| --calendar | ❌ | 日历ID(省略则使用默认日历) |
更新日历事件
bash
node skills/lark-calendar/scripts/update-event.mjs \
--event-id f9900f6b-b472-4b17-a818-7b5584abdc37_0 \
--title 更新后的标题 \
--start 2026-02-03 15:00:00 \
--end 2026-02-03 16:00:00
删除日历事件
bash
node skills/lark-calendar/scripts/delete-event.mjs \
--event-id f9900f6b-b472-4b17-a818-7b5584abdc37_0
列出日历事件
bash
列出未来7天的事件
node skills/lark-calendar/scripts/list-events.mjs
列出日期范围内的事件
node skills/lark-calendar/scripts/list-events.mjs \
--start 2026-02-01 \
--end 2026-02-28
创建任务
bash
node skills/lark-calendar/scripts/create-task.mjs \
--title 审查PR #123 \
--description 认证模块的代码审查 \
--due 2026-02-05 18:00:00 \
--assignees Boyang,jc
参数:
| 参数 | 必填 | 说明 |
|---|
| --title | ✅ | 任务标题 |
| --description |
❌ | 任务描述 |
| --due | ✅ | 截止日期(YYYY-MM-DD HH:MM:SS) |
| --assignees | ❌ | 逗号分隔的姓名(自动解析) |
| --assignee-ids | ❌ | 直接使用逗号分隔的user_id |
| --timezone | ❌ | 时区(默认:Asia/Singapore) |
更新任务
bash
node skills/lark-calendar/scripts/update-task.mjs \
--task-id 35fc5310-a1b1-49c7-be75-be631d3079ee \
--title 更新后的任务 \
--due 2026-02-06 18:00:00
删除任务
bash
node skills/lark-calendar/scripts/delete-task.mjs \
--task-id 35fc5310-a1b1-49c7-be75-be631d3079ee
管理事件参与者
bash
添加参与者
node skills/lark-calendar/scripts/manage-attendees.mjs \
--event-id xxx --add RK,jc
移除参与者
node skills/lark-calendar/scripts/manage-attendees.mjs \
--event-id xxx --remove jc
管理任务成员
bash
添加成员
node skills/lark-calendar/scripts/manage-task-members.mjs \
--task-id xxx --add RK,jc
移除成员
node skills/lark-calendar/scripts/manage-task-members.mjs \
--task-id xxx --remove jc
员工目录
姓名会自动解析为Lark的user_id。支持的姓名:
| user_id | 姓名 | 角色 |
|---|
| dgg163e1 | Boyang, by, 博洋 | 老板 |
| gb71g28b |
RK | 领导层,研发 |
| 53gc5724 | Ding | 领导层,运营 |
| 217ec2c2 | Charline | 人力资源 |
| f2bfd283 | 曾晓玲, xiaoling | 人力资源 |
| f26fe45d | HH | 研究 |
| 45858f91 | zan, Eva | - |
| 7f79b6de | Issac | 运营 |
| 1fb2547g | 王铁柱 | 运营 |
| e5997acd | 尼克, Nico | 运营 |
| 438c3c1f | Ivan | 运营 |
| 17g8bab2 | Dodo | 研发,产品 |
| 73b45ec5 | 启超, QiChaoShi | 研发,设计 |
| d1978a39 | chenglin | 研发,前端 |
| ef6fc4a7 | 冠林, Green | 研发,前端 |
| b47fa8f2 | sixian, sx, Sixian-Yu | 研发,前端 |
| 934fbf15 | jc, sagiri, 俊晨 | 研发,后端 |
| 8c4aad87 | 大明, daming | 研发,后端 |
| ab87g5e1 | Emily Yobal | 实习生 |
| 55fa337f | jingda, 景达 | 实习生 |
| 333c7cf1 | 刘纪源, 纪源, Aiden | 实习生 |
业务规则
- 1. Boyang始终被添加为每个日历事件的参与者(自动)
- 时区处理: 使用IANA标识符(例如Asia/Singapore、Asia/Shanghai)
- 时间格式: 始终为YYYY-MM-DD HH:MM:SS
- userid与openid: 本技能使用userid格式(例如dgg163e1),而非openid(例如ou_xxx)
编程使用
javascript
import { createEvent, updateEvent, deleteEvent } from ./skills/lark-calendar/lib/calendar.mjs;
import { createTask, updateTask, deleteTask } from ./skills/lark-calendar/lib/task.mjs;
import { resolveNames } from ./skills/lark-calendar/lib/employees.mjs;
// 创建事件
const result = await createEvent({
title: 团队同步,
description: 每周站会,
startTime: 2026-02-03 10:00:00,
endTime: 2026-02-03 10:30:00,
attendeeIds: [dgg163e1, gb71g28b],
location: Zoom,
timezone: Asia/Singapore
});
// 创建任务
const task = await createTask({
title: 审查文档,
description: Q2规划文档,
dueTime: 2026-02-05 18:00:00,
assigneeIds: [dgg163e1],
timezone: Asia/Singapore
});
Lark API参考
- - [日历事件API](https://open.larksuite.com/document/server-docs/calendar-v