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.
npx agentmods add instructions/googleworkspace/cli/agents-mdgit clone --depth 1 https://github.com/googleworkspace/cliWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02700 | $0.02700 |
| Opus 5 | $0.01350 | $0.01350 |
| Sonnet 5 | $0.00540 | $0.00540 |
| Haiku 4.5 | $0.00270 | $0.00270 |
Grade A, and why
cli AGENTS.md 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 yesterday.
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- googleworkspacecli AGENTS.md — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Project Overview
gws is a Rust CLI tool for interacting with Google Workspace APIs. It dynamically generates its command surface at runtime by parsing Google Discovery Service JSON documents.
[!IMPORTANT] Dynamic Discovery: This project does NOT use generated Rust crates (e.g.,
google-drive3) for API interaction. Instead, it fetches the Discovery JSON at runtime and buildsclapcommands dynamically. When adding a new service, you only need to register it incrates/google-workspace/src/services.rsand verify the Discovery URL pattern incrates/google-workspace/src/discovery.rs. Do NOT add new crates toCargo.tomlfor standard Google APIs.
[!NOTE] Package Manager: Use
pnpminstead ofnpmfor Node.js package management in this repository.
Build & Test
[!IMPORTANT] Test Coverage: The
codecov/patchcheck requires that new or modified lines are covered by tests. When adding code, extract testable helper functions rather than embedding logic inmain/runwhere it's hard to unit-test. Runcargo testlocally and verify new branches are exercised.
cargo build # Build in dev mode
cargo clippy -- -D warnings # Lint check
cargo test # Run tests
Changesets
Every PR must include a changeset file. Create one at .changeset/<descriptive-name>.md:
---
"@googleworkspace/cli": patch
---
Brief description of the change
Use patch for fixes/chores, minor for new features, major for breaking changes. The CI policy check will fail without a changeset.
Architecture
The CLI uses a two-phase argument parsing strategy:
- Parse argv to extract the service name (e.g.,
drive) - Fetch the service's Discovery Document, build a dynamic
clap::Commandtree, then re-parse
Workspace Layout
The repository is a Cargo workspace with two crates:
| Crate | Package | Purpose |
|---|---|---|
crates/google-workspace/ |
google-workspace |
Publishable library — core types and helpers |
crates/google-workspace-cli/ |
google-workspace-cli |
Binary crate — the gws CLI |
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.
- yesterday First seen · 240 lines · 2,700 tokens per session scan A 5e64cee7455c
cli AGENTS.md is an instructions file published in the GitHub repository googleworkspace/cli (30,651 stars, last pushed 6d ago), licensed Apache-2.0. It adds 2,700 tokens to every session, about $0.0135 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.
Other instructions, from other repositories
google_workspace_mcp general.instructions.md
Instructions for taylorwilsdon/google_workspace_mcp, covering 📄 project context, 🎯 review goals & priorities, 🚦 low‑value feedback to skip, 🧭 review structure template and ✅ gmail.sendmessage – input schema issue.
gws-mcp-server CLAUDE.md
Instructions for conorbronsdon/gws-mcp-server, covering gws-mcp-server, architecture, key constraints, development and testing.
better-workspace-mcp CLAUDE.md
Claude Code instructions for n24q02m/better-workspace-mcp, covering better-workspace-mcp, vendored boundary, sync upstream, modes and env cua http mode.
gws-connector AGENTS.md
AGENTS.md instructions for orieg/gws-connector, covering agents.md, what this project is, build, test, lint, codebase map and conventions.
better-workspace-mcp AGENTS.md
AGENTS.md instructions for n24q02m/better-workspace-mcp, covering agent collaboration, quick reference, build & test, release and conventions.
gws-connector copilot-instructions.md
Copilot instructions for orieg/gws-connector, covering copilot code review instructions, project overview, architecture, review focus areas and security (high priority).