gog
できること
このスキルは、gogコマンドを使ってGmail、Calendar、Drive、Sheetsなど、Google Workspaceのサービスを扱う手順を、AIエージェントに示します。仕事の多くをGoogleアカウントで行っている人のためのものです。
使う場面
- ✓エージェントに、Gmailのメールを検索または送信させたいとき。
- ✓Googleカレンダーの予定を確認したり、追加したりしたいとき。
- ✓Google Drive、Sheets、またはDocsのファイルを探して開きたいとき。
スキルのリンク
https://github.com/openclaw/openclaw/blob/main/skills/gog/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“明日のGoogleカレンダーには何がありますか? また、会計士からの未読メールはありますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、ホストですでに認可されているアカウントに対してgogコマンドを実行します。ツールが認証エラーを報告した場合にのみ、サインインを設定し直します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
gog
Use gog for Gmail/Calendar/Drive/Contacts/Sheets/Docs. Requires OAuth setup.
Prefer an already-authorized host account: run the requested gog command first. Enter setup only after an authentication error. Never ask for passwords, client secrets, or refresh tokens in chat.
Setup (once)
gog auth credentials /path/to/client_secret.jsongog auth add you@gmail.com --services gmail,calendar,drive,contacts,docs,sheetsgog auth list
Remote / headless Gateway hosts
When the Gateway host has no local browser display:
- Prefer a live callback listener on the Gateway host. From the machine with the browser, forward the exact callback port (
ssh -L <port>:127.0.0.1:<port> user@gateway-host), open the authorization URLgogprints, and let the redirect complete on that forwarded port. - When a live listener is unavailable, the operator picks one paste-mode path in a trusted shell on the Gateway host. Callback URLs must never enter chat or agent tool input:
--manual: the operator pastes the full redirect URL intogog's interactive prompt.--remote --step 1: printsauth_url(andstate_reused) then exits. After browser consent, the operator runs--remote --step 2 --auth-url <callback-url>in the trusted shell. A failedlocalhostpage load after consent is expected.
- Keep the same resolved config context across remote steps:
GOG_CONFIG_DIRtakes precedence over--home, which takes precedence overGOG_HOME. Also preserve--client, services/scopes, redirect URI, and consent options. Matching unexpired manual state may be reused (state_reused=true). - If desktop keyring is unavailable, configure the file backend (
gog auth keyring file) and setGOG_KEYRING_PASSWORDin the Gateway environment so non-interactive agent/--no-inputruns can read tokens.gog auth doctorreports when the password is missing. - Callback received is not the same as token stored. If token exchange or identity lookup fails behind a proxy, restart from step 1 after the operator approves scoped egress or proxy exceptions for the required Google endpoints. Do not bypass host network policy or reuse failed or expired state.
For diagnostics, inspect every entry reported by gog auth list --check; its exit status does not prove every stored token is valid. Likewise, inspect the status reported by gog auth doctor rather than relying only on its exit code.
Common commands
- Gmail search:
gog gmail search 'newer_than:7d' --max 10 - Gmail messages search (per email, ignores threading):
gog gmail messages search "in:inbox from:ryanair.com" --max 20 --account you@example.com - Gmail send (plain):
gog gmail send --to a@b.com --subject "Hi" --body "Hello" - Gmail send (multi-line):
gog gmail send --to a@b.com --subject "Hi" --body-file ./message.txt - Gmail send (stdin):
gog gmail send --to a@b.com --subject "Hi" --body-file - - Gmail send (HTML):
gog gmail send --to a@b.com --subject "Hi" --body-html "<p>Hello</p>" - Gmail draft:
gog gmail drafts create --to a@b.com --subject "Hi" --body-file ./message.txt - Gmail send draft:
gog gmail drafts send <draftId> - Gmail reply:
gog gmail send --to a@b.com --subject "Re: Hi" --body "Reply" --reply-to-message-id <msgId> - Calendar list events:
gog calendar events <calendarId> --from <iso> --to <iso> - Calendar create event:
gog calendar create <calendarId> --summary "Title" --from <iso> --to <iso> - Calendar create with color:
gog calendar create <calendarId> --summary "Title" --from <iso> --to <iso> --event-color 7 - Calendar update event:
gog calendar update <calendarId> <eventId> --summary "New Title" --event-color 4 - Calendar show colors:
gog calendar colors - Drive search:
gog drive search "query" --max 10 - Contacts:
gog contacts list --max 20 - Sheets get:
gog sheets get <sheetId> "Tab!A1:D10" --json - Sheets update:
gog sheets update <sheetId> "Tab!A1:B2" --values-json '[["A","B"],["1","2"]]' --input USER_ENTERED - Sheets append:
gog sheets append <sheetId> "Tab!A:C" --values-json '[["x","y","z"]]' --insert INSERT_ROWS - Sheets clear:
gog sheets clear <sheetId> "Tab!A2:Z" - Sheets metadata:
gog sheets metadata <sheetId> --json - Docs export:
gog docs export <docId> --format txt --out /tmp/doc.txt - Docs cat:
gog docs cat <docId>
Calendar Colors
- Use
gog calendar colorsto see all available event colors (IDs 1-11) - Add colors to events with
--event-color <id>flag - Event color IDs (from `gog
よくある質問
チャットでパスワードを共有する必要がありますか?
いいえ。このスキルは、パスワード、クライアントシークレット、リフレッシュトークンをチャットで求めることは決してありません。
コンピューターにブラウザがない場合はどうなりますか?
ポートの転送や貼り付けベースの方法など、リモートでのサインイン手順があり、コールバックのリンクをチャットに出さずに済みます。
どのGoogleサービスが対象ですか?
Gmail、Calendar、Drive、Contacts、Sheets、Docsが対象です。
詳細
作者による元の説明
Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.
repo: openclaw/openclaw
人気
- GitHubのスター
- 394k
- ランキング
- #58
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
discord-user-post
394kエージェントが、承認済みのお知らせをDiscordのデスクトップアプリからあなたとして投稿できるよう支援します。投稿前に正確なチャンネルを確認します。
discrawl
394k保存済みのローカルなDiscordメッセージのアーカイブを検索して要約し、その新しさを確認し、ダイレクトメッセージを読めるようエージェントを支援します。
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
graincrawl
394k保存されたGranolaのミーティングメモとトランスクリプトを検索し、その新しさを確認して、一定期間の件数を数えるようエージェントを支援します。