gws-cli

gws-cli is a skill for Claude Code, Codex from fabioeloi/gws-cli-skill. It costs 56 tokens per session (1,334 once invoked), scanned A, original, MIT.

A guide for using the Google Workspace CLI, a command-line program for working with services such as Drive, Gmail, Sheets, Docs, Calendar, and Chat. It explains how to inspect available commands, authenticate, and request structured results.

In plain words
What is it for?
Use it to check installation and authentication, inspect a service's command schema, run read-only requests, validate risky changes with a dry run, and automate Workspace tasks.
Why use it?
It helps agents make Google Workspace requests safely and repeatably without guessing API parameters or writing one-off web requests.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fabioeloi/gws-cli-skill/gws-cli
Any agent
npx skills add fabioeloi/gws-cli-skill --skill gws-cli
Clone the repo
git clone --depth 1 https://github.com/fabioeloi/gws-cli-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gws-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/fabioeloi/gws-cli-skill/gws-cli.svg)](https://agentmods.dev/skills/fabioeloi/gws-cli-skill/gws-cli)
Your own site
<a href="https://agentmods.dev/skills/fabioeloi/gws-cli-skill/gws-cli"><img src="https://agentmods.dev/badge/skills/fabioeloi/gws-cli-skill/gws-cli.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,334 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00056 $0.01334
Opus 5 $0.00028 $0.00667
Sonnet 5 $0.00011 $0.00267
Haiku 4.5 $0.00006 $0.00133

Measured 4d ago against content hash 3687386d8c58, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gws-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/check-prereqs.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

gws-cli/SKILL.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gws-cli

Use this skill when the task should be executed through the Google Workspace CLI instead of handwritten HTTP requests or ad hoc API wrappers.

When to use this skill

  • The user asks to interact with Google Drive, Gmail, Sheets, Docs, Slides, Calendar, Chat, Tasks, People, Meet, or Workspace Admin APIs.
  • The user wants structured JSON output that is easy for an agent to inspect.
  • The user needs to inspect Google API schemas before building a request.
  • The user wants a repeatable CLI workflow that can run locally, in CI, or in a headless environment.

Required operating model

  1. Confirm that gws is installed and available on PATH.
  2. Check authentication status before making API calls.
  3. Inspect the target method with gws schema or gws <service> --help before composing flags.
  4. Prefer read-only commands first.
  5. For write, update, or delete operations, confirm intent with the user before execution.
  6. Prefer --dry-run when the command supports local validation and the operation is risky.

Quick start

# Install the CLI
npm install -g @googleworkspace/cli

# Check the binary and auth status
bash scripts/check-prereqs.sh

# Inspect command space
gws drive --help
gws schema drive.files.list

# Run a read-only command
gws drive files list --params '{"pageSize": 10}' --format json

Authentication workflow

Choose the lightest auth flow that satisfies the task.

Local interactive

gws auth setup
gws auth login

Service account

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
gws auth status

CI or headless flows

  • Prefer exported credentials or service-account based execution.
  • Never echo secrets back to the user.
  • If credentials are missing, stop and ask for the appropriate auth setup instead of guessing.

More detail is in references/REFERENCE.md.

Command discovery workflow

Always inspect before executing.

# Browse resources and helper commands for a service
gws sheets --help

# Inspect a specific method schema
gws schema sheets.spreadsheets.values.get

Read the full file on GitHub · 153 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 153 lines · 56 tokens per session scan A 3687386d8c58

Subscribe to this mod's changes

gws-cli is a skill published in the GitHub repository fabioeloi/gws-cli-skill (7 stars, last pushed 6mo ago), licensed MIT. It adds 56 tokens to every session and 1,334 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.