Agent skill

Google Workspace CLI

by laude-institute in laude-institute/headlong

Drives Google Drive, Gmail, Calendar, Sheets, Docs and Chat from the shell with the gws CLI, including its sign-in, flags, helper commands and safety rules.

Apache-2.0Auto-check passedProductivity & Automation

Install Google Workspace CLI

skills CLI
$ npx skills add laude-institute/headlong --skill googleworkspace -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install laude-institute/headlong googleworkspace --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/laude-institute/headlong.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/googleworkspace .claude/skills/googleworkspace && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
googleworkspace
GitHub stars
1.2k
Token cost
~1.2k tokens
SKILL.md length
189 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
Apache-2.0

At a glance

Drives Google Drive, Gmail, Calendar, Sheets, Docs and Chat from the shell with the gws CLI, including its sign-in, flags, helper commands and safety rules.

  • Sending an email or reading a calendar agenda from the terminal
  • SKILL.md covers Overview, Authentication, Global flags and Discovering commands, plus 9 more sections
  • Calls gcloud; needs GOOGLE_WORKSPACE_CLI_TOKEN
  • Listing or uploading Google Drive files without leaving the shell

What it does

The skill teaches the gws command line tool, whose commands are generated from Google's Discovery Service and follow the shape gws service resource method with flags. Helper commands prefixed with + give shortcuts for common jobs such as sending mail, showing the calendar agenda, reading a sheet range, appending to a doc and posting to a Chat space. Sign-in is a one-time interactive browser OAuth step through gws auth login.

Global flags cover URL parameters and JSON bodies, a --dry-run preview, auto-pagination, file upload and output as json, table, yaml or csv. The agent is told to inspect unfamiliar methods with gws service --help and gws schema before calling them, and to put Sheet ranges in double quotes to avoid zsh history expansion. Safety rules say to confirm with you before write or delete operations, prefer --dry-run for destructive ones and never print secrets or tokens. Exit codes separate success from API errors.

When your agent uses it

  • Sending an email or reading a calendar agenda from the terminal
  • Listing or uploading Google Drive files without leaving the shell
  • Reading or writing ranges in a Google Sheet from the command line
  • Posting a message to a Google Chat space after a task finishes

Example prompts

  • “Show my upcoming calendar events for this week with gws.”
  • “Read range A1:D10 from the Sheet1 tab of my budget spreadsheet.”
  • “Preview with --dry-run the call that would email alice@example.com a status update.”

Requirements

  • The gws CLI, signed in with gws auth login
  • A Google account with access to the services you use

What it can do on your machine

Read from SKILL.md and the folder at commit c43e597. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gcloud

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gcloud, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GOOGLE_WORKSPACE_CLI_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Google Workspace CLI loads about 1.2k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 189 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~23
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from laude-institute/headlong at commit c43e597, republished under its Apache-2.0 licence (© laude-institute). 189 words, ~1,166 tokens.

Download SKILL.mdSave it as .claude/skills/googleworkspace/SKILL.md (or your agent's skills folder).
name
googleworkspace
description
Manage Google Drive, Gmail, Calendar, Sheets, Docs, and Chat via the gws CLI

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

bash
# 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

FlagDescription
--params '{...}'URL/query parameters (JSON)
--json '{...}'Request body (JSON)
--dry-runPreview request without calling the API
--page-allAuto-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:

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

Gmail

bash
# 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

bash
# 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

bash
# 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

bash
# 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

bash
# 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

bash
# 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:
    bash
    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

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

© laude-institute, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/googleworkspace of laude-institute/headlong.

Open the folder on GitHubat commit c43e597

Compare with similar skills

Google Workspace CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Google Workspace CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Google Workspace CLI this skilllaude-institute/headlong1.2k—~1.2kAutomated safety check: PassApache-2.0
Google Workspace CLILeoYeAI/openclaw-master-skills2.2k—~2.6kAutomated safety check: NotesMIT
Prismer Google WorkspacePrismer-AI/PrismerCloud1.6k3 repos~4.2kAutomated safety check: PassMIT
Xs Google Workspacekaraage0703/ai-assistant-workspace136—~691Automated safety check: PassMIT
Composio Cloud Toolsquarqlabs/argus279—~543Automated safety check: PassApache-2.0
Recipe Save Email Attachmentsgoogleworkspace/cli31k—~262Automated safety check: PassApache-2.0

Similar skills

  • Google Workspace CLI

    LeoYeAI/openclaw-master-skills

    Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check: notes
  • Prismer Google Workspace

    Prismer-AI/PrismerCloud

    Gives an agent account-scoped access to Gmail, Calendar, Drive, Contacts, Docs and Sheets through the gws CLI or a bundled Python client.

    1.6k GitHub starsUsed in 3 repos~4.2k tokens
    Productivity & AutomationAuto-check passed
  • Xs Google Workspace

    karaage0703/ai-assistant-workspace

    gogcli経由でGmail・Google Drive・Google Calendarを操作するスキル。複数Googleアカウント対応。「メールチェック」「メール確認して」「Driveにアップロード」「Driveのファイル」「Gmailで検索」で使用。

    136 GitHub stars~691 tokensUpdated 17 days ago
    Productivity & AutomationAuto-check passed
  • Composio Cloud Tools

    quarqlabs/argus

    Routes requests to external SaaS apps such as GitHub, Gmail, Google Calendar, Slack, Notion and Linear through cloud tools, with safeguards on irreversible actions.

    279 GitHub stars~543 tokensUpdated 4 mo ago
    Productivity & AutomationAuto-check passed
  • Find Gmail messages with attachments and save them to a Google Drive folder.

    31k GitHub stars~262 tokensUpdated 3 days ago
    Productivity & AutomationAuto-check passed
  • Google Workspace CLI

    alirezarezvani/claude-skills

    Google Workspace administration via the gws CLI (github.com/googleworkspace/cli).

    28k GitHub stars~3k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check: notes

More from laude-institute/headlong

All 10 skills in this repo
  • Shellm Architecture Reference

    laude-institute/headlong

    Explains how shellm's bash-based recursive LLM shell fits together - its core engine, identity system, memory, skills and trajectory log.

    1.2k GitHub stars~2k tokensUpdated yesterday
    Auto-check: notes
  • ShellLM Skill Author

    laude-institute/headlong

    Scaffolds new ShellLM skills with the right frontmatter, directory layout and agent-facing writing style, so an agent can extend its own capabilities.

    1.2k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Web Research With curl

    laude-institute/headlong

    Looks things up online from the shell with curl: fetching pages, searching DuckDuckGo's HTML endpoint, stripping tags for readable text and pulling JSON APIs.

    1.2k GitHub stars~362 tokensUpdated yesterday
    Auto-check passed
  • Obsidian

    laude-institute/headlong

    Read, write, search, and manage notes in an Obsidian vault. An agent skill from laude-institute/headlong.

    1.2k GitHub stars~880 tokensUpdated yesterday
    Auto-check passed
  • Slack

    laude-institute/headlong

    Talk with people on Slack — recognize slack- senders and reach them via chat reply

    1.2k GitHub stars~831 tokensUpdated yesterday
    Auto-check passed
  • Telegram

    laude-institute/headlong

    Send and receive messages via the Telegram Bot API using curl

    1.2k GitHub stars~623 tokensUpdated yesterday
    Auto-check passed

Questions about Google Workspace CLI

What does Google Workspace CLI do?

Drives Google Drive, Gmail, Calendar, Sheets, Docs and Chat from the shell with the gws CLI, including its sign-in, flags, helper commands and safety rules. The skill teaches the gws command line tool, whose commands are generated from Google's Discovery Service and follow the shape gws service resource method with flags. Helper commands prefixed with + give shortcuts for common jobs such as sending mail, showing the calendar agenda, reading a sheet range, appending to a doc and posting to a Chat space.

When should I use Google Workspace CLI?

Google Workspace CLI fits situations like: sending an email or reading a calendar agenda from the terminal; listing or uploading Google Drive files without leaving the shell; reading or writing ranges in a Google Sheet from the command line; posting a message to a Google Chat space after a task finishes.

How do I install Google Workspace CLI in Claude Code?

Run `npx skills add laude-institute/headlong --skill googleworkspace -a claude-code`. Or copy the skill folder (skills/googleworkspace in laude-institute/headlong) into .claude/skills/googleworkspace in your project. Claude Code loads it when a task matches its description.

How do I install Google Workspace CLI in Codex?

Run `npx skills add laude-institute/headlong --skill googleworkspace -a codex`. Or copy the skill folder (skills/googleworkspace in laude-institute/headlong) into .agents/skills/googleworkspace in your project. Codex loads it when a task matches its description.

Can I use Google Workspace CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add laude-institute/headlong --skill googleworkspace -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/googleworkspace, .gemini/skills/googleworkspace, .github/skills/googleworkspace and .opencode/skills/googleworkspace in your project.

What does Google Workspace CLI need to run?

Going by SKILL.md and its folder, Google Workspace CLI needs the command-line tools its instructions call (gcloud) and credentials named GOOGLE_WORKSPACE_CLI_TOKEN. Our summary lists: The gws CLI, signed in with gws auth login; A Google account with access to the services you use.

Does Google Workspace CLI access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Google Workspace CLI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Google Workspace CLI use?

Google Workspace CLI is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Google Workspace CLI use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Google Workspace CLI?

Skills that share tags, products or a category with Google Workspace CLI: Google Workspace CLI (LeoYeAI/openclaw-master-skills, 2.2k stars), Prismer Google Workspace (Prismer-AI/PrismerCloud, 1.6k stars), Xs Google Workspace (karaage0703/ai-assistant-workspace, 136 stars) and Composio Cloud Tools (quarqlabs/argus, 279 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Google Workspace CLI?

laude-institute (a GitHub organization) maintains it in laude-institute/headlong, which has 1,216 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 9, 2026.

Source: laude-institute/headlong on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.