
Feishu Calendar
Wire your coding agent to Feishu (Lark) Calendar so it can create, search, update, and delete events without leaving the terminal.
Overview
Feishu-calendar is an agent skill for the Build phase that creates, queries, updates, deletes, and searches Feishu (Lark) calendar events via Calendar v4 API calls.
Install
npx skills add https://github.com/alextangson/feishu_skills --skill feishu-calendarWhat is this skill?
- Covers six Calendar v4 flows: create, get, update, delete, search, and list events on a calendar_id
- Documents POST/PATCH bodies with Unix timestamp start_time and end_time plus optional user/chat/resource attendees
- Reuses feishu_skills get_feishu_token.sh with .feishu_token_cache.json and 5-minute early refresh before expiry
- Retries the failing request once after ./scripts/get_feishu_token.sh --force-refresh on 401 or invalid token
- Requires Feishu scope calendar:calendar via FEISHU_APP_ID and FEISHU_APP_SECRET
- Documents 6 Calendar v4 operations: create, get, update, delete, search, and list events
- Token cache refreshes by default 5 minutes before expiry
- Single --force-refresh retry on invalid or expired token responses
Adoption & trust: 1.2k installs on skills.sh; 62 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want your agent to book or adjust Feishu meetings programmatically but do not have a concise, token-aware recipe for Calendar v4 endpoints and retry behavior.
Who is it for?
Solo builders who already use Feishu/Lark and need agent-driven scheduling against a known calendar_id during integration or launch prep.
Skip if: Teams without a Feishu app, calendar:calendar permission, or FEISHU_APP_ID and FEISHU_APP_SECRET configured locally.
When should I use this skill?
Your agent must create, query, update, delete, or search Feishu calendar events and you have FEISHU_APP_ID, FEISHU_APP_SECRET, and calendar:calendar access.
What do I get? / Deliverables
Your agent issues documented Calendar v4 requests with cached OAuth tokens and returns created or updated event records from your Feishu tenant.
- Created or updated calendar event payloads from POST or PATCH to /calendars/{calendar_id}/events
- Search or list results from events/search or GET events
- Confirmed delete via DELETE on a specific event_id
Recommended Skills
Journey fit
This skill is a third-party Calendar v4 API connector for agents, which Prism shelves under Build → integrations alongside other external-service hooks. Integrations is the canonical home for OAuth/token-backed Open API skills that extend what the agent can call during product work.
How it compares
Use this skill package for procedural Calendar API steps, not a hosted MCP calendar server with built-in OAuth UI.
Common Questions / FAQ
Who is feishu-calendar for?
It is for solo and indie builders who ship with AI coding agents and already standardize on Feishu/Lark for team scheduling.
When should I use feishu-calendar?
Use it in Build → integrations while wiring agent workflows, and again in Operate when you need to search or patch live events before releases or on-call windows.
Is feishu-calendar safe to install?
It requires app secrets and calendar API access; review the Security Audits panel on this Prism page and restrict credentials to least-privilege Feishu apps before enabling it in agents.
SKILL.md
READMESKILL.md - Feishu Calendar
# 飞书日历 通过 Calendar API 管理日程。 **Base URL**: `https://open.feishu.cn/open-apis/calendar/v4` ## 认证与 Token 获取 从 `feishu_skills` 根目录执行共享脚本: ```bash TOKEN="$(./scripts/get_feishu_token.sh)" ``` 请求头统一使用 `Authorization: Bearer ${TOKEN}`。 如果业务接口返回 token 无效、过期或 401,强制刷新后仅重试一次原请求: ```bash TOKEN="$(./scripts/get_feishu_token.sh --force-refresh)" ``` **环境变量**: - `FEISHU_APP_ID` - `FEISHU_APP_SECRET` **本地缓存**: `./.feishu_token_cache.json`(未过期直接复用,默认提前 5 分钟刷新) --- ## 日程操作 | API | 端点 | 方法 | 请求体示例 | 说明 | |-----|------|------|-----------|------| | 创建日程 | `/calendars/{calendar_id}/events` | POST | `{"summary":"会议标题","start_time":{"timestamp":"1770508800"},"end_time":{"timestamp":"1770512400"}}` | 创建新日程 | | 获取日程 | `/calendars/{calendar_id}/events/{event_id}` | GET | - | 查询日程详情 | | 更新日程 | `/calendars/{calendar_id}/events/{event_id}` | PATCH | `{"summary":"新标题"}` | 修改日程 | | 删除日程 | `/calendars/{calendar_id}/events/{event_id}` | DELETE | - | 删除日程 | | 搜索日程 | `/calendars/{calendar_id}/events/search` | POST | `{"query":"关键词","start_time":{"timestamp":"1770508800"}}` | 条件搜索 | | 获取日程列表 | `/calendars/{calendar_id}/events` | GET | - | 查询日历下所有日程 | **创建日程**: ```json { "summary": "会议标题", "start_time": {"timestamp": "1770508800"}, "end_time": {"timestamp": "1770512400"}, "attendees": [{"type": "user", "attendee_id": "ou_xxx"}] } ``` **attendees type**: `user` / `chat` / `resource`(会议室) --- ## 日程参与人 | API | 端点 | 方法 | 请求体示例 | 说明 | |-----|------|------|-----------|------| | 获取参与人 | `/calendars/{calendar_id}/events/{event_id}/attendees` | GET | - | 查询参与人列表 | | 添加参与人 | `/calendars/{calendar_id}/events/{event_id}/attendees` | POST | `{"attendees":[{"type":"user","attendee_id":"ou_xxx"}]}` | 邀请参与人 | | 删除参与人 | `/calendars/{calendar_id}/events/{event_id}/attendees/{attendee_id}` | DELETE | - | 移除参与人 | | 获取参与群成员 | `/calendars/{calendar_id}/events/{event_id}/attendees/chat_members` | GET | - | 查询群参与成员 | --- ## 日历管理 | API | 端点 | 方法 | 请求体示例 | 说明 | |-----|------|------|-----------|------| | 获取日历列表 | `/calendars` | GET | 查询参数:`page_size=50&page_token=xxx` | 查询所有日历(分页) | | 获取主日历 | `/calendars/primary` | GET | - | 查询用户主日历 | | 创建日历 | `/calendars` | POST | `{"summary":"日历名称","description":"描述","permissions":"public"}` | 创建共享日历 | | 获取日历 | `/calendars/{calendar_id}` | GET | - | 查询日历详情 | | 更新日历 | `/calendars/{calendar_id}` | PATCH | `{"summary":"新名称"}` | 修改日历 | | 删除日历 | `/calendars/{calendar_id}` | DELETE | - | 删除日历 | | 搜索日历 | `/calendars/search` | POST | `{"query":"关键词"}` | 搜索日历 | --- ## 日历订阅与 ACL | API | 端点 | 方法 | 请求体示例 | 说明 | |-----|------|------|-----------|------| | 获取 ACL 列表 | `/calendars/{calendar_id}/acls` | GET | - | 查询日历权限 | | 创建 ACL | `/calendars/{calendar_id}/acls` | POST | `{"role":"reader","scope":{"type":"user","user_id":"ou_xxx"}}` | 添加权限 | | 删除 ACL | `/calendars/{calendar_id}/acls/{acl_id}` | DELETE | - | 移除权限 | | 订阅日历 | `/calendars/{calendar_id}/subscribe` | POST | - | 订阅日历变更 | | 取消订阅 | `/calendars/{calendar_id}/unsubscribe` | POST | - | 取消日历订阅 | | 订阅日程事件 | `/calendars/{calendar_id}/events/subscribe` | POST | - | 订阅日程变更 | | 取消日程订阅 | `/calendars/{calendar_id}/events/unsubscribe` | POST | - | 取消日程订阅 | **ACL role**: `none` / `free_busy_reader` / `reader` / `writer` / `owner` --- ## 会议室管理 | API | 端点 | 方法 | 请求体示例 | 说明 | |-----|------|------|-----------|------| | 获取会议室列表 | `/rooms` | GET | - | 查询所有会议室 | | 获取会议室 | `/rooms/{room_id}` | GET | - | 查询会议室详情 | | 查询会议室忙闲 | `/rooms/{room_id}/freebusy` | GET | - | 查询会议室可用时间 | ### 创建日程并占用会议室 占用会议室的关键:在 `attendees` 中添加 `type: "resource"` 的参与人,`attendee_id` 填会议室的 `room_id`。 **完整流程**: ```bash # 1. 获取会议室列表,拿到 room_id curl -X GET "https://open.feishu.cn/open-apis/calendar/v4/rooms?page_size=50" \ -H "Authorization: Bearer YOUR_TOKEN" # 2. (可选)查询会议室在目标时间段是否空闲 curl -X GET "https://open.feishu.cn/open-apis/calendar/v4/rooms/{room_id}/freebusy?start_time=1770508800&end_time=1770512400" \ -