gog
Skill này làm gì
Skill hướng dẫn một agent AI dùng lệnh gog để làm việc với các dịch vụ Google Workspace như Gmail, Calendar, Drive và Sheets. Dành cho người làm phần lớn công việc qua tài khoản Google.
Khi nào nên dùng
- ✓Khi bạn muốn agent tra cứu hoặc gửi email trong tài khoản Gmail của bạn.
- ✓Khi bạn cần kiểm tra hoặc thêm một sự kiện trên Google Calendar.
- ✓Khi bạn muốn tìm hoặc mở một tệp trong Google Drive, Sheets hoặc Docs.
Liên kết skill
https://github.com/openclaw/openclaw/blob/main/skills/gog/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Ngày mai trên Google Calendar của tôi có gì, và tôi có email chưa đọc nào từ kế toán không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill chạy lệnh gog với một tài khoản đã được cấp quyền trên máy chủ. Nó chỉ thiết lập đăng nhập lại khi công cụ báo lỗi xác thực.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Tôi có phải chia sẻ mật khẩu trong cuộc trò chuyện không?
Không. Skill không bao giờ hỏi mật khẩu, client secret hoặc refresh token trong cuộc trò chuyện.
Nếu máy tính không có trình duyệt thì sao?
Skill có các bước đăng nhập từ xa, như chuyển tiếp cổng hoặc phương thức dán, để các liên kết callback không xuất hiện trong cuộc trò chuyện.
Những dịch vụ Google nào được hỗ trợ?
Nó hỗ trợ Gmail, Calendar, Drive, Contacts, Sheets và Docs.
Chi tiết
Mô tả gốc của tác giả
Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.
repo: openclaw/openclaw
Độ phổ biến
- Sao GitHub
- 394k
- Vị trí xếp hạng
- #58
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
discord-user-post
394kCho phép agent của bạn đăng tin nhắn đã duyệt lên Discord dưới tên bạn qua app Discord trên máy tính, sau khi xác nhận đúng kênh.
discrawl
394kCho phép agent của bạn tìm kiếm và tóm tắt kho lưu trữ tin nhắn Discord trên máy, kiểm tra độ mới của dữ liệu và đọc tin nhắn trực tiếp.
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
graincrawl
394kCho phép agent của bạn tìm trong ghi chú cuộc họp và bản chép lời Granola đã lưu, kiểm tra độ mới và đếm số cuộc họp trong một khoảng thời gian.
Skill tương tự
to-questionnaire
310kBiến một câu hỏi bạn không tự trả lời được thành bảng câu hỏi bằng văn bản để người khác điền, qua email hoặc trong cuộc họp.
email-ops
280kGiúp agent quản lý email, sắp xếp hộp thư và kiểm tra việc gửi thư. Đảm bảo các thư quan trọng được gửi đi và theo dõi được.
messages-ops
280kGiúp agent đọc tin nhắn và mã xác minh. Hữu ích để kiểm tra cuộc trò chuyện trước khi trả lời hoặc chứng minh đã xem tin nhắn nào.