anton-abyzov/vskill/gws
Claude Code and agent skill by anton-abyzov/vskill
- vendor
Checking that the SKILL.md file is still in the repository.
Google Workspace CLI (gws) — unified command-line tool for Gmail, Drive, Sheets, Docs, Calendar, Chat, Admin, and 40+ Google APIs. Use this skill when the user wants to interact with any Google Workspace service from the terminal or via AI agents, set up gws authentication, configure the gws MCP server, manage Google Drive files, read or send Gmail, create or query Google Sheets, edit Google Docs, manage Calendar events, or automate any Google Workspace workflow. Also activate when the user mentions 'gws', 'google workspace cli', 'google drive cli', 'gmail from terminal', 'sheets api', 'google docs api', 'gws mcp', 'workspace automation', or asks to 'list my drive files', 'send email via cli', 'read my calendar', 'update spreadsheet', 'create a google doc'. Do NOT activate for native Claude MCP integrations (claude_ai_Gmail, claude_ai_Google_Calendar) unless the user explicitly wants to use gws instead, or needs services not covered by native integrations (Sheets, Docs, Drive, Chat, Admin).
Install
npx vskill@latest install anton-abyzov/vskill/gwsSKILL.md
The same SKILL.md was published earlier as anton-abyzov/vskill/gws.
Google Workspace CLI (gws)
One CLI for all of Google Workspace — Drive, Gmail, Calendar, Sheets, Docs, Chat, Admin, and every API published via Google Discovery Service. Built in Rust, distributed via npm, designed for humans and AI agents.
Upstream: googleworkspace/cli (Apache 2.0) Status: Pre-v1.0 — breaking changes possible. Pin versions in production scripts.
MCP route first, this skill as the fallback
On a host where the gws MCP server is configured (gws mcp -s <services>, see MCP Server Mode below), call its tools directly: they need no shell and return structured results. This skill stays the fallback for hosts without that server, for scripts, and for anything the exposed services do not cover. Check the host's MCP list before shelling out to gws.
When to Use gws vs Native Claude MCP
| Need | Use | |
|---|---|---|
| Read/send Gmail | Native claude_ai_Gmail (already configured) | |
| Calendar events | Native claude_ai_Google_Calendar (already configured) | |
| Google Drive files | gws (no native integration) | |
| Google Sheets | gws (no native integration) | |
| Google Docs | gws (no native integration) | |
| Google Chat | gws (no native integration) | |
| Admin / Directory | gws (no native integration) | |
| Bulk automation across services | gws (unified CLI, scriptable) | |
| Custom/new Google APIs | gws (dynamic discovery picks up new APIs automatically) |
Installation
Alternative: download pre-built binaries from GitHub Releases.
Authentication Setup
Prerequisites
- A Google Cloud project (create via console.cloud.google.com or
gcloud) - Required Google APIs enabled in the project (Drive API, Gmail API, etc.)
- OAuth consent screen configured (add test users if in testing mode)
Interactive Setup (Recommended)
Service Account (Headless/CI)
Pre-obtained Token
Common Auth Errors
| Error | Fix | |
|---|---|---|
| "Access blocked" | Add yourself as test user in OAuth consent screen | |
| "Google hasn't verified this app" | Click "Continue" (expected in testing mode) | |
| "invalid_scope" | Unverified apps limited to ~25 scopes — reduce requested scopes | |
| "redirect_uri_mismatch" | Add http://localhost to Authorized Redirect URIs in GCP Console | |
| 403 on API call | Enable the required API in Google Cloud Console, wait a few seconds |
Reset auth: gws auth logout then gws auth login
Credentials storage: Encrypted with AES-256-GCM, stored in OS keyring (macOS Keychain / Windows Credential Manager / Linux Secret Service). Tokens auto-refresh.
Command Structure
All commands follow:
Commands are dynamically generated from Google's Discovery Service at runtime. When Google adds an API endpoint, gws picks it up automatically (discovery docs cached 24 hours).
Core Services & Examples
Google Drive
Gmail
Google Sheets
Google Docs
Google Calendar
Google Chat
Admin / Directory
Discovering Available Commands
MCP Server Mode
gws includes a built-in MCP (Model Context Protocol) server that exposes Google Workspace APIs as structured tools over stdio.
Starting the MCP Server
Tool Modes
| Mode | Tools Exposed | Context Cost | Best For | |
|---|---|---|---|---|
full (default) | 200-400 individual tools | High | When you need all methods upfront | |
compact | ~26 tools (1 per service + gws_discover) | Low | Agents with limited context windows |
In compact mode, the gws_discover meta-tool lets the agent explore available methods on demand without loading all tool definitions upfront.
Claude Code MCP Configuration
Register the MCP server via the Claude CLI:
To scope it to a specific project only, add --scope project.
Service filtering (-s flag) is a security boundary — only expose services the agent actually needs. Don't use -s all unless necessary.
Claude Desktop Configuration
Add to claude_desktop_config.json:
Agent Workflow Patterns
Pattern 1: CLI-First (Bash Tool)
Use gws directly via Bash when you need quick, one-off operations:
Always check `gws auth status` first. If not authenticated, guide the user through gws auth login.
Pattern 2: MCP-First (Structured Tools)
When the MCP server is configured, use the exposed tools directly (they appear as MCP tools in Claude Code). The compact mode gws_discover tool helps find the right method:
- Call
gws_discoverwith the service name to see available methods - Call the service-specific tool (e.g.,
drive_tool) with the discovered method and params - Parse the structured JSON response
Pattern 3: Scripted Automation
For multi-step workflows, chain commands:
Security Rules
- Never expose OAuth tokens or credentials in logs, output, or tool responses
- Validate file paths — prevent directory traversal when handling paths from untrusted input
- URL-encode user-supplied values embedded in URL path segments
- Use `--sanitize` flag when processing untrusted input (enables Google Model Armor for prompt injection detection)
- Principle of least privilege — use
-sto expose only needed services via MCP - Never store credentials in code — rely on OS keyring (automatic) or environment variables
Environment Variables
| Variable | Purpose | |
|---|---|---|
GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE | Path to service account JSON | |
GOOGLE_WORKSPACE_CLI_CLIENT_ID | OAuth client ID override | |
GOOGLE_WORKSPACE_CLI_CLIENT_SECRET | OAuth client secret override | |
GOOGLE_WORKSPACE_CLI_CONFIG_DIR | Override config dir (default: ~/.config/gws) | |
GOOGLE_WORKSPACE_CLI_TOKEN | Pre-obtained OAuth access token |
Error Handling
| Error | Cause | Fix | |
|---|---|---|---|
| 401 Unauthorized | Token expired or invalid | gws auth login to re-authenticate | |
| 403 Forbidden | API not enabled or insufficient permissions | Enable the API in GCP Console; check OAuth scopes | |
| 404 Not Found | Wrong resource ID or API not enabled | Verify the ID; enable the API in GCP Console | |
| 429 Rate Limited | Too many requests | Back off and retry with exponential delay | |
| "command not found: gws" | Not installed | npm install -g @googleworkspace/cli | |
JSON parse error in --params | Malformed JSON | Validate JSON before passing; use single quotes around the JSON string |
Output Format
All gws commands return structured JSON. Parse with jq for scripting:
Limitations (Pre-v1.0)
- Breaking changes may occur between minor versions
- Unverified OAuth apps are limited to ~25 scopes (may need to verify your app for full access)
- Not an official Google product — no enterprise SLA
- Discovery document caching (24h) means very new APIs may take a day to appear
- Pull requests from external contributors temporarily disabled on the upstream repo
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 16 Jun 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/google-workspace/skills/gws/SKILL.md
Popularity
- Repository stars
- 39
- Repository forks
- 6
- Repository npm downloads, 7 days
- 4,853
- 7-day trend score
- 38
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 21 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/anton-abyzov/vskill/gws)