calendar-integration
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "calendar-integration":https://skillpi.com/zh/skills/deepskill-9e0f7032e4712b5cf82ad42b50345e72b4d4fed652b2adee2f7fb1c4195c8a46。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
集成 Google Calendar 和 Microsoft Outlook Calendar 用于日程安排、事件管理与空闲状态查询,涵盖 Google Calendar API v3、Microsoft Graph Calendar API、事件的增删改查、空闲/忙碌查询、重复事件处理及构建日程安排功能。
介绍来源: third_party · TerminalSkills · 1.0.0 参考来源
SkillPi 解读
- 实测状态
- 未测试
文件浏览
Frontmatter
name: calendar-integration
description: >-
Integrate with Google Calendar and Microsoft Outlook Calendar for scheduling,
event management, and availability tracking. Use when someone asks to "create
calendar events", "check availability", "schedule meetings", "sync calendars",
"Google Calendar API", "Outlook Calendar API", "booking system", "find free
slots", or "manage recurring events". Covers Google Calendar API v3, Microsoft
Graph Calendar API, event CRUD, availability/free-busy queries, recurring
events, and building scheduling features.
license: Apache-2.0
compatibility: 'Google Calendar API v3, Microsoft Graph API v1.0. Node.js/Python examples.'
metadata:
author: terminal-skills
version: 1.0.0
category: development
tags:
- calendar
- google-calendar
- outlook
- microsoft-graph
- schedulingCalendar Integration
Overview
This skill helps AI agents integrate with Google Calendar and Microsoft Outlook Calendar. It covers authentication, event CRUD, recurring events, availability/free-busy queries, webhook notifications, and building scheduling features like booking pages and meeting coordinators.
Instructions
Google Calendar API v3
Authentication
import { google } from 'googleapis';
// OAuth 2.0 (user context)
const oauth2Client = new google.auth.OAuth2(
process.env.GOOGLE_CLIENT_ID,
process.env.GOOGLE_CLIENT_SECRET,
process.env.GOOGLE_REDIRECT_URI
);
const authUrl = oauth2Client.generateAuthUrl({
access_type: 'offline',
scope: ['https://www.googleapis.com/auth/calendar'],
});
const { tokens } = await oauth2Client.getToken(authorizationCode);
oauth2Client.setCredentials(tokens);
const calendar = google.calendar({ version: 'v3', auth: oauth2Client });
// Service Account (server-to-server, domain-wide delegation)
const auth = new google.auth.GoogleAuth({
keyFile: '/path/to/service-account-key.json',
scopes: ['https://www.googleapis.com/auth/calendar'],
clientOptions: { subject: 'user@company.com' },
});
Create Events
// Timed event with attendees and Meet link
const event = await calendar.events.insert({
calendarId: 'primary',
requestBody: {
summary: 'Sprint Planning',
description: 'Plan sprint 14 tasks and capacity.',
start: { dateTime: '2026-03-01T14:00:00', timeZone: 'America/New_York' },
end: { dateTime: '2026-03-01T15:00:00', timeZone: 'America/New_York' },
attendees: [{ email: 'sarah@company.com' }, { email: 'mike@company.com' }],
conferenceData: {
createRequest: { requestId: 'req-' + Date.now(), conferenceSolutionKey: { type: 'hangoutsMeet' } },
},
},
conferenceDataVersion: 1,
sendUpdates: 'all',
});
// Recurring event
await calendar.events.insert({
calendarId: 'primary',
requestBody: {
summary: 'Daily Standup',
start: { dateTime: '2026-03-01T09:30:00', timeZone: 'America/New_York' },
end: { dateTime: '2026-03-01T09:45:00', timeZone: 'America/New_York' },
recurrence: ['RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;UNTIL=20260630T000000Z'],
},
});
RRULE Reference
Daily: RRULE:FREQ=DAILY;COUNT=30
Weekly: RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR
Biweekly: RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=TU
Monthly (date): RRULE:FREQ=MONTHLY;BYMONTHDAY=1
Monthly (day): RRULE:FREQ=MONTHLY;BYDAY=2TU
With end date: RRULE:FREQ=WEEKLY;BYDAY=MO;UNTIL=20261231T000000Z
Query, Update, Delete
// List upcoming events (next 7 days)
const { data } = await calendar.events.list({
calendarId: 'primary',
timeMin: new Date().toISOString(),
timeMax: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).toISOString(),
singleEvents: true, orderBy: 'startTime', maxResults: 50,
});
// Update event
await calendar.events.patch({
calendarId: 'primary', eventId,
requestBody: { summary: 'Sprint Planning (MOVED)', start: { dateTime: '2026-03-02T14:00:00', timeZone: 'America/New_York' }, end: { dateTime: '2026-03-02T15:00:00', timeZone: 'America/New_York' } },
sendUpdates: 'all',
});
// Delete event
await calendar.events.delete({ calendarId: 'primary', eventId, sendUpdates: 'all' });
Free/Busy Query
const { data } = await calendar.freebusy.query({
requestBody: {
timeMin: '2026-03-01T09:00:00-05:00',
timeMax: '2026-03-01T18:00:00-05:00',
timeZone: 'America/New_York',
items: [{ id: 'sarah@company.com' }, { id: 'mike@company.com' }],
},
});
// data.calendars['sarah@company.com'].busy → array of { start, end } blocks
Microsoft Outlook Calendar (Graph API)
Authentication
import { ClientSecretCredential } from '@azure/identity';
import { Client } from '@microsoft/microsoft-graph-client';
import { TokenCredentialAuthenticationProvider } from '@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials';
const credential = new ClientSecretCredential(
process.env.AZURE_TENANT_ID, process.env.AZURE_CLIENT_ID, process.env.AZURE_CLIENT_SECRET
);
const authProvider = new TokenCredentialAuthenticationProvider(credential, {
scopes: ['https://graph.microsoft.com/.default'],
});
const graphClient = Client.initWithMiddleware({ authProvider });
Create Events & Query
// Create event with Teams meeting
const event = await graphClient.api(`/users/${userId}/events`).post({
subject: 'Sprint Planning',
start: { dateTime: '2026-03-01T14:00:00', timeZone: 'America/New_York' },
end: { dateTime: '2026-03-01T15:00:00', timeZone: 'America/New_York' },
attendees: [
{ emailAddress: { address: 'sarah@company.com' }, type: 'required' },
],
isOnlineMeeting: true,
onlineMeetingProvider: 'teamsForBusiness',
});
// List events in date range
const events = await graphClient.api(`/users/${userId}/calendarView`)
.query({ startDateTime: '2026-03-01T00:00:00Z', endDateTime: '2026-03-07T23:59:59Z' })
.select('subject,start,end,location,isOnlineMeeting')
.orderby('start/dateTime').top(50).get();
// Find meeting times (smart scheduling)
const suggestions = await graphClient.api(`/users/${userId}/findMeetingTimes`).post({
attendees: [
{ emailAddress: { address: 'sarah@company.com' }, type: 'required' },
],
timeConstraint: { timeslots: [{
start: { dateTime: '2026-03-01T09:00:00', timeZone: 'America/New_York' },
end: { dateTime: '2026-03-05T18:00:00', timeZone: 'America/New_York' },
}] },
meetingDuration: 'PT1H',
maxCandidates: 5,
});
API Comparison
| Feature | Google Calendar | Outlook (Graph) |
|---|---|---|
| Auth | Google OAuth 2.0 | Azure AD OAuth 2.0 |
| Video meeting | Google Meet | Teams (isOnlineMeeting) |
| Free/busy | freebusy.query | getSchedule / findMeetingTimes |
| Webhooks | Push notifications (7 day max) | Subscriptions (3 day max) |
| Recurring | RRULE strings | Structured recurrence object |
| Smart scheduling | Not built-in | findMeetingTimes (ranked) |
Examples
Example 1: Schedule a team meeting across calendars
User prompt: "Find a 1-hour slot next week when Sarah, Mike, and Conference Room B are all free, then create a Sprint Planning meeting with a Google Meet link."
The agent will:
- Call
calendar.freebusy.querywith all three calendar IDs for next week's business hours - Parse the busy blocks to find common free 1-hour windows
- Present the available slots to the user
- Create the event with
calendar.events.insertincluding attendees, Meet link (conferenceDataVersion: 1), and send notifications to all attendees
Example 2: Set up a recurring standup with Outlook
User prompt: "Create a daily standup meeting at 9:30 AM ET on weekdays in Microsoft Teams for our engineering team, running through June 2026."
The agent will:
- Authenticate with Microsoft Graph API using the configured Azure AD credentials
- Call
graphClient.api('/users/{userId}/events').post()withisOnlineMeeting: true,onlineMeetingProvider: 'teamsForBusiness', and a weekly recurrence pattern for Monday-Friday - Set the recurrence range with
startDate: '2026-03-01'andendDate: '2026-06-30' - Add all engineering team members as required attendees and return the Teams join URL
Guidelines
- Always specify
timeZone— never rely on server timezone for calendar operations - Use
singleEvents: true(Google) orcalendarView(Outlook) to expand recurring events - Free/busy before creating — check availability, don't just double-book
- Webhook renewal — both Google (7d max) and Outlook (3d max) require renewal jobs
- Use sync tokens (Google) / delta queries (Outlook) for efficient polling
- Buffer time between events — back-to-back meetings are a UX problem
- ISO 8601 for all date handling — never parse dates as strings manually
- Send meeting updates to attendees (
sendUpdates: 'all') — silent changes cause confusion - Rate limits: Google ~10 QPS per user, Graph ~10,000 per 10 min per app per tenant
当前收录版本
1.0.0
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供完整的Google Calendar和Microsoft Outlook集成方案
- 覆盖事件CRUD、空闲查询、重复事件等核心功能
- 包含实际业务场景示例和最佳实践指南
亮点
- 触发词覆盖全面,包含多种常见场景变体
- 边界清晰,准确描述适用场景
亮点
- 结构清晰,分模块组织内容
- 包含完整的API示例和代码片段
- 提供实际使用案例和最佳实践
亮点
- 提供完整的认证和错误处理示例
- 包含API限制和最佳实践说明
- 代码示例完整且可直接使用
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 39, 144, 147, 191, 213 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- graph.microsoft.com
- www.googleapis.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。