google-calendar

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Calendar Skill

Google Calendar Skill

Overview

概述

Claude can manage your Google Calendar to create events, schedule meetings, set reminders, check availability, and organize your time. This includes working with multiple calendars, sending invites, and managing recurring events.
Claude可以帮您管理Google Calendar,包括创建日程、安排会议、设置提醒、查看空闲时间以及规划您的时间。这涵盖了多日历管理、发送邀请和处理重复日程等功能。

Quick Install

快速安装

bash
curl -sSL https://canifi.com/skills/google-calendar/install.sh | bash
Or manually:
bash
cp -r skills/google-calendar ~/.canifi/skills/
bash
curl -sSL https://canifi.com/skills/google-calendar/install.sh | bash
或者手动安装:
bash
cp -r skills/google-calendar ~/.canifi/skills/

Setup

配置

Configure via canifi-env:
bash
undefined
通过canifi-env进行配置:
bash
undefined

First, ensure canifi-env is installed:

首先,确保已安装canifi-env:

canifi-env set GOOGLE_EMAIL "your-email@gmail.com"
undefined
canifi-env set GOOGLE_EMAIL "your-email@gmail.com"
undefined

Privacy & Authentication

隐私与认证

Your credentials, your choice. Canifi LifeOS respects your privacy.
您的凭证,由您掌控。 Canifi LifeOS尊重您的隐私。

Option 1: Manual Browser Login (Recommended)

选项1:手动浏览器登录(推荐)

If you prefer not to share credentials with Claude Code:
  1. Complete the Browser Automation Setup using CDP mode
  2. Login to the service manually in the Playwright-controlled Chrome window
  3. Claude will use your authenticated session without ever seeing your password
如果您不想与Claude Code共享凭证:
  1. 使用CDP模式完成浏览器自动化设置
  2. 在Playwright控制的Chrome窗口中手动登录该服务
  3. Claude将使用您已认证的会话,全程不会获取您的密码

Option 2: Environment Variables

选项2:环境变量

If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果您愿意共享凭证,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
注意:存储在canifi-env中的凭证仅能在您的本地机器上访问,绝不会被传输至其他地方。

Capabilities

功能特性

  • Create and edit calendar events
  • Schedule meetings with attendees
  • Check availability and find free time slots
  • Set reminders and notifications
  • Create recurring events
  • Manage multiple calendars
  • Accept or decline meeting invitations
  • View daily, weekly, or monthly schedules
  • Create and manage event RSVPs
  • Set event locations and video conferencing
  • Add event descriptions and attachments
  • Color-code events by category
  • 创建和编辑日历事件
  • 安排包含参会者的会议
  • 查看空闲时间并寻找合适时段
  • 设置提醒和通知
  • 创建重复日程
  • 管理多个日历
  • 接受或拒绝会议邀请
  • 查看日、周、月视图日程
  • 创建和管理日程RSVP
  • 设置日程地点和视频会议链接
  • 添加日程描述和附件
  • 按类别为日程添加颜色标记

Usage Examples

使用示例

Example 1: Create Event

示例1:创建日程

User: "Schedule a team meeting tomorrow at 2pm for 1 hour"
Claude: Creates event titled "Team Meeting" for tomorrow 2-3pm,
        adds to primary calendar. Returns: "Created: Team Meeting tomorrow 2-3pm"
用户:“明天下午2点安排一场1小时的团队会议”
Claude:创建标题为“团队会议”的日程,时间为明天下午2-3点,
        添加至主日历。返回:“已创建:明天2-3点的团队会议”

Example 2: Check Schedule

示例2:查看日程

User: "What do I have scheduled this week?"
Claude: Opens week view, reads all events. Reports:
        "This week: Monday - Team standup 9am, Client call 2pm..."
用户:“我这周有什么日程安排?”
Claude:打开周视图,读取所有日程。回复:
        “本周安排:周一 - 9点团队站立会,2点客户会议...”

Example 3: Find Free Time

示例3:寻找空闲时间

User: "When am I free for a 2-hour meeting this week?"
Claude: Analyzes week's schedule, identifies gaps of 2+ hours.
        Reports: "Available slots: Tuesday 10am-12pm, Wednesday 1-4pm..."
用户:“我这周什么时候有2小时的空闲时间可以开会?”
Claude:分析本周日程,找出2小时以上的空档。
        回复:“可用时段:周二10am-12pm,周三1pm-4pm...”

Example 4: Create Recurring Event

示例4:创建重复日程

User: "Set up a weekly 1-on-1 with Sarah every Monday at 10am"
Claude: Creates recurring event "1-on-1 with Sarah" every Monday 10am,
        adds Sarah as attendee, sends invite. Confirms: "Recurring meeting created"
用户:“每周一上午10点安排与Sarah的一对一会议”
Claude:创建重复日程“与Sarah的一对一会议”,每周一上午10点,
        添加Sarah为参会者并发送邀请。确认:“已创建重复会议”

Authentication Flow

认证流程

  1. Claude navigates to calendar.google.com via Playwright MCP
  2. Authenticates with GOOGLE_EMAIL if needed
  3. Handles 2FA if prompted (notifies user via iMessage)
  4. Maintains session for subsequent calendar operations
  1. Claude通过Playwright MCP导航至calendar.google.com
  2. 如有需要,使用GOOGLE_EMAIL进行认证
  3. 若出现2FA验证,通过iMessage通知用户
  4. 维持会话以便后续日历操作

Selectors Reference

选择器参考

javascript
// Create button
'[aria-label="Create"]'

// Event quick add
'[aria-label="Quick add"]'

// Date navigation
'[aria-label="Go to today"]'
'[aria-label="Next"]'
'[aria-label="Previous"]'

// View switchers
'[aria-label="Day"]'
'[aria-label="Week"]'
'[aria-label="Month"]'

// Event dialog
'[data-eventid]'

// Event title input
'[aria-label="Add title"]'

// Date/time inputs
'[aria-label="Start date"]'
'[aria-label="End date"]'
'[aria-label="Start time"]'
'[aria-label="End time"]'

// Add guests
'[aria-label="Add guests"]'

// Add location
'[aria-label="Add location"]'

// Save button
'[aria-label="Save"]'

// Calendar list
'.calendar-list'
javascript
// 创建按钮
'[aria-label="Create"]'

// 快速添加日程
'[aria-label="Quick add"]'

// 日期导航
'[aria-label="Go to today"]'
'[aria-label="Next"]'
'[aria-label="Previous"]'

// 视图切换器
'[aria-label="Day"]'
'[aria-label="Week"]'
'[aria-label="Month"]'

// 日程对话框
'[data-eventid]'

// 日程标题输入框
'[aria-label="Add title"]'

// 日期/时间输入框
'[aria-label="Start date"]'
'[aria-label="End date"]'
'[aria-label="Start time"]'
'[aria-label="End time"]'

// 添加参会者
'[aria-label="Add guests"]'

// 添加地点
'[aria-label="Add location"]'

// 保存按钮
'[aria-label="Save"]'

// 日历列表
'.calendar-list'

Error Handling

错误处理

  • Login Failed: Retry 3 times, notify user via iMessage
  • Session Expired: Re-authenticate automatically
  • Event Creation Failed: Retry, check for conflicts, notify user
  • Invite Send Failed: Retry sending, verify email addresses
  • Calendar Not Found: List available calendars, ask user to specify
  • Time Conflict: Warn user of overlap, ask to proceed or reschedule
  • 登录失败:重试3次,通过iMessage通知用户
  • 会话过期:自动重新认证
  • 日程创建失败:重试,检查冲突,通知用户
  • 邀请发送失败:重试发送,验证邮箱地址
  • 未找到日历:列出可用日历,请求用户指定
  • 时间冲突:提醒用户存在重叠,询问是否继续或重新安排

Self-Improvement Instructions

自我优化说明

When you learn a better way to accomplish a task with Google Calendar:
  1. Document the improvement in your response
  2. Suggest updating this skill file with the new approach
  3. Include specific navigation patterns that work better
  4. Note timezone handling improvements
当您发现使用Google Calendar完成任务的更佳方式时:
  1. 在回复中记录该优化点
  2. 建议使用新方法更新此技能文件
  3. 包含更有效的具体导航模式
  4. 记录时区处理的改进点

Notes

注意事项

  • All times are interpreted in user's local timezone unless specified
  • Google Meet links can be auto-added to events
  • Recurring events: daily, weekly, monthly, yearly, custom
  • Event reminders: email or popup, up to 4 weeks before
  • Guest permissions: modify event, invite others, see guest list
  • Calendar colors can be customized per calendar
  • Free/busy visibility can be set per event
  • Keyboard shortcut: C to create new event
  • 所有时间默认采用用户本地时区,除非特别指定
  • Google Meet链接可自动添加至日程
  • 重复日程:支持每日、每周、每月、每年及自定义重复规则
  • 日程提醒:支持邮件或弹窗提醒,最长可提前4周设置
  • 参会者权限:可修改日程、邀请他人、查看参会者列表
  • 日历颜色可按日历自定义
  • 日程的忙/闲状态可单独设置
  • 快捷键:按C键创建新日程