gws-setup

jezweb/claude-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/jezweb/claude-skills --skill gws-setup
0 commentsdiscussion
summary

Set up the gws CLI (@googleworkspace/cli) with OAuth credentials and 90+ agent skills for Claude Code. Produces a fully authenticated CLI with skills for Gmail, Drive, Calendar, Sheets, Docs, Chat, Tasks, and more.

skill.md

Google Workspace CLI — First-Time Setup

Set up the gws CLI (@googleworkspace/cli) with OAuth credentials and 90+ agent skills for Claude Code. Produces a fully authenticated CLI with skills for Gmail, Drive, Calendar, Sheets, Docs, Chat, Tasks, and more.

Prerequisites

  • Node.js 18+
  • A Google account (personal or Workspace)
  • Access to Google Cloud Console (console.cloud.google.com)

Workflow

Step 1: Pre-flight Checks

Check what's already done and skip completed steps:

# Check if gws is installed
which gws && gws --version

# Check if client_secret.json exists
ls ~/.config/gws/client_secret.json

# Check if already authenticated
gws auth status

If gws auth status shows "status": "success" with scopes, skip to Step 6 (Install Skills).

Step 2: Install the CLI

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

Step 3: Create a GCP Project and OAuth Credentials

The user needs to create OAuth Desktop App credentials in Google Cloud Console. Walk them through each step.

3a. Create or select a GCP project:

Direct the user to: https://console.cloud.google.com/projectcreate

Or use an existing project. Ask the user which they prefer.

3b. Enable Google Workspace APIs:

Direct the user to the API Library for their project: https://console.cloud.google.com/apis/library?project=PROJECT_ID

Enable these APIs (search for each):

  • Gmail API
  • Google Drive API
  • Google Calendar API
  • Google Sheets API
  • Google Docs API
  • Google Chat API (requires extra Chat App config — see below)
  • Tasks API
  • People API
  • Google Slides API
  • Google Forms API
  • Admin SDK API (optional — for Workspace admin features)

3c. Configure Google Chat App (required for Chat API):

Enabling the Chat API alone isn't enough — Google requires a Chat App configuration even for user-context OAuth access. Without this, all Chat API calls return errors.

Direct the user to: https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat?project=PROJECT_ID

  1. Click the Configuration tab
  2. Fill in app details (name, avatar, description — values don't matter for CLI use)
  3. Under "Functionality", check Spaces and group conversations
  4. Under "Connection settings", select Apps Script or HTTP endpoint (pick any — we just need the config to exist)
  5. Save

This creates the app identity that the Chat API requires. Messages sent via gws still appear as coming from the authenticated user (OAuth user context), not from a bot.

3e. Configure OAuth consent screen:

Direct the user to: https://console.cloud.google.com/apis/credentials/consent?project=PROJECT_ID

Settings:

  • User Type: External (works for any Google account)
  • App name: gws CLI (or any name)
  • User support email: their email
  • Developer contact: their email
  • Leave scopes blank (gws requests scopes at login time)
  • Add their Google account as a test user (required while app is in "Testing" status)
  • Save and continue through all screens

3f. Create OAuth client ID:

Direct the user to: https://console.cloud.google.com/apis/credentials?project=PROJECT_ID

  1. Click Create CredentialsOAuth client ID
  2. Application type: Desktop app
  3. Name: gws CLI
  4. Click Create
  5. Copy the JSON or download the client_secret_*.json file

3g. Save the credentials:

Ask the user to provide the client_secret.json content (paste the JSON or provide the downloaded file path).

mkdir -p ~/.config/gws

Write the JSON to ~/.config/gws/client_secret.json. The expected format:

{
  "installed": {
    "client_id": "...",
    "project_id": "...",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "client_secret": "...",
    "redirect_uris": ["http://localhost"]
  }
}

Step 4: Choose Scopes

Ask the user what level of access they want:

Option Command What it grants
Full access (recommended) gws auth login --full All Workspace scopes including admin, pubsub, cloud-platform
Core services gws auth login -s gmail,drive,calendar,sheets,docs,chat,tasks Most-used services only
Minimal gws auth login -s gmail,calendar Just email and calendar

Recommend full access for power users. The OAuth consent screen shows all requested scopes so the user can review before granting.

Note: If the GCP app is in "Testing" status, scope selection is limited to ~25 scopes. Use -s service1,service2 to request targeted scopes, or publish the app (Publish → In Production) for broader scope access.

Step 5: Authenticate

IMPORTANT: This step prints a very long OAuth URL (30+ scopes) that the user must open in their browser. The URL is too long to copy from terminal output — it wraps across lines and breaks. Always extract it to a file and open it programmatically.

  1. Run the login command and capture the output:
gws auth login --full 2>&1 | tee /tmp/gws-auth-output.txt
# Or with specific services:
# gws auth login -s gmail,drive,calendar,sheets,docs,chat,tasks 2>&1 | tee /tmp/gws-auth-output.txt

Running as a background task is fine — it will complete once the user approves in browser.

  1. Extract and open the URL (run separately after output appears):
grep -o 'https://accounts.google.com[^ ]*' /tmp/gws-auth-output.txt > /tmp/gws-auth-url.txt
cat /tmp/gws-auth-url.txt | xargs open

If open doesn't work, tell the user: "The auth URL is saved at /tmp/gws-auth-url.txt — open that file and copy the URL."

  1. Wait for the user to approve in their browser.

After browser approval, gws stores encrypted credentials at ~/.config/gws/credentials.enc.

Verify:

gws auth status

Should show "status": "success" with the authenticated account and granted scopes.

Step 6: Install Agent Skills

Install the 90+ gws agent skills globally for Claude Code:

npx skills add googleworkspace/cli -g --agent claude-code --all

Verify skills are installed:

ls ~/.claude/skills/gws-* | wc -l

Should show 30+ gws skill directories.

Step 7: Save Credentials for Other Machines

If the user has other machines to set up, suggest exporting the client credentials:

gws auth export

This prints decrypted credentials (including refresh token) to stdout. The client_secret.json file is the portable part — the same OAuth client can be used on any machine, with gws auth login generating fresh user tokens per machine.

Tell the user to save the client_secret.json content somewhere secure (password manager, encrypted note) for use with the gws-install skill on other machines.

Step 8: Verify Everything Works

Run a few commands to confirm:

# Check auth
gws auth status

# Check calendar
gws calendar +agenda --today

# Check email
gws gmail +triage

If any command fails with auth errors, re-run gws auth login with the needed scopes.


Critical Patterns

Testing vs Production OAuth Apps

GCP OAuth apps start in "Testing" status with a 7-day token expiry and ~25 scope limit. For long-term use:

  • Push the app to Production in the OAuth consent screen settings
  • Production apps have no token expiry limit
  • For personal/internal use, Google does not require verification

Scope Reference

Service flag What it enables
gmail Send, read, manage email, labels, filters
drive Files, folders, shared drives
calendar Events, calendars, free/busy
sheets Read and write spreadsheets
docs Read and write documents
chat Spaces, messages
tasks Task lists and tasks
slides Presentations
forms Forms and responses
people Contacts and profiles
admin Workspace admin (directory, devices, groups)

Environment Variable Alternative

Instead of client_secret.json, credentials can be provided via environment variables:

export GOOGLE_WORKSPACE_CLI_CLIENT_ID="your-client-id"
export GOOGLE_WORKSPACE_CLI_CLIENT_SECRET="your-client-secret"
gws auth login

Config Directory

All gws config lives in ~/.config/gws/:

File Purpose
client_secret.json OAuth client credentials (portable)
credentials.enc Encrypted user tokens (per-machine)
token_cache.json Token refresh cache
cache/ API discovery schema cache

See Also

  • gws-install — Quick setup on additional machines with existing credentials
  • gws-shared — Auth patterns and global flags for gws commands
how to use gws-setup

How to use gws-setup on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add gws-setup
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/jezweb/claude-skills --skill gws-setup

The skills CLI fetches gws-setup from GitHub repository jezweb/claude-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/gws-setup

Reload or restart Cursor to activate gws-setup. Access the skill through slash commands (e.g., /gws-setup) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.828 reviews
  • Shikha Mishra· Dec 20, 2024

    gws-setup has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Kabir Ramirez· Dec 8, 2024

    gws-setup is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Kaira Kapoor· Nov 27, 2024

    Keeps context tight: gws-setup is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Yash Thakker· Nov 11, 2024

    Solid pick for teams standardizing on skills: gws-setup is focused, and the summary matches what you get after install.

  • Valentina Sanchez· Oct 18, 2024

    Registry listing for gws-setup matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Dhruvi Jain· Oct 2, 2024

    We added gws-setup from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • William Torres· Sep 9, 2024

    Useful defaults in gws-setup — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Sakura Ramirez· Sep 1, 2024

    gws-setup has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • William Diallo· Aug 28, 2024

    gws-setup has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Ren Kapoor· Aug 20, 2024

    Useful defaults in gws-setup — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

showing 1-10 of 28

1 / 3