Index of every page on this site: llms.txt
All skills
laude-institute avatar

/googleworkspace

@8db84fd
Run it yourself

Manage Google Drive, Gmail, Calendar, Sheets, Docs, and Chat via the gws CLI

  • 1 file
  • 4.6 KB
  • Updated 7 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/laude-institute/headlong/googleworkspace

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈23 tokens for metadata: the name and description. ≈1.1k when used: this file.

Description uses 1.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈94 characters, or 1.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

googleworkspace — Google Workspace via the gws CLI

Overview

The gws CLI provides access to Google Workspace APIs (Drive, Gmail, Calendar, Sheets, Docs, Chat, and more). Commands are dynamically generated from Google's Discovery Service.

gws <service> <resource> <method> [flags]

Helper commands (prefixed with +) provide shortcuts for common workflows.

Authentication

# Browser-based OAuth (interactive, one-time)
gws auth login

# Or use an existing access token
export GOOGLE_WORKSPACE_CLI_TOKEN=$(gcloud auth print-access-token)

Global flags

Flag Description
--params '{...}' URL/query parameters (JSON)
--json '{...}' Request body (JSON)
--dry-run Preview request without calling the API
--page-all Auto-paginate all results (NDJSON output)
--upload <PATH> Upload file content (multipart)
--format <FMT> Output format: json (default), table, yaml, csv

Discovering commands

Always inspect before calling an unfamiliar method:

gws <service> --help
gws schema <service>.<resource>.<method>

Gmail

# Send an email
gws gmail +send --to alice@example.com --subject "Hello" --body "Hi there"

# Unread inbox summary
gws gmail +triage

# Read a message body
gws gmail +read --message-id MESSAGE_ID

# Reply to a message (threading handled automatically)
gws gmail +reply --message-id MESSAGE_ID --body "Thanks!"

# Reply-all
gws gmail +reply-all --message-id MESSAGE_ID --body "Acknowledged"

# Forward a message
gws gmail +forward --message-id MESSAGE_ID --to bob@example.com

# Watch for new emails (streams NDJSON)
gws gmail +watch

# List messages via API
gws gmail users messages list --params '{"maxResults": 10}'

Calendar

# Show upcoming events
gws calendar +agenda

# Show agenda in a specific timezone
gws calendar +agenda --timezone America/New_York

# Create an event
gws calendar +insert --title "Standup" --time "2026-05-02T09:00:00"

# List events via API
gws calendar events list --params '{"calendarId": "primary", "maxResults": 5}'

# Check free/busy
gws calendar freebusy query --json '{"timeMin": "...", "timeMax": "...", "items": [{"id": "primary"}]}'

Drive

# List files
gws drive files list --params '{"pageSize": 10}'

# Upload a file
gws drive +upload ./report.pdf --name "Q1 Report"

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

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

# Create a folder
gws drive files create --json '{"name": "Projects", "mimeType": "application/vnd.google-apps.folder"}'

Sheets

# Read a range
gws sheets +read --spreadsheet SPREADSHEET_ID --range "Sheet1!A1:D10"

# Append a row
gws sheets +append --spreadsheet SPREADSHEET_ID --values "Alice,95,A"

# Read via API
gws sheets spreadsheets values get \
  --params '{"spreadsheetId": "ID", "range": "Sheet1!A1:C10"}'

# Append via API
gws sheets spreadsheets values append \
  --params '{"spreadsheetId": "ID", "range": "Sheet1!A1", "valueInputOption": "USER_ENTERED"}' \
  --json '{"values": [["Name", "Score"], ["Alice", 95]]}'

# Create a new spreadsheet
gws sheets spreadsheets create --json '{"properties": {"title": "Q1 Budget"}}'

Docs

# Append text to a document
gws docs +write --document-id DOC_ID --text "New paragraph of text"

# Get document content
gws docs documents get --params '{"documentId": "DOC_ID"}'

Chat

# Send a message to a space
gws chat +send --space-id spaces/SPACE_ID --text "Deploy complete."

# List spaces
gws chat spaces list

Shell tips

  • zsh ! expansion: Sheet ranges like Sheet1!A1 contain ! which zsh interprets as history expansion. Always use double quotes for ranges:
    gws sheets +read --spreadsheet ID --range "Sheet1!A1:D10"
  • JSON quoting: Wrap --params and --json values in single quotes so the shell doesn't interpret the inner double quotes.

Safety rules

  • Confirm with the user before executing write or delete operations.
  • Prefer --dry-run for destructive operations until the user confirms.
  • Never output secrets, API keys, or tokens directly.

Exit codes

Code Meaning
0 Success
1 API error (4xx/5xx)
2 Auth error
3 Validation error
4 Discovery error
5 Internal error

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 8db84fd. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 7 months ago
Other metadata
metadata
{
  "shelllm": {
    "requires": {
      "bins": [
        "gws"
      ]
    }
  }
}

README badge

README badge for laude-institute/headlong/googleworkspace