google-workspace

google-workspace is a skill for Claude Code, Codex from espennilsen/pi. It costs 145 tokens per session (3,299 once invoked), scanned A, original, MIT.

A command-line interface for managing Google Workspace services, including Drive, Gmail, Sheets, Docs, Slides, Contacts, Chat, Meet, and Forms.

In plain words
What is it for?
Use it to read or modify Workspace data, send email or messages, manage files and contacts, and run cross-service workflows.
Why use it?
It lets an agent perform related Google Workspace operations through one command format, with options for output, validation, permissions, and response filtering.

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/espennilsen/pi/google-workspace
Any agent
npx skills add espennilsen/pi --skill google-workspace
Clone the repo
git clone --depth 1 https://github.com/espennilsen/pi

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 google-workspace

README.md
[![agentmods](https://agentmods.dev/badge/skills/espennilsen/pi/google-workspace.svg)](https://agentmods.dev/skills/espennilsen/pi/google-workspace)
Your own site
<a href="https://agentmods.dev/skills/espennilsen/pi/google-workspace"><img src="https://agentmods.dev/badge/skills/espennilsen/pi/google-workspace.svg" alt="Measured on agentmods" height="20"></a>
Per session 145 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,299 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.00145 $0.03299
Opus 5 $0.00072 $0.01649
Sonnet 5 $0.00029 $0.00660
Haiku 4.5 $0.00015 $0.00330

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

Security

Grade A, and why

google-workspace 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.

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.

skills/google-workspace/SKILL.md · 246 lines

How it starts

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

Google Workspace CLI (gws)

Interact with Google Workspace services via the gws CLI. This skill covers all supported services, helper shortcuts, cross-service workflows, role-based personas, and multi-step recipes.

Installation & Auth

The gws binary must be on $PATH. Version: 0.16.0+.

# Browser-based OAuth (interactive)
gws auth login

# Service Account
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json

# Check status
gws auth status

Auth Flags

Flag Description
--readonly Request read-only scopes
--full Request all scopes incl. pubsub + cloud-platform
--scopes Comma-separated custom scopes
-s, --services Limit scope picker to specific services (e.g. -s drive,gmail)

CLI Syntax

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

Global Flags

Flag Description
--format <FMT> Output format: json (default), table, yaml, csv
--dry-run Validate locally without calling the API
--sanitize <TEMPLATE> Screen responses through Model Armor
--params '{"key": "val"}' URL/query parameters
--json '{"key": "val"}' Request body
-o, --output <PATH> Save binary responses to file
--upload <PATH> Upload file content (multipart)
--page-all Auto-paginate (NDJSON output)
--page-limit <N> Max pages with --page-all (default: 10)
--page-delay <MS> Delay between pages in ms (default: 100)

Discovering Commands

gws <service> --help                    # Browse resources and methods
gws schema <service.resource.method>    # Inspect params, types, defaults

Shell Tips

  • zsh ! expansion: Use double quotes for sheet ranges: --range "Sheet1!A1:D10"
  • JSON with double quotes: Wrap --params/--json in single quotes: --params '{"pageSize": 5}'

Security Rules

  • Never output secrets (API keys, tokens) directly
  • Always confirm with user before executing write/delete commands
  • Prefer --dry-run for destructive operations
  • Use --sanitize for PII/content safety screening

Read the full file on GitHub · 246 lines

Files

What ships with it

60 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 · 246 lines · 145 tokens per session scan A 51fd5e472d3e

Subscribe to this mod's changes

google-workspace is a skill published in the GitHub repository espennilsen/pi (117 stars, last pushed 12d ago), licensed MIT. It adds 145 tokens to every session and 3,299 once invoked, about $0.0007 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-30.