karaage0703/xs-google-workspace
gogcli経由でGmail・Google Drive・Google Calendarを操作するスキル。複数Googleアカウント対応。「メールチェック」「メール確認して」「Driveにアップロード」「Driveのファイル」「Gmailで検索」で使用。
npx skills add https://github.com/karaage0703/ai-assistant-workspace --skill xs-google-workspace
gogcli CLIで Gmail / Google Drive / Google Calendar を操作する。複数アカウント対応。
export PATH="$HOME/bin:$PATH"
export GOG_KEYRING_PASSWORD=<your-password>
全コマンドの先頭にこの2行が必要。パスワードは環境に合わせて設定。
gog auth list
全アカウントの未読メールを確認し、重要なものをピックアップして報告。
gog -a <email> gmail search "is:unread" --max 10
gog -a <email> gmail search "<Gmailの検索クエリ>" --max 20
検索クエリ例:
is:unread — 未読from:[email protected] — 特定の送信者subject:会議 — 件名に「会議」newer_than:7d — 7日以内has:attachment — 添付ありgog -a <email> gmail read <messageId>
gog -a <email> gmail send --to "[email protected]" --subject "件名" --body "本文"
gog -a <email> gmail archive <messageId> # アーカイブ
gog -a <email> gmail mark-read <messageId> # 既読にする
gog -a <email> gmail labels list # ラベル一覧
gog -a <email> drive list # ルート一覧
gog -a <email> drive list --query "name contains 'xxx'" # 検索
gog -a <email> drive list --folder <folderId> # フォルダ内
gog -a <email> drive download <fileId> -o /path/to/output
gog -a <email> drive upload /path/to/file --folder <folderId>
gog -a <email> calendar list # 今日の予定(primaryのみ)
gog -a <email> calendar list --days 7 # 1週間の予定
gog -a <email> calendar list --all --days 7 # 全カレンダー(ファミリー含む)
注意: デフォルトはprimaryカレンダーのみ。ファミリーカレンダー等を含めるには --all を付ける。
新しいアカウントを追加する場合:
# ヘッドレス環境: remoteフローで認証
GOG_KEYRING_PASSWORD=<password> gog auth add <email> --services gmail,drive,calendar --remote --step 1
# → URLをユーザーに送る → ブラウザで認証 → リダイレクトURLを受け取る
GOG_KEYRING_PASSWORD=<password> gog auth add <email> --services gmail,drive,calendar --remote --step 2 --auth-url "<リダイレクトURL>"
# ブラウザがある環境: 直接認証
GOG_KEYRING_PASSWORD=<password> gog auth add <email> --services gmail,drive,calendar
※Google Cloud Consoleのテストユーザーに追加が必要。
gmail read で本文取得メールチェックして
未読メール見せて
Zennからのメール探して
Driveのファイル一覧
今週の予定確認
Take karaage0703/xs-google-workspace from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.