google-workspace
Skill9 starsChanged 8 months agoMITView on GitHub
Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration via gws CLI (googleworkspace/cli). Uses OAuth2 with automatic token refresh via bridge script. Requires gws binary.
- Installs packages
29 other projects use a version of this, 16 of them edited.
Adopted by
Most recently taken up by
- NousResearch/hermes-agentedited, first seen Nov 13, 2026
- rakaarwaky/agents-arwakytheir own version, first seen Oct 6, 2026
- delorenj/skillsedited, first seen Oct 2, 2026
- google/adk-recipestheir own version, first seen Sep 28, 2026
- wundercorp/lokiedited, first seen Sep 11, 2026
- rmusser01/tldw-stuffedited, first seen Sep 6, 2026
Used with
Projects with it also use teams-meeting-pipeline and node-inspect-debugger.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
john-data-chenSkillteams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
Also in 7 projects that use this
kevinnftSkillnode-inspect-debugger
Debug Node.js via --inspect + Chrome DevTools Protocol CLI.
Also in 7 projects that use this
Other versions29 projects use a version of this.
Word for word · 0
None found.
Edited · 16
- NousResearch/hermes-agent★ 267k16% same
- aivrar/portable-hermes-agent★ 23217% same
- graniet/kheish★ 22188% same
- AtlasOmnia/donna-starter★ 12212% same
- AtlasOmnia/hermes-custom-pack★ 6112% same
- nickvasilescu/korgo-bot★ 3517% same
- wundercorp/loki★ 2417% same
- delorenj/skills★ 1517% same
- kevinnft/ai-agent-skills★ 1320% same
- Samin12/skills★ 916% same
6 more not listed
Wrote their own version · 13
- google/adk-recipes★ 10ksame name
- taracodlabs/aiden★ 846same name
- swarmclawai/swarmclaw★ 690same name
- HybridAIOne/hybridclaw★ 157same name
- AlexAI-MCP/hermes-CCC★ 135same name
- amanaiproduct/amans-skills★ 79same name
- ariffazil/arifOS★ 52same name
- claude-world/claude-agent★ 4same name
- CodeWithBehnam/cc-docs★ 2same name
- tunnckoCore/skills★ 2same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository56 other files it gives its agents.
- apple-notesSkill
- apple-remindersSkill
- findmySkill
- imessageSkill
- claude-codeSkill
- codexSkill
- zorro-agentSkill
- opencodeSkill
- ascii-artSkill
- ascii-videoSkill
- ideationSkill
- excalidrawSkill
- manim-videoSkill
- p5jsSkill
- popular-web-designsSkill
- songwriting-and-ai-musicSkill
- jupyter-live-kernelSkill
- webhook-subscriptionsSkill
- dogfoodSkill
- himalayaSkill
- minecraft-modpack-serverSkill
- pokemon-playerSkill
- codebase-inspectionSkill
- github-authSkill
- github-code-reviewSkill
- github-issuesSkill
- github-pr-workflowSkill
- github-repo-managementSkill
- find-nearbySkill
- mcporterSkill
- native-mcpSkill
- gif-searchSkill
- heartmulaSkill
- songseeSkill
- youtube-contentSkill
- huggingface-hubSkill
- obsidianSkill
- linearSkill
- nano-pdfSkill
- notionSkill
- ocr-and-documentsSkill
- powerpointSkill
- godmodeSkill
- arxivSkill
- blogwatcherSkill
- llm-wikiSkill
- polymarketSkill
- research-paper-writingSkill
- openhueSkill
- xitterSkill
- planSkill
- requesting-code-reviewSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.
0
Common
Most of the 27 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 81
If it prints AUTHENTICATED, skip to Usage — setup is already done.
- Very specific: line 133
Should print AUTHENTICATED.
- Distinctive: line 137
All commands go through the API script:
- Very specific: line 211
All commands return JSON via gws --format json.
“Common” is measured: kept by at least 6 in 10 of the 27 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Google Workspace
Gmail, Calendar, Drive, Contacts, Sheets, and Docs — powered by gws (Google's official Rust CLI). The skill provides a backward-compatible Python wrapper that handles OAuth token refresh and delegates to gws.
Architecture
google_api.py → gws_bridge.py → gws CLI
(argparse compat) (token refresh) (Google APIs)setup.pyhandles OAuth2 (headless-compatible, works on CLI/Telegram/Discord)gws_bridge.pyrefreshes the Zorro token and injects it intogwsviaGOOGLE_WORKSPACE_CLI_TOKENgoogle_api.pyprovides the same CLI interface as v1 but delegates togws
References
references/gmail-search-syntax.md— Gmail search operators (is:unread, from:, newer_than:, etc.)
Scripts
scripts/setup.py— OAuth2 setup (run once to authorize)scripts/gws_bridge.py— Token refresh bridge to gws CLIscripts/google_api.py— Backward-compatible API wrapper (delegates to gws)
Prerequisites
Install gws:
cargo install google-workspace-cli
# or via npm (recommended, downloads prebuilt binary):
npm install -g @googleworkspace/cli
# or via Homebrew:
brew install googleworkspace-cliVerify: gws --version
First-Time Setup
The setup is fully non-interactive — you drive it step by step so it works on CLI, Telegram, Discord, or any platform.
Define a shorthand first:
ZORRO_HOME="${ZORRO_HOME:-$HOME/.zorro}"
GWORKSPACE_SKILL_DIR="$ZORRO_HOME/skills/productivity/google-workspace"
PYTHON_BIN="${ZORRO_PYTHON:-python3}"
if [ -x "$ZORRO_HOME/zorro-agent/venv/bin/python" ]; then
PYTHON_BIN="$ZORRO_HOME/zorro-agent/venv/bin/python"
fi
GSETUP="$PYTHON_BIN $GWORKSPACE_SKILL_DIR/scripts/setup.py"Step 0: Check if already set up
$GSETUP --checkIf it prints AUTHENTICATED, skip to Usage — setup is already done.
Step 1: Triage — ask the user what they need
Question 1: "What Google services do you need? Just email, or also Calendar/Drive/Sheets/Docs?"
- Email only → Use the
himalayaskill instead — simpler setup. - Calendar, Drive, Sheets, Docs (or email + these) → Continue below.
Partial scopes: Users can authorize only a subset of services. The setup script accepts partial scopes and warns about missing ones.
Question 2: "Does your Google account use Advanced Protection?"
- No / Not sure → Normal setup.
- Yes → Workspace admin must add the OAuth client ID to allowed apps first.
Step 2: Create OAuth credentials (one-time, ~5 minutes)
Tell the user:
- Go to https://console.cloud.google.com/apis/credentials
- Create a project (or use an existing one)
- Enable the APIs you need (Gmail, Calendar, Drive, Sheets, Docs, People)
- Credentials → Create Credentials → OAuth 2.0 Client ID → Desktop app
- Download JSON and tell me the file path
$GSETUP --client-secret /path/to/client_secret.jsonStep 3: Get authorization URL
$GSETUP --auth-urlSend the URL to the user. After authorizing, they paste back the redirect URL or code.
Step 4: Exchange the code
$GSETUP --auth-code "THE_URL_OR_CODE_THE_USER_PASTED"Step 5: Verify
$GSETUP --checkShould print AUTHENTICATED. Token refreshes automatically from now on.
Usage
All commands go through the API script:
ZORRO_HOME="${ZORRO_HOME:-$HOME/.zorro}"
GWORKSPACE_SKILL_DIR="$ZORRO_HOME/skills/productivity/google-workspace"
PYTHON_BIN="${ZORRO_PYTHON:-python3}"
if [ -x "$ZORRO_HOME/zorro-agent/venv/bin/python" ]; then
PYTHON_BIN="$ZORRO_HOME/zorro-agent/venv/bin/python"
fi
GAPI="$PYTHON_BIN $GWORKSPACE_SKILL_DIR/scripts/google_api.py"Gmail
$GAPI gmail search "is:unread" --max 10
$GAPI gmail get MESSAGE_ID
$GAPI gmail send --to user@example.com --subject "Hello" --body "Message text"
$GAPI gmail send --to user@example.com --subject "Report" --body "<h1>Q4</h1>" --html
$GAPI gmail reply MESSAGE_ID --body "Thanks, that works for me."
$GAPI gmail labels
$GAPI gmail modify MESSAGE_ID --add-labels LABEL_IDCalendar
$GAPI calendar list
$GAPI calendar create --summary "Standup" --start 2026-03-01T10:00:00+01:00 --end 2026-03-01T10:30:00+01:00
$GAPI calendar create --summary "Review" --start ... --end ... --attendees "alice@co.com,bob@co.com"
$GAPI calendar delete EVENT_IDDrive
$GAPI drive search "quarterly report" --max 10
$GAPI drive search "mimeType='application/pdf'" --raw-query --max 5Contacts
$GAPI contacts list --max 20Sheets
$GAPI sheets get SHEET_ID "Sheet1!A1:D10"
$GAPI sheets update SHEET_ID "Sheet1!A1:B2" --values '[["Name","Score"],["Alice","95"]]'
$GAPI sheets append SHEET_ID "Sheet1!A:C" --values '[["new","row","data"]]'Docs
$GAPI docs get DOC_IDDirect gws access (advanced)
For operations not covered by the wrapper, use gws_bridge.py directly:
GBRIDGE="$PYTHON_BIN $GWORKSPACE_SKILL_DIR/scripts/gws_bridge.py"
$GBRIDGE calendar +agenda --today --format table
$GBRIDGE gmail +triage --labels --format json
$GBRIDGE drive +upload ./report.pdf
$GBRIDGE sheets +read --spreadsheet SHEET_ID --range "Sheet1!A1:D10"Output Format
All commands return JSON via gws --format json. Key output shapes:
- Gmail search/triage: Array of message summaries (sender, subject, date, snippet)
- Gmail get/read: Message object with headers and body text
- Gmail send/reply: Confirmation with message ID
- Calendar list/agenda: Array of event objects (summary, start, end, location)
- Calendar create: Confirmation with event ID and htmlLink
- Drive search: Array of file objects (id, name, mimeType, webViewLink)
- Sheets get/read: 2D array of cell values
- Docs get: Full document JSON (use
body.contentfor text extraction) - Contacts list: Array of person objects with names, emails, phones
Parse output with jq or read JSON directly.
Rules
- Never send email or create/delete events without confirming with the user first.
- Check auth before first use — run
setup.py --check. - Use the Gmail search syntax reference for complex queries.
- Calendar times must include timezone — ISO 8601 with offset or UTC.
- Respect rate limits — avoid rapid-fire sequential API calls.
Troubleshooting
| Problem | Fix |
NOT_AUTHENTICATED | Run setup Steps 2-5 |
REFRESH_FAILED | Token revoked — redo Steps 3-5 |
gws: command not found | Install: npm install -g @googleworkspace/cli |
HttpError 403 | Missing scope — $GSETUP --revoke then redo Steps 3-5 |
HttpError 403: Access Not Configured | Enable API in Google Cloud Console |
| Advanced Protection blocks auth | Admin must allowlist the OAuth client ID |
Revoking Access
$GSETUP --revokeDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

