From google-workspace
Configure and use the Google Workspace CLI (gws) for cross-product workflows — standup reports, meeting prep, weekly digests, and email-to-task pipelines across Gmail, Drive, Sheets, Docs, Calendar, and Chat.
How this skill is triggered — by the user, by Claude, or both
Slash command
/google-workspace:google-workspaceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
`gws` là CLI thống nhất cho toàn bộ Google Workspace. Dùng skill này khi:
gws là CLI thống nhất cho toàn bộ Google Workspace. Dùng skill này khi:
Với các tác vụ đơn sản phẩm (Gmail, Drive, Sheets), dùng skill chuyên biệt: google-gmail, google-drive, google-sheets.
# npm (yêu cầu Node.js 18+)
npm install -g @googleworkspace/cli
# Homebrew
brew install googleworkspace-cli
# Kiểm tra cài đặt
gws --version
gws auth logingws auth setup # Nhập Client ID + Secret
gws auth login # Mở browser, chọn Google account
gws auth export # Xuất credentials để backup
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/service-account.json
gws drive files list # Test ngay
| Biến | Mục đích |
|---|---|
GOOGLE_WORKSPACE_CLI_TOKEN | Access token trực tiếp |
GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE | Đường dẫn credentials JSON |
GOOGLE_WORKSPACE_CLI_CLIENT_ID | OAuth Client ID |
GOOGLE_WORKSPACE_CLI_CLIENT_SECRET | OAuth Client Secret |
GOOGLE_WORKSPACE_CLI_CONFIG_DIR | Thư mục config (mặc định ~/.config/gws) |
GOOGLE_WORKSPACE_CLI_LOG | Log level (debug, info, warn, error) |
GOOGLE_WORKSPACE_CLI_PROJECT_ID | GCP Project ID |
# Tổng hợp email + calendar + tasks cho báo cáo standup hàng ngày
gws workflow +standup-report
# Tổng hợp agenda, tài liệu liên quan, lịch họp
gws workflow +meeting-prep
# Tóm tắt tuần: email quan trọng, files mới, events đã tham gia
gws workflow +weekly-digest
# Chuyển email thành task (kết hợp Gmail + Tasks/Chat)
gws workflow +email-to-task
# Thông báo file mới vào Google Chat space
gws workflow +file-announce
# Xem request/response schema của bất kỳ API method nào
gws schema drive.files.list
gws schema gmail.users.messages.send
gws schema sheets.spreadsheets.values.get
gws schema calendar.events.insert
# Xem request sẽ được gửi mà không thực thi
gws gmail +send --to [email protected] --subject "Test" --body "Hello" --dry-run
# Bật debug log
GOOGLE_WORKSPACE_CLI_LOG=debug gws drive files list
# Pagination toàn bộ kết quả
gws drive files list --params '{"pageSize": 100}' --page-all
| Code | Ý nghĩa |
|---|---|
0 | Thành công |
1 | API error |
2 | Auth error — kiểm tra credentials |
3 | Validation error — sai params |
4 | Discovery error — không lấy được API schema |
5 | Internal error |
GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE hoặc chạy lại gws auth login~/.config/gws/discovery-cache/ rồi thử lại~/.config/gws/.encryption_keyreferences/setup.md — Hướng dẫn cấp quyền OAuth chi tiết + lỗi thường gặpGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub leolionart/claude-skills --plugin google-workspace