agentleFS
Cor-IncorporatedCor-Incorporated/claude-code-skills/skills/gws-workspace/SKILL.md

gws-workspace

Skill5 starsChanged 2 months agoMITView on GitHub

Google Workspace CLI operations via gws (Drive/Sheets/Docs/Slides/Calendar/Gmail). Use when a user asks to search, list, read, export, upload, or update files on Google Drive; read/write Google Sheets or Docs; manage Calendar events; send/search Gmail; or troubleshoot gws auth/access errors. Triggers: 'Google Drive', 'Sheets', 'Docs', 'Slides', 'gws', 'spreadsheet', 'ドライブ', 'スプレッドシート'. Do NOT use for: MCP-native Gmail/Calendar operations (prefer mcp__claude_ai_Gmail/Google_Calendar when available), local file operations, or non-Google cloud storage.

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only first: always confirm access with a read command before writes

    line 18
  2. Distinctive:

    Confirm before writes: never execute write/delete without user approval

    line 19
  3. Very specific:

    MCP fallback: If mcp__claude_ai_Gmail__* or mcp__claude_ai_Google_Calendar__* tools are available, prefer those for Gmail/Calendar tasks

    line 21
  4. Very specific:

    401/403: Run gws auth login to re-authenticate

    line 137
  5. Distinctive:

    404: Verify file/spreadsheet ID is correct

    line 138
  6. Very specific:

    Rate limit: Add --page-delay 500 for bulk operations </important>

    line 139

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Google Workspace CLI (gws)

Prerequisites

  1. gws must be on $PATH (npm install -g @googleworkspace/cli)
  2. Auth: gws auth login (browser OAuth) or GOOGLE_APPLICATION_CREDENTIALS env var
  3. Check auth: NODE_NO_WARNINGS=1 gws auth status

Important

  • Always suppress Node warnings: prefix commands with NODE_NO_WARNINGS=1
  • Read-only first: always confirm access with a read command before writes
  • Confirm before writes: never execute write/delete without user approval
  • Use --dry-run for destructive operations
  • MCP fallback: If mcp__claude_ai_Gmail__* or mcp__claude_ai_Google_Calendar__* tools are available, prefer those for Gmail/Calendar tasks

Quick Reference

# Syntax
NODE_NO_WARNINGS=1 gws <service> <resource> <method> [flags]

# Inspect any method before calling
NODE_NO_WARNINGS=1 gws schema <service>.<resource>.<method>

Core Services

<important if="working with Google Drive files, folders, uploads, downloads, or exports"> ### Drive — files, folders, shared drives
# List files
gws drive files list --params '{"pageSize": 10}'

# Search
gws drive files list --params '{"q": "name contains '\''report'\''", "pageSize": 10}'

# Get file metadata
gws drive files get --params '{"fileId": "ID", "fields": "name,mimeType,size"}'

# Download
gws drive files get --params '{"fileId": "ID", "alt": "media"}' -o output.pdf

# Upload
gws drive +upload --file local.pdf --name "Report.pdf" --parent FOLDER_ID

# Export Google Doc as PDF
gws drive files export --params '{"fileId": "ID", "mimeType": "application/pdf"}' -o doc.pdf
</important><important if="reading or writing Google Sheets spreadsheet data"> ### Sheets — read/write spreadsheets
# Read values
gws sheets +read --spreadsheet ID --range 'Sheet1!A1:D10'

# Read entire sheet
gws sheets +read --spreadsheet ID --range Sheet1

# Append row
gws sheets +append --spreadsheet ID --range 'Sheet1!A:D' --values '[["a","b","c","d"]]'

# Get spreadsheet metadata
gws sheets spreadsheets get --params '{"spreadsheetId": "ID"}'
</important><important if="reading or writing Google Docs documents"> ### Docs — read/write documents
# Get doc metadata
gws docs documents get --params '{"documentId": "ID"}'

# Append text
gws docs +write --document ID --text "Appended text"
</important><important if="working with Google Slides presentations"> ### Slides — presentations
# Get presentation
gws slides presentations get --params '{"presentationId": "ID"}'
</important><important if="sending or searching Gmail via gws CLI"> ### Gmail
# List messages
gws gmail users messages list --params '{"userId": "me", "maxResults": 10}'

# Search
gws gmail users messages list --params '{"userId": "me", "q": "from:user@example.com"}'

# Send
gws gmail +send --to user@example.com --subject "Subject" --body "Body"
</important><important if="listing or creating Google Calendar events via gws CLI"> ### Calendar
# List events
gws calendar events list --params '{"calendarId": "primary", "maxResults": 10}'

# Insert event
gws calendar +insert --calendar primary --summary "Meeting" --start "2026-03-12T10:00:00+09:00" --end "2026-03-12T11:00:00+09:00"
</important>

Global Flags

FlagDescription
--format json|table|yaml|csvOutput format (default: json)
--dry-runValidate without API call
--page-allAuto-paginate (NDJSON)
--page-limit NMax pages (default: 10)
<important if="troubleshooting gws authentication or API errors"> ## Error Handling
  • 401/403: Run gws auth login to re-authenticate
  • 404: Verify file/spreadsheet ID is correct
  • Rate limit: Add --page-delay 500 for bulk operations</important>

Discovery

# Browse all services
gws --help

# Browse service resources
gws drive --help

# Inspect method params
gws schema drive.files.list

For detailed API reference per service, see references/ directory.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.