gws-shared

gws CLI shared patterns for authentication, global flags, and output formatting. Read this before using any other gws-* skill.

Best use case

gws-shared is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

gws CLI shared patterns for authentication, global flags, and output formatting. Read this before using any other gws-* skill.

Teams using gws-shared should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/gws-shared/SKILL.md --create-dirs "https://raw.githubusercontent.com/nvdigitalsolutions/mcp-ai-wpoos/main/addons/pro/includes/bundled-skills/gws-shared/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/gws-shared/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How gws-shared Compares

Feature / Agentgws-sharedStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

gws CLI shared patterns for authentication, global flags, and output formatting. Read this before using any other gws-* skill.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# gws — Shared Reference

`gws` is a unified CLI for all Google Workspace APIs. It reads Google's Discovery Service at runtime, so every Workspace API endpoint is available without custom integration code.

## Installation

```bash
npm install -g @googleworkspace/cli
gws --version
```

## Authentication

### Interactive (desktop / laptop)

```bash
gws auth setup    # One-time: creates Cloud project, enables APIs, logs you in (requires gcloud)
gws auth login    # Subsequent scope selection and login
```

Log in with specific services to stay within testing-mode scope limits:

```bash
gws auth login -s drive,gmail,calendar,sheets
```

### Service Account (server / CI)

```bash
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/service-account.json
gws drive files list   # Works without interactive login
```

### Pre-obtained access token

```bash
export GOOGLE_WORKSPACE_CLI_TOKEN=$(gcloud auth print-access-token)
```

### Headless / CI export flow

```bash
# On machine with browser
gws auth export --unmasked > credentials.json

# On headless machine
export GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE=/path/to/credentials.json
```

## CLI Syntax

```bash
gws <service> <resource> [sub-resource] <method> [flags]
```

## Global Flags

| Flag | Description |
|------|-------------|
| `--format <FORMAT>` | Output format: `json` (default), `table`, `yaml`, `csv` |
| `--dry-run` | Validate request locally without calling the API |
| `--sanitize <TEMPLATE>` | Screen responses through Model Armor |

## Method Flags

| Flag | Description |
|------|-------------|
| `--params '{"key": "val"}'` | URL / query parameters |
| `--json '{"key": "val"}'` | Request body |
| `-o, --output <PATH>` | Save binary responses to file |
| `--upload <PATH>` | Upload file content (multipart) |
| `--page-all` | Auto-paginate (NDJSON output) |
| `--page-limit <N>` | Max pages when using `--page-all` (default: 10) |
| `--page-delay <MS>` | Delay between pages in ms (default: 100) |

## Discovering Commands

```bash
# Browse all services
gws --help

# Browse a service's resources
gws drive --help

# Inspect a specific method's schema
gws schema drive.files.list
gws schema gmail.users.messages.send
```

## Shell Tips

### zsh `!` expansion in ranges

Sheet ranges like `Sheet1!A1` contain `!` which zsh interprets as history expansion. Use double quotes:

```bash
# WRONG (zsh mangles the !)
gws sheets +read --spreadsheet ID --range 'Sheet1!A1:D10'

# CORRECT
gws sheets +read --spreadsheet ID --range "Sheet1!A1:D10"
```

### JSON with inner double quotes

```bash
gws drive files list --params '{"pageSize": 5}'
```

## Security Rules

- **Never** output secrets, tokens, or API keys in responses
- **Always** confirm with the user before executing write or delete commands
- Prefer `--dry-run` for any destructive or sending operation
- Use `--sanitize` for PII screening when processing user-generated content

## MCP Server (for AI agents)

```bash
# Start a built-in MCP server exposing selected APIs
gws mcp -s drive,gmail,calendar,sheets
```

This exposes all methods of the selected services as MCP tools, giving any MCP-compatible AI agent direct Workspace access without additional integration code.

Related Skills

webapp-testing

5
from nvdigitalsolutions/mcp-ai-wpoos

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

web-artifacts-builder

5
from nvdigitalsolutions/mcp-ai-wpoos

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

valyu

5
from nvdigitalsolutions/mcp-ai-wpoos

Search the live web and 36+ specialised data sources including SEC filings, PubMed, ChEMBL, clinical trials, FRED economic indicators, and patent databases. Use when current, authoritative, or paywalled data is required.

ui-ux-pro-max

5
from nvdigitalsolutions/mcp-ai-wpoos

AI-powered design intelligence with 67 UI styles, 161 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 15+ tech stacks. Generates complete design systems for any product type with industry-specific reasoning rules.

theme-factory

5
from nvdigitalsolutions/mcp-ai-wpoos

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

slack-gif-creator

5
from nvdigitalsolutions/mcp-ai-wpoos

Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."

skill-creator

5
from nvdigitalsolutions/mcp-ai-wpoos

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

shannon

5
from nvdigitalsolutions/mcp-ai-wpoos

Autonomous AI security pen testing. Executes real exploits against web applications to find SQL injection, XSS, SSRF, authentication flaws, and IDOR vulnerabilities. Reports only confirmed, reproducible findings — no false positives.

remotion

5
from nvdigitalsolutions/mcp-ai-wpoos

Create programmatic videos using React and Remotion. Translate natural language descriptions into working Remotion components for product demos, release announcements, explainer videos, and animated content.

planetscale

5
from nvdigitalsolutions/mcp-ai-wpoos

Design schemas and write queries for PlanetScale serverless MySQL using branch-based workflows. Ensures index coverage, avoids foreign key anti-patterns, and treats every schema change as a reviewable, reversible deploy request.

mcp-builder

5
from nvdigitalsolutions/mcp-ai-wpoos

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

karpathy-coding-principles

5
from nvdigitalsolutions/mcp-ai-wpoos

Apply Karpathy-inspired coding behavior guidelines — think before coding, prefer simplicity, make surgical changes, and execute toward verifiable goals. Reduces wrong assumptions, overengineering, and unintended side-effects.