[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CN69G3AXAC7QFQQANEZ3JB":3,"skill-same:01M6CN69G3AXAC7QFQQANEZ3JB":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":62,"commitSha":63,"skillDirectory":64,"forksCount":65,"repositoryHtmlUrl":66,"repositoryHomepageUrl":67,"ownerHtmlUrl":68,"ownerBlogUrl":69,"ownerDescription":70,"updatedAt":71,"install":72,"resources":85},"01M6CN69G3AXAC7QFQQANEZ3JB","gws",null,"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).","anton-abyzov\u002Fvskill","anton-abyzov","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F979819?v=4","01M6CN5XDNZDM4A59WYJ1MF0DF","Anton Abyzov","01M6CN5XHVS7FXP067EJQVVZHK",47,"MIT","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgoogle-workspace\u002Fgws\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[5,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"Google-Workspace","query","activate","files","up","google workspace cli","command","configure","api","MCP","spreadsheet","SET","server","authentication","create","workflow","mcp server","ai agents","cli","2026-11-10 10:12:30",false,"---\nname: gws\ndescription: \"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).\"\nmetadata:\n  version: 0.1.0\n  tags: google-workspace, gws, gmail, drive, sheets, docs, calendar, chat, admin, mcp, cli, automation\n  upstream: https:\u002F\u002Fgithub.com\u002Fgoogleworkspace\u002Fcli\n  upstream-version: 0.4.x\n  stability: preview\n---\n\n# Google Workspace CLI (gws)\n\nOne 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.\n\n**Upstream**: [googleworkspace\u002Fcli](https:\u002F\u002Fgithub.com\u002Fgoogleworkspace\u002Fcli) (Apache 2.0)\n**Status**: Pre-v1.0 — breaking changes possible. Pin versions in production scripts.\n\n---\n\n## When to Use gws vs Native Claude MCP\n\n| Need | Use |\n|------|-----|\n| Read\u002Fsend Gmail | Native `claude_ai_Gmail` (already configured) |\n| Calendar events | Native `claude_ai_Google_Calendar` (already configured) |\n| Google Drive files | **gws** (no native integration) |\n| Google Sheets | **gws** (no native integration) |\n| Google Docs | **gws** (no native integration) |\n| Google Chat | **gws** (no native integration) |\n| Admin \u002F Directory | **gws** (no native integration) |\n| Bulk automation across services | **gws** (unified CLI, scriptable) |\n| Custom\u002Fnew Google APIs | **gws** (dynamic discovery picks up new APIs automatically) |\n\n---\n\n## Installation\n\n```bash\n# Via npm (recommended — includes pre-built native binary)\nnpm install -g @googleworkspace\u002Fcli\n\n# Verify\ngws --version\n```\n\nAlternative: download pre-built binaries from [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fgoogleworkspace\u002Fcli\u002Freleases).\n\n---\n\n## Authentication Setup\n\n### Prerequisites\n\n1. A Google Cloud project (create via [console.cloud.google.com](https:\u002F\u002Fconsole.cloud.google.com) or `gcloud`)\n2. Required Google APIs enabled in the project (Drive API, Gmail API, etc.)\n3. OAuth consent screen configured (add test users if in testing mode)\n\n### Interactive Setup (Recommended)\n\n```bash\n# Guided setup — walks through GCP project configuration\ngws auth setup\n\n# OAuth login — opens browser for consent\ngws auth login\n\n# Verify authentication\ngws auth status\n```\n\n### Service Account (Headless\u002FCI)\n\n```bash\nexport GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=\u002Fpath\u002Fto\u002Fservice-account.json\n```\n\n### Pre-obtained Token\n\n```bash\nexport GOOGLE_WORKSPACE_CLI_TOKEN=$(gcloud auth print-access-token)\n```\n\n### Common Auth Errors\n\n| Error | Fix |\n|-------|-----|\n| \"Access blocked\" | Add yourself as test user in OAuth consent screen |\n| \"Google hasn't verified this app\" | Click \"Continue\" (expected in testing mode) |\n| \"invalid_scope\" | Unverified apps limited to ~25 scopes — reduce requested scopes |\n| \"redirect_uri_mismatch\" | Add `http:\u002F\u002Flocalhost` to Authorized Redirect URIs in GCP Console |\n| 403 on API call | Enable the required API in Google Cloud Console, wait a few seconds |\n\n**Reset auth**: `gws auth logout` then `gws auth login`\n\n**Credentials storage**: Encrypted with AES-256-GCM, stored in OS keyring (macOS Keychain \u002F Windows Credential Manager \u002F Linux Secret Service). Tokens auto-refresh.\n\n---\n\n## Command Structure\n\nAll commands follow:\n\n```bash\ngws \u003Cservice> \u003Cresource> \u003Cmethod> [--params '\u003Cjson>'] [flags]\n```\n\nCommands 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).\n\n### Core Services & Examples\n\n**Google Drive**\n```bash\n# List 10 most recent files\ngws drive files list --params '{\"pageSize\": 10}'\n\n# Upload a file\ngws drive files create --params '{\"name\": \"report.pdf\"}' --upload .\u002Freport.pdf\n\n# Create a folder\ngws drive files create --params '{\"name\": \"Project X\", \"mimeType\": \"application\u002Fvnd.google-apps.folder\"}'\n\n# Move a file to a folder\ngws drive files update --params '{\"addParents\": \"FOLDER_ID\", \"removeParents\": \"OLD_PARENT_ID\"}' --file-id FILE_ID\n```\n\n**Gmail**\n```bash\n# List recent messages\ngws gmail messages list --params '{\"maxResults\": 5}'\n\n# Read a specific message\ngws gmail messages get --params '{\"id\": \"MESSAGE_ID\", \"format\": \"full\"}'\n\n# Send an email\ngws gmail messages send --params '{\"raw\": \"BASE64_ENCODED_RFC822\"}'\n```\n\n**Google Sheets**\n```bash\n# Read values from a range\ngws sheets spreadsheets.values get --params '{\"spreadsheetId\": \"SHEET_ID\", \"range\": \"Sheet1!A1:D10\"}'\n\n# Append rows\ngws sheets spreadsheets.values append --params '{\"spreadsheetId\": \"SHEET_ID\", \"range\": \"Sheet1!A1\", \"valueInputOption\": \"USER_ENTERED\", \"requestBody\": {\"values\": [[\"Name\", \"Score\"], [\"Alice\", 95]]}}'\n\n# Update cells\ngws sheets spreadsheets.values update --params '{\"spreadsheetId\": \"SHEET_ID\", \"range\": \"Sheet1!B2\", \"valueInputOption\": \"RAW\", \"requestBody\": {\"values\": [[100]]}}'\n```\n\n**Google Docs**\n```bash\n# Create a new document\ngws docs documents create --params '{\"title\": \"Meeting Notes\"}'\n\n# Get document content\ngws docs documents get --params '{\"documentId\": \"DOC_ID\"}'\n```\n\n**Google Calendar**\n```bash\n# List upcoming events\ngws calendar events list --params '{\"calendarId\": \"primary\", \"maxResults\": 10, \"timeMin\": \"2026-03-08T00:00:00Z\"}'\n\n# Create an event\ngws calendar events insert --params '{\"calendarId\": \"primary\", \"requestBody\": {\"summary\": \"Team Sync\", \"start\": {\"dateTime\": \"2026-03-10T14:00:00Z\"}, \"end\": {\"dateTime\": \"2026-03-10T15:00:00Z\"}}}'\n```\n\n**Google Chat**\n```bash\n# List spaces\ngws chat spaces list\n\n# Send a message to a space\ngws chat spaces.messages create --params '{\"parent\": \"spaces\u002FSPACE_ID\", \"requestBody\": {\"text\": \"Hello from gws!\"}}'\n```\n\n**Admin \u002F Directory**\n```bash\n# List users in domain\ngws admin directory users list --params '{\"domain\": \"example.com\"}'\n\n# Get user info\ngws admin directory users get --params '{\"userKey\": \"user@example.com\"}'\n```\n\n### Discovering Available Commands\n\n```bash\n# List all available services\ngws help\n\n# List resources\u002Fmethods for a service\ngws drive help\ngws sheets help\n\n# Get method details\ngws drive files list --help\n```\n\n---\n\n## MCP Server Mode\n\ngws includes a built-in MCP (Model Context Protocol) server that exposes Google Workspace APIs as structured tools over stdio.\n\n### Starting the MCP Server\n\n```bash\n# Specific services (recommended — principle of least privilege)\ngws mcp -s drive,sheets,docs\n\n# All services\ngws mcp -s all\n\n# Single service\ngws mcp -s gmail\n```\n\n### Tool Modes\n\n| Mode | Tools Exposed | Context Cost | Best For |\n|------|--------------|--------------|----------|\n| `full` (default) | 200-400 individual tools | High | When you need all methods upfront |\n| `compact` | ~26 tools (1 per service + `gws_discover`) | Low | Agents with limited context windows |\n\n```bash\n# Compact mode (recommended for agents)\ngws mcp -s drive,sheets,calendar --tool-mode compact\n```\n\nIn **compact mode**, the `gws_discover` meta-tool lets the agent explore available methods on demand without loading all tool definitions upfront.\n\n### Claude Code MCP Configuration\n\nAdd to your Claude settings (e.g., `~\u002F.claude\u002Fsettings.json` or project `.claude\u002Fsettings.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"google-workspace\": {\n      \"command\": \"npx\",\n      \"args\": [\"@googleworkspace\u002Fcli\", \"mcp\", \"-s\", \"drive,sheets,docs,calendar\", \"--tool-mode\", \"compact\"]\n    }\n  }\n}\n```\n\n**Service filtering** (`-s` flag) is a security boundary — only expose services the agent actually needs. Don't use `-s all` unless necessary.\n\n### Claude Desktop Configuration\n\nAdd to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"google-workspace\": {\n      \"command\": \"npx\",\n      \"args\": [\"@googleworkspace\u002Fcli\", \"mcp\", \"-s\", \"drive,sheets,docs\", \"--tool-mode\", \"compact\"]\n    }\n  }\n}\n```\n\n---\n\n## Agent Workflow Patterns\n\n### Pattern 1: CLI-First (Bash Tool)\n\nUse `gws` directly via Bash when you need quick, one-off operations:\n\n```bash\n# Check auth before any operation\ngws auth status\n\n# Then execute\ngws drive files list --params '{\"pageSize\": 5}'\n```\n\n**Always check `gws auth status` first.** If not authenticated, guide the user through `gws auth login`.\n\n### Pattern 2: MCP-First (Structured Tools)\n\nWhen 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:\n\n1. Call `gws_discover` with the service name to see available methods\n2. Call the service-specific tool (e.g., `drive_tool`) with the discovered method and params\n3. Parse the structured JSON response\n\n### Pattern 3: Scripted Automation\n\nFor multi-step workflows, chain commands:\n\n```bash\n# Create folder, upload file, share with team\nFOLDER_ID=$(gws drive files create --params '{\"name\": \"Sprint 42\", \"mimeType\": \"application\u002Fvnd.google-apps.folder\"}' | jq -r '.id')\ngws drive files create --params \"{\\\"name\\\": \\\"retro.md\\\", \\\"parents\\\": [\\\"$FOLDER_ID\\\"]}\" --upload .\u002Fretro.md\ngws drive permissions create --params \"{\\\"fileId\\\": \\\"$FOLDER_ID\\\", \\\"requestBody\\\": {\\\"role\\\": \\\"writer\\\", \\\"type\\\": \\\"group\\\", \\\"emailAddress\\\": \\\"engineering@company.com\\\"}}\"\n```\n\n---\n\n## Security Rules\n\n1. **Never expose OAuth tokens or credentials** in logs, output, or tool responses\n2. **Validate file paths** — prevent directory traversal when handling paths from untrusted input\n3. **URL-encode user-supplied values** embedded in URL path segments\n4. **Use `--sanitize` flag** when processing untrusted input (enables Google Model Armor for prompt injection detection)\n5. **Principle of least privilege** — use `-s` to expose only needed services via MCP\n6. **Never store credentials in code** — rely on OS keyring (automatic) or environment variables\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| `GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE` | Path to service account JSON |\n| `GOOGLE_WORKSPACE_CLI_CLIENT_ID` | OAuth client ID override |\n| `GOOGLE_WORKSPACE_CLI_CLIENT_SECRET` | OAuth client secret override |\n| `GOOGLE_WORKSPACE_CLI_CONFIG_DIR` | Override config dir (default: `~\u002F.config\u002Fgws`) |\n| `GOOGLE_WORKSPACE_CLI_TOKEN` | Pre-obtained OAuth access token |\n\n---\n\n## Error Handling\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| 401 Unauthorized | Token expired or invalid | `gws auth login` to re-authenticate |\n| 403 Forbidden | API not enabled or insufficient permissions | Enable the API in GCP Console; check OAuth scopes |\n| 404 Not Found | Wrong resource ID or API not enabled | Verify the ID; enable the API in GCP Console |\n| 429 Rate Limited | Too many requests | Back off and retry with exponential delay |\n| \"command not found: gws\" | Not installed | `npm install -g @googleworkspace\u002Fcli` |\n| JSON parse error in `--params` | Malformed JSON | Validate JSON before passing; use single quotes around the JSON string |\n\n---\n\n## Output Format\n\nAll gws commands return **structured JSON**. Parse with `jq` for scripting:\n\n```bash\n# Get just file names\ngws drive files list --params '{\"pageSize\": 5}' | jq -r '.files[].name'\n\n# Get event times\ngws calendar events list --params '{\"calendarId\": \"primary\", \"maxResults\": 3}' | jq '.items[] | {summary, start: .start.dateTime}'\n```\n\n---\n\n## Limitations (Pre-v1.0)\n\n- Breaking changes may occur between minor versions\n- Unverified OAuth apps are limited to ~25 scopes (may need to verify your app for full access)\n- Not an official Google product — no enterprise SLA\n- Discovery document caching (24h) means very new APIs may take a day to appear\n- Pull requests from external contributors temporarily disabled on the upstream repo\n","# Google Workspace CLI (gws)\n\nOne 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.\n\n**Upstream**: [googleworkspace\u002Fcli](https:\u002F\u002Fgithub.com\u002Fgoogleworkspace\u002Fcli) (Apache 2.0)\n**Status**: Pre-v1.0 — breaking changes possible. Pin versions in production scripts.\n\n---\n\n## When to Use gws vs Native Claude MCP\n\n| Need | Use |\n|------|-----|\n| Read\u002Fsend Gmail | Native `claude_ai_Gmail` (already configured) |\n| Calendar events | Native `claude_ai_Google_Calendar` (already configured) |\n| Google Drive files | **gws** (no native integration) |\n| Google Sheets | **gws** (no native integration) |\n| Google Docs | **gws** (no native integration) |\n| Google Chat | **gws** (no native integration) |\n| Admin \u002F Directory | **gws** (no native integration) |\n| Bulk automation across services | **gws** (unified CLI, scriptable) |\n| Custom\u002Fnew Google APIs | **gws** (dynamic discovery picks up new APIs automatically) |\n\n---\n\n## Installation\n\n```bash\n# Via npm (recommended — includes pre-built native binary)\nnpm install -g @googleworkspace\u002Fcli\n\n# Verify\ngws --version\n```\n\nAlternative: download pre-built binaries from [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fgoogleworkspace\u002Fcli\u002Freleases).\n\n---\n\n## Authentication Setup\n\n### Prerequisites\n\n1. A Google Cloud project (create via [console.cloud.google.com](https:\u002F\u002Fconsole.cloud.google.com) or `gcloud`)\n2. Required Google APIs enabled in the project (Drive API, Gmail API, etc.)\n3. OAuth consent screen configured (add test users if in testing mode)\n\n### Interactive Setup (Recommended)\n\n```bash\n# Guided setup — walks through GCP project configuration\ngws auth setup\n\n# OAuth login — opens browser for consent\ngws auth login\n\n# Verify authentication\ngws auth status\n```\n\n### Service Account (Headless\u002FCI)\n\n```bash\nexport GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=\u002Fpath\u002Fto\u002Fservice-account.json\n```\n\n### Pre-obtained Token\n\n```bash\nexport GOOGLE_WORKSPACE_CLI_TOKEN=$(gcloud auth print-access-token)\n```\n\n### Common Auth Errors\n\n| Error | Fix |\n|-------|-----|\n| \"Access blocked\" | Add yourself as test user in OAuth consent screen |\n| \"Google hasn't verified this app\" | Click \"Continue\" (expected in testing mode) |\n| \"invalid_scope\" | Unverified apps limited to ~25 scopes — reduce requested scopes |\n| \"redirect_uri_mismatch\" | Add `http:\u002F\u002Flocalhost` to Authorized Redirect URIs in GCP Console |\n| 403 on API call | Enable the required API in Google Cloud Console, wait a few seconds |\n\n**Reset auth**: `gws auth logout` then `gws auth login`\n\n**Credentials storage**: Encrypted with AES-256-GCM, stored in OS keyring (macOS Keychain \u002F Windows Credential Manager \u002F Linux Secret Service). Tokens auto-refresh.\n\n---\n\n## Command Structure\n\nAll commands follow:\n\n```bash\ngws \u003Cservice> \u003Cresource> \u003Cmethod> [--params '\u003Cjson>'] [flags]\n```\n\nCommands 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).\n\n### Core Services & Examples\n\n**Google Drive**\n```bash\n# List 10 most recent files\ngws drive files list --params '{\"pageSize\": 10}'\n\n# Upload a file\ngws drive files create --params '{\"name\": \"report.pdf\"}' --upload .\u002Freport.pdf\n\n# Create a folder\ngws drive files create --params '{\"name\": \"Project X\", \"mimeType\": \"application\u002Fvnd.google-apps.folder\"}'\n\n# Move a file to a folder\ngws drive files update --params '{\"addParents\": \"FOLDER_ID\", \"removeParents\": \"OLD_PARENT_ID\"}' --file-id FILE_ID\n```\n\n**Gmail**\n```bash\n# List recent messages\ngws gmail messages list --params '{\"maxResults\": 5}'\n\n# Read a specific message\ngws gmail messages get --params '{\"id\": \"MESSAGE_ID\", \"format\": \"full\"}'\n\n# Send an email\ngws gmail messages send --params '{\"raw\": \"BASE64_ENCODED_RFC822\"}'\n```\n\n**Google Sheets**\n```bash\n# Read values from a range\ngws sheets spreadsheets.values get --params '{\"spreadsheetId\": \"SHEET_ID\", \"range\": \"Sheet1!A1:D10\"}'\n\n# Append rows\ngws sheets spreadsheets.values append --params '{\"spreadsheetId\": \"SHEET_ID\", \"range\": \"Sheet1!A1\", \"valueInputOption\": \"USER_ENTERED\", \"requestBody\": {\"values\": [[\"Name\", \"Score\"], [\"Alice\", 95]]}}'\n\n# Update cells\ngws sheets spreadsheets.values update --params '{\"spreadsheetId\": \"SHEET_ID\", \"range\": \"Sheet1!B2\", \"valueInputOption\": \"RAW\", \"requestBody\": {\"values\": [[100]]}}'\n```\n\n**Google Docs**\n```bash\n# Create a new document\ngws docs documents create --params '{\"title\": \"Meeting Notes\"}'\n\n# Get document content\ngws docs documents get --params '{\"documentId\": \"DOC_ID\"}'\n```\n\n**Google Calendar**\n```bash\n# List upcoming events\ngws calendar events list --params '{\"calendarId\": \"primary\", \"maxResults\": 10, \"timeMin\": \"2026-03-08T00:00:00Z\"}'\n\n# Create an event\ngws calendar events insert --params '{\"calendarId\": \"primary\", \"requestBody\": {\"summary\": \"Team Sync\", \"start\": {\"dateTime\": \"2026-03-10T14:00:00Z\"}, \"end\": {\"dateTime\": \"2026-03-10T15:00:00Z\"}}}'\n```\n\n**Google Chat**\n```bash\n# List spaces\ngws chat spaces list\n\n# Send a message to a space\ngws chat spaces.messages create --params '{\"parent\": \"spaces\u002FSPACE_ID\", \"requestBody\": {\"text\": \"Hello from gws!\"}}'\n```\n\n**Admin \u002F Directory**\n```bash\n# List users in domain\ngws admin directory users list --params '{\"domain\": \"example.com\"}'\n\n# Get user info\ngws admin directory users get --params '{\"userKey\": \"user@example.com\"}'\n```\n\n### Discovering Available Commands\n\n```bash\n# List all available services\ngws help\n\n# List resources\u002Fmethods for a service\ngws drive help\ngws sheets help\n\n# Get method details\ngws drive files list --help\n```\n\n---\n\n## MCP Server Mode\n\ngws includes a built-in MCP (Model Context Protocol) server that exposes Google Workspace APIs as structured tools over stdio.\n\n### Starting the MCP Server\n\n```bash\n# Specific services (recommended — principle of least privilege)\ngws mcp -s drive,sheets,docs\n\n# All services\ngws mcp -s all\n\n# Single service\ngws mcp -s gmail\n```\n\n### Tool Modes\n\n| Mode | Tools Exposed | Context Cost | Best For |\n|------|--------------|--------------|----------|\n| `full` (default) | 200-400 individual tools | High | When you need all methods upfront |\n| `compact` | ~26 tools (1 per service + `gws_discover`) | Low | Agents with limited context windows |\n\n```bash\n# Compact mode (recommended for agents)\ngws mcp -s drive,sheets,calendar --tool-mode compact\n```\n\nIn **compact mode**, the `gws_discover` meta-tool lets the agent explore available methods on demand without loading all tool definitions upfront.\n\n### Claude Code MCP Configuration\n\nAdd to your Claude settings (e.g., `~\u002F.claude\u002Fsettings.json` or project `.claude\u002Fsettings.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"google-workspace\": {\n      \"command\": \"npx\",\n      \"args\": [\"@googleworkspace\u002Fcli\", \"mcp\", \"-s\", \"drive,sheets,docs,calendar\", \"--tool-mode\", \"compact\"]\n    }\n  }\n}\n```\n\n**Service filtering** (`-s` flag) is a security boundary — only expose services the agent actually needs. Don't use `-s all` unless necessary.\n\n### Claude Desktop Configuration\n\nAdd to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"google-workspace\": {\n      \"command\": \"npx\",\n      \"args\": [\"@googleworkspace\u002Fcli\", \"mcp\", \"-s\", \"drive,sheets,docs\", \"--tool-mode\", \"compact\"]\n    }\n  }\n}\n```\n\n---\n\n## Agent Workflow Patterns\n\n### Pattern 1: CLI-First (Bash Tool)\n\nUse `gws` directly via Bash when you need quick, one-off operations:\n\n```bash\n# Check auth before any operation\ngws auth status\n\n# Then execute\ngws drive files list --params '{\"pageSize\": 5}'\n```\n\n**Always check `gws auth status` first.** If not authenticated, guide the user through `gws auth login`.\n\n### Pattern 2: MCP-First (Structured Tools)\n\nWhen 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:\n\n1. Call `gws_discover` with the service name to see available methods\n2. Call the service-specific tool (e.g., `drive_tool`) with the discovered method and params\n3. Parse the structured JSON response\n\n### Pattern 3: Scripted Automation\n\nFor multi-step workflows, chain commands:\n\n```bash\n# Create folder, upload file, share with team\nFOLDER_ID=$(gws drive files create --params '{\"name\": \"Sprint 42\", \"mimeType\": \"application\u002Fvnd.google-apps.folder\"}' | jq -r '.id')\ngws drive files create --params \"{\\\"name\\\": \\\"retro.md\\\", \\\"parents\\\": [\\\"$FOLDER_ID\\\"]}\" --upload .\u002Fretro.md\ngws drive permissions create --params \"{\\\"fileId\\\": \\\"$FOLDER_ID\\\", \\\"requestBody\\\": {\\\"role\\\": \\\"writer\\\", \\\"type\\\": \\\"group\\\", \\\"emailAddress\\\": \\\"engineering@company.com\\\"}}\"\n```\n\n---\n\n## Security Rules\n\n1. **Never expose OAuth tokens or credentials** in logs, output, or tool responses\n2. **Validate file paths** — prevent directory traversal when handling paths from untrusted input\n3. **URL-encode user-supplied values** embedded in URL path segments\n4. **Use `--sanitize` flag** when processing untrusted input (enables Google Model Armor for prompt injection detection)\n5. **Principle of least privilege** — use `-s` to expose only needed services via MCP\n6. **Never store credentials in code** — rely on OS keyring (automatic) or environment variables\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| `GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE` | Path to service account JSON |\n| `GOOGLE_WORKSPACE_CLI_CLIENT_ID` | OAuth client ID override |\n| `GOOGLE_WORKSPACE_CLI_CLIENT_SECRET` | OAuth client secret override |\n| `GOOGLE_WORKSPACE_CLI_CONFIG_DIR` | Override config dir (default: `~\u002F.config\u002Fgws`) |\n| `GOOGLE_WORKSPACE_CLI_TOKEN` | Pre-obtained OAuth access token |\n\n---\n\n## Error Handling\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| 401 Unauthorized | Token expired or invalid | `gws auth login` to re-authenticate |\n| 403 Forbidden | API not enabled or insufficient permissions | Enable the API in GCP Console; check OAuth scopes |\n| 404 Not Found | Wrong resource ID or API not enabled | Verify the ID; enable the API in GCP Console |\n| 429 Rate Limited | Too many requests | Back off and retry with exponential delay |\n| \"command not found: gws\" | Not installed | `npm install -g @googleworkspace\u002Fcli` |\n| JSON parse error in `--params` | Malformed JSON | Validate JSON before passing; use single quotes around the JSON string |\n\n---\n\n## Output Format\n\nAll gws commands return **structured JSON**. Parse with `jq` for scripting:\n\n```bash\n# Get just file names\ngws drive files list --params '{\"pageSize\": 5}' | jq -r '.files[].name'\n\n# Get event times\ngws calendar events list --params '{\"calendarId\": \"primary\", \"maxResults\": 3}' | jq '.items[] | {summary, start: .start.dateTime}'\n```\n\n---\n\n## Limitations (Pre-v1.0)\n\n- Breaking changes may occur between minor versions\n- Unverified OAuth apps are limited to ~25 scopes (may need to verify your app for full access)\n- Not an official Google product — no enterprise SLA\n- Discovery document caching (24h) means very new APIs may take a day to appear\n- Pull requests from external contributors temporarily disabled on the upstream repo\n",{"name":5,"metadata":56,"description":7},{"tags":57,"version":58,"upstream":59,"stability":60,"upstream-version":61},"google-workspace, gws, gmail, drive, sheets, docs, calendar, chat, admin, mcp, cli, automation","0.1.0","https:\u002F\u002Fgithub.com\u002Fgoogleworkspace\u002Fcli","preview","0.4.x","main","b198d63224f1ecec8bca1300fb21dfa996c853db",".claude\u002Fskills\u002Fgoogle-workspace\u002Fgws",5,"https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill","https:\u002F\u002Fverified-skill.com","https:\u002F\u002Fgithub.com\u002Fanton-abyzov","https:\u002F\u002Fspecwithcode.com","Founder of SpecWithCode · Creator of SpecWeave · AI coding agents, Cloud, DevOps · 20 yrs SWE · YouTube: @AntonAbyzov","2026-11-09 14:50:08",{"source":8,"skillName":5,"commands":73,"prompt":83,"zipAvailable":84},[74,77,80],{"tool":75,"command":76},"npx","npx skills add anton-abyzov\u002Fvskill --skill gws",{"tool":78,"command":79},"bunx","bunx skills add anton-abyzov\u002Fvskill --skill gws",{"tool":81,"command":82},"pnpm","pnpm dlx skills add anton-abyzov\u002Fvskill --skill gws","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgoogle-workspace\u002Fgws\u002FSKILL.md",true,[],[87,114,131,154,190,213],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":51},"01M6HKP9JT8CH33W7DJB544DCS","x-reply-drafts","Find live X threads where a product genuinely fits, and draft truthful, humanized replies for the owner to review and post by hand. Human pace only: max 5 replies a day, never two within 20 minutes, no automated posting. Use when the user asks to 'find threads to reply to', 'draft X replies', 'reply-guy session', 'join trending conversations', 'engage on Twitter about \u003Cproduct>', or wants a daily batch of reply drafts. Not for scheduling original posts (social-media-posting) or bulk publishing (blotato).","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fplugins\u002Fmarketing\u002Fskills\u002Fx-reply-drafts\u002FSKILL.md",[],[94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],"reply","drafts","x reply drafts","review","product","batch","Media","unslop","never","only","humanize","social","human","join","trending","bulk","posts","threads","conversations","hand",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":51},"01M6CND903Q6E6R2XDWMFH8MAY","hello-world","A tiny test skill used by the 0853 verify-runtime harness. Says hello. No external calls. Use when the user asks for a sanity-check skill in a verify-harness fixture.","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Ftest\u002Fverify\u002Ffixtures\u002Ftiny-skill-source\u002Fplugins\u002Ftiny-test-plugin\u002Fskills\u002Fhello-world\u002FSKILL.md",[],[121,122,123,124,125,126,127,128,129,130],"hello world","hello","world","test","Test Skill","harness","verify","check","user","use",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":141,"publishedAt":51},"01M6CND60H0N1CYEB6ABEW18NS","existing-skill","Lint markdown files for style and grammar issues.","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fsrc\u002Fcommands\u002F__tests__\u002Ffixtures\u002Fexisting-skill\u002FSKILL.md",[137,140],{"categoryNo":138,"categoryName":139,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},[142,143,144,145,146,147,148,149,150,151,152,35,153],"existing skill","docs","lint","code","issues","markdown","grammar","read","write","edit","cursor","lint markdown files",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":170,"publishedAt":51},"01M6CND1JAW97FY3W50MAPNKX7","remotion-best-practices","Best practices for Remotion video creation in React — scaffolding, compositions, animations, transitions — PLUS hard-won rules for high-fidelity product-demo videos: real logos\u002Ficons, precise YouTube-reference matching, full-screen camera zooms, click-targets that actually hit, content-tight rectangle highlights, voiceover regeneration discipline, audio-level normalization (no double-boost), per-scene voice-sync math, Studio detail-page mirror patterns, bold-not-subtle connection lines, and the YouTube publication kit (chapters, description, thumbnail, hashtags) that turns a render into a shipped video.","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Fremotion-best-practices\u002FSKILL.md",[160,163,166,167],{"categoryNo":161,"categoryName":162,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":164,"categoryName":165,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":168,"categoryName":169,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000031","产品经理",[171,172,173,174,175,98,176,177,178,179,180,181,182,183,184,185,186,187,188,189],"best practices","remotion best practices","Remotion","react","sync","normalization","Video","Animation","Composition","Audio","page","math","discipline","publishing","camera","youtube","voiceover","patterns","remotion, video, react, animation, composition",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":197,"publishedAt":51},"01M6CNCXMSB1MKQ7646AR12VXY","rea","Find out exactly how a feature is implemented in a shipped tool or app you don't have the source for (desktop apps, Electron apps like Claude desktop, native CLIs like Codex, websites, APKs, .NET assemblies) using REA - Reverse Engineer Anything (github.com\u002Fmorluto\u002Frea). Sets REA up when it is missing (CLI, MCP registration, Hopper or Ghidra), routes the target to the right REA tool, keeps evidence out of the context window, and turns findings into a clean-room spec before any rebuild. Use when the user says 'use REA', 'reverse engineer', 'how does \u003Capp> do X', 'how is this feature implemented in \u003Ctool>', 'clone this feature', 'decompile', 'look inside the app', or asks how a closed-source competitor works. Skip it when the source is available - read the repo instead.","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Frea\u002FSKILL.md",[196],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[192,41,50,198,199,200,201,202,203,204,149,205,206,36,207,208,209,210,211,212],"reverse-engineering","ghidra","binary-analysis","analysis","how","reverse engineer anything","repo","context","evidence","engineer","rebuild","clean","registration","do","reverse engineer",{"skillNo":214,"name":215,"nameZh":6,"description":216,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":217,"categories":218,"keywords":227,"publishedAt":51},"01M6CNCSE0847Q1FP1GRQ75SR9","motion-graphics-promo","After Effects-style motion graphics for short product promos (15-45 s, vertical or landscape), built as code with HyperFrames + GSAP. Covers a story-first brief, motion grammar (energetic entry, one transition per task, spring settle, 2-3 s of stable proof), a 32-second promo timeline, device-frame and kinetic-type recipes, vertical-first composition, evidence rules (real UI only, no fake clicks), music licensing and encoded-frame verification. Use when the user asks for an After Effects-like animation, motion graphics, a kinetic-type promo, an app promo video, a product teaser, a Reels\u002FTikTok\u002FShorts ad, or 'animations like After Effects'. Also covers short explainers, tutorials and 15-second vertical ads: a design kit (footage beds, condensed caps in a marker box, white device frames, falling stickers, voice-over with music ducking) and HyperFrames render traps that silently break output. Pairs with hyperframes-best-practices (screencast pipeline) and remotion-best-practices.","https:\u002F\u002Fgithub.com\u002Fanton-abyzov\u002Fvskill\u002Fblob\u002Fmain\u002Fskills\u002Fmotion-graphics-promo\u002FSKILL.md",[219,222,223,224],{"categoryNo":220,"categoryName":221,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":164,"categoryName":165,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},{"categoryNo":225,"categoryName":226,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000032","设计师",[228,229,230,231,232,145,233,98,234,235,236,177,178,173,179,237,148,238,103,239],"graphics","motion graphics","motion","motion graphics promo","design","verification","ui","brief","pipeline","ads","short","tiktok"]