google-calendar について
google-calendar は、独立した OAuth 認証で Google Calendar を操作する軽量なスキルです。Google Workspace ユーザー向けで、MCP サーバーなしで予定の管理や空き時間の検索ができます。
主な機能
- 01独立した OAuth ログインとトークン管理
- 02カレンダーと予定の詳細表示
- 03予定の作成・更新・削除
- 04参加者の空き時間検索
- 05予定への出欠回答
活用シーン
- 01指定期間内の予定を確認
- 02共通の空き時間に合わせた会議設定
- 03予定の更新や招待への回答
MCP 対応
独立した OAuth 認証とコマンドラインスクリプトで Google Calendar を操作し、MCP サーバーは不要です。
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ sanjay3290/ ai-skills --skill google-calendarインストール後、Claude Code で/google-calendarを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
README.mdrequirements.txtscripts/auth.pygcal.pyrequirements.txt詳細
Google Calendar
スタンドアロンの OAuth 認証を使用する軽量な Google Calendar 連携です。MCP サーバーは必要ありません。
⚠️ Google Workspace アカウントが必要です。 個人用の Gmail アカウントはサポートされていません。
初回セットアップ
Google で認証します(ブラウザーが開きます):
python scripts/auth.py login
認証状態を確認します:
python scripts/auth.py status
必要に応じてログアウトします:
python scripts/auth.py logout
コマンド
すべての操作は scripts/gcal.py から実行します。ログインしていない場合は、初回使用時に自動で認証されます。
カレンダーの一覧表示
python scripts/gcal.py list-calendars
イベントの一覧表示
# List events from primary calendar (default: next 30 days)
python scripts/gcal.py list-events
# List events with specific time range
python scripts/gcal.py list-events --time-min 2024-01-15T00:00:00Z --time-max 2024-01-31T23:59:59Z
# List events from a specific calendar
python scripts/gcal.py list-events --calendar "[email protected]"
# Limit results
python scripts/gcal.py list-events --max-results 10
イベントの詳細を取得
python scripts/gcal.py get-event EVENT_ID
python scripts/gcal.py get-event EVENT_ID --calendar "[email protected]"
イベントの作成
# Basic event
python scripts/gcal.py create-event "Team Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z"
# Event with description and location
python scripts/gcal.py create-event "Team Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z" \
--description "Weekly sync" --location "Conference Room A"
# Event with attendees
python scripts/gcal.py create-event "Team Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z" \
--attendees [email protected] [email protected]
# Event on specific calendar
python scripts/gcal.py create-event "Meeting" "2024-01-15T10:00:00Z" "2024-01-15T11:00:00Z" \
--calendar "[email protected]"
イベントの更新
# Update event title
python scripts/gcal.py update-event EVENT_ID --summary "New Title"
# Update event time
python scripts/gcal.py update-event EVENT_ID --start "2024-01-15T14:00:00Z" --end "2024-01-15T15:00:00Z"
# Update multiple fields
python scripts/gcal.py update-event EVENT_ID \
--summary "Updated Meeting" --description "New agenda" --location "Room B"
# Update attendees
python scripts/gcal.py update-event EVENT_ID --attendees [email protected] [email protected]
イベントの削除
python scripts/gcal.py delete-event EVENT_ID
python scripts/gcal.py delete-event EVENT_ID --calendar "[email protected]"
空き時間を検索
指定した参加者との会議に利用できる、最初の時間枠を検索します:
# Find 30-minute slot for yourself
python scripts/gcal.py find-free-time \
--attendees me \
--time-min "2024-01-15T09:00:00Z" \
--time-max "2024-01-15T17:00:00Z" \
--duration 30
# Find 60-minute slot with multiple attendees
python scripts/gcal.py find-free-time \
--attendees me [email protected] [email protected] \
--time-min "2024-01-15T09:00:00Z" \
--time-max "2024-01-19T17:00:00Z" \
--duration 60
イベントへの招待に返信
# Accept an invitation
python scripts/gcal.py respond-to-event EVENT_ID accepted
# Decline an invitation
python scripts/gcal.py respond-to-event EVENT_ID declined
# Mark as tentative
python scripts/gcal.py respond-to-event EVENT_ID tentative
# Respond without notifying organizer
python scripts/gcal.py respond-to-event EVENT_ID accepted --no-notify
日付/時刻の形式
すべての時刻には、タイムゾーン付きの ISO 8601 形式を使用します:
- UTC:
2024-01-15T10:30:00Z - オフセット付き:
2024-01-15T10:30:00-05:00(EST)
カレンダー ID の形式
- メインのカレンダー:
primaryを使用するか、--calendarフラグを省略します - その他のカレンダー:
list-calendarsからカレンダー ID を指定します(通常はメールアドレスです)
トークン管理
トークンはシステムのキーリングを使用して安全に保存されます:
- macOS:Keychain
- Windows:Windows Credential Locker
- Linux:Secret Service API(GNOME Keyring、KDE Wallet など)
サービス名:google-calendar-skill-oauth
期限切れのトークンは、Google のクラウド関数を使用して自動的に更新されます。
コメント
Markdown 対応