Skip to main content 首页 创作者 eirkkk winland-android google-workspace-cli
google-workspace-cli Google Workspace administration via the gws CLI. Install, authenticate, and automate Gmail, Drive, Sheets, Calendar, Docs, Chat, and Tasks. Run security audits, execute 43 built-in recipes, and use 10 persona bundles. Use for Google Workspace admin, gws CLI setup, Gmail automation, Drive management, or Calendar scheduling.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/eirkkk/winland-Android --skill google-workspace-cli命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating accessibility checks into CI/CD pipelines.
When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.
When the user needs to generate, iterate, or scale ad creative for paid advertising. Use when they say 'write ad copy,' 'generate headlines,' 'create ad variations,' 'bulk creative,' 'iterate on ads,' 'ad copy validation,' 'RSA headlines,' 'Meta ad copy,' 'LinkedIn ad,' or 'creative testing.' This is pure creative production — distinct from paid-ads (campaign strategy). Use ad-creative when you need the copy, not the campaign plan.
name google-workspace-cli description Google Workspace administration via the gws CLI. Install, authenticate, and automate Gmail, Drive, Sheets, Calendar, Docs, Chat, and Tasks. Run security audits, execute 43 built-in recipes, and use 10 persona bundles. Use for Google Workspace admin, gws CLI setup, Gmail automation, Drive management, or Calendar scheduling. compatibility opencode
Google Workspace CLI
Expert guidance and automation for Google Workspace administration using the open-source gws CLI. Covers installation, authentication, 18+ service APIs, 43 built-in recipes, and 10 persona bundles for role-based workflows.
Quick Start
Check Installation
python3 scripts/gws_doctor.py
Send an Email
gws gmail users.messages send me --to "team@company.com" \
--subject "Weekly Update" --body "Here's this week's summary..."
List Drive Files
gws drive files list --json --limit 20 | python3 scripts/output_analyzer.py --select "name,mimeType,modifiedTime" --format table
Installation
npm (recommended)
npm install -g @anthropic/gws
gws --version
Cargo (from source)
cargo install gws-cli
gws --version
Pre-built Binaries
Verify Installation python3 scripts/gws_doctor.py
Authentication
OAuth Setup (Interactive)
python3 scripts/auth_setup_guide.py --guide oauth
gws auth setup
gws auth status --json
Service Account (Headless/CI)
python3 scripts/auth_setup_guide.py --guide service-account
export GWS_SERVICE_ACCOUNT_KEY=/path/to/key.json
export GWS_DELEGATED_USER=admin@company.com
gws auth status
Environment Variables
python3 scripts/auth_setup_guide.py --generate-env
Variable Purpose GWS_CLIENT_IDOAuth client ID GWS_CLIENT_SECRETOAuth client secret GWS_TOKEN_PATHCustom token storage path GWS_SERVICE_ACCOUNT_KEYService account JSON key path GWS_DELEGATED_USERUser to impersonate (service accounts) GWS_DEFAULT_FORMATDefault output format (json/ndjson/table)
Validate Authentication python3 scripts/auth_setup_guide.py --validate --json
Workflow 1: Gmail Automation Goal: Automate email operations — send, search, label, and filter management.
Send and Reply
gws gmail users.messages send me --to "client@example.com" \
--subject "Proposal" --body "Please find attached..." \
--attachment proposal.pdf
gws gmail users.messages reply me --thread-id <THREAD_ID> \
--body "Thanks for your feedback..."
gws gmail users.messages forward me --message-id <MSG_ID> \
--to "manager@company.com"
Search and Filter
gws gmail users.messages list me --query "from:client@example.com after:2025/01/01" --json \
| python3 scripts/output_analyzer.py --count
gws gmail users.labels list me --json
gws gmail users.settings.filters create me \
--criteria '{"from":"notifications@service.com"}' \
--action '{"addLabelIds":["Label_123"],"removeLabelIds":["INBOX"]}'
Bulk Operations
gws gmail users.messages list me --query "is:read older_than:30d" --json \
| python3 scripts/output_analyzer.py --select "id" --format json \
| xargs -I {} gws gmail users.messages modify me {} --removeLabelIds INBOX
Workflow 2: Drive & Sheets Goal: Manage files, create spreadsheets, configure sharing, and export data.
File Operations
gws drive files list --json --limit 50 \
| python3 scripts/output_analyzer.py --select "name,mimeType,size" --format table
gws drive files create --name "Q1 Report" --upload report.pdf \
--parents <FOLDER_ID>
gws sheets spreadsheets create --title "Budget 2026" --json
gws drive files export <FILE_ID> --mime "application/pdf" --output report.pdf
Sharing
gws drive permissions create <FILE_ID> \
--type user --role writer --emailAddress "colleague@company.com"
gws drive permissions create <FILE_ID> \
--type domain --role reader --domain "company.com"
gws drive permissions list <FILE_ID> --json
Sheets Data
gws sheets spreadsheets.values get <SHEET_ID> --range "Sheet1!A1:D10" --json
gws sheets spreadsheets.values update <SHEET_ID> --range "Sheet1!A1" \
--values '[["Name","Score"],["Alice",95],["Bob",87]]'
gws sheets spreadsheets.values append <SHEET_ID> --range "Sheet1!A1" \
--values '[["Charlie",92]]'
Workflow 3: Calendar & Meetings Goal: Schedule events, find available times, and generate standup reports.
Event Management
gws calendar events insert primary \
--summary "Sprint Planning" \
--start "2026-03-15T10:00:00" --end "2026-03-15T11:00:00" \
--attendees "team@company.com" \
--location "Conference Room A"
gws calendar events list primary --timeMin "$(date -u +%Y-%m-%dT%H:%M:%SZ) " \
--maxResults 10 --json
gws helpers quick-event "Lunch with Sarah tomorrow at noon"
Find Available Time
gws helpers find-time \
--attendees "alice@co.com,bob@co.com,charlie@co.com" \
--duration 60 --within "2026-03-15,2026-03-19" --json
Standup Report
gws recipes standup-report --json \
| python3 scripts/output_analyzer.py --format table
gws recipes meeting-prep --event-id <EVENT_ID>
Workflow 4: Security Audit Goal: Audit Google Workspace security configuration and generate remediation commands.
Run Full Audit
python3 scripts/workspace_audit.py --json
python3 scripts/workspace_audit.py --services gmail,drive,calendar
python3 scripts/workspace_audit.py --demo
Audit Checks Area Check Risk Drive External sharing enabled Data exfiltration Gmail Auto-forwarding rules Data exfiltration Gmail DMARC/SPF/DKIM records Email spoofing Calendar Default sharing visibility Information leak OAuth Third-party app grants Unauthorized access Admin Super admin count Privilege escalation Admin 2-Step verification enforcement Account takeover
Review and Remediate
python3 scripts/workspace_audit.py --json | python3 scripts/output_analyzer.py \
--filter "status=FAIL" --select "area,check,remediation"
gws drive about get --json
Python Tools Script Purpose Usage gws_doctor.pyPre-flight diagnostics python3 scripts/gws_doctor.py [--json] [--services gmail,drive]auth_setup_guide.pyGuided auth setup python3 scripts/auth_setup_guide.py --guide oauthgws_recipe_runner.pyRecipe catalog & runner python3 scripts/gws_recipe_runner.py --list [--persona pm]workspace_audit.pySecurity/config audit python3 scripts/workspace_audit.py [--json] [--demo]output_analyzer.pyJSON/NDJSON analysis gws ... --json | python3 scripts/output_analyzer.py --count
All scripts are stdlib-only, support --json output, and include demo mode with embedded sample data.
Best Practices
Security
Use OAuth with minimal scopes — request only what each workflow needs
Store tokens in the system keyring, never in plain text files
Rotate service account keys every 90 days
Audit third-party OAuth app grants quarterly
Use --dry-run before bulk destructive operations
Automation
Pipe --json output through output_analyzer.py for filtering and aggregation
Use recipes for multi-step operations instead of chaining raw commands
Select a persona bundle to scope recipes to your role
Use NDJSON format (--format ndjson) for streaming large result sets
Set GWS_DEFAULT_FORMAT=json in your shell profile for scripting
Performance
Use --fields to request only needed fields (reduces payload size)
Use --limit to cap results when browsing
Use --page-all only when you need complete datasets
Batch operations with recipes rather than individual API calls
Cache frequently accessed data (e.g., label IDs, folder IDs) in variables
Limitations Constraint Impact OAuth tokens expire after 1 hour Re-auth needed for long-running scripts API rate limits (per-user, per-service) Bulk operations may hit 429 errors Scope requirements vary by service Must request correct scopes during auth Pre-v1.0 CLI status Breaking changes possible between releases Google Cloud project required Free, but requires setup in Cloud Console Admin API needs admin privileges Some audit checks require Workspace Admin role
Required Scopes by Service
python3 scripts/auth_setup_guide.py --scopes gmail,drive,calendar,sheets
Service Key Scopes Gmail gmail.modify, gmail.send, gmail.labelsDrive drive.file, drive.metadata.readonlySheets spreadsheetsCalendar calendar, calendar.eventsAdmin admin.directory.user.readonly, admin.directory.groupTasks tasks