/install gws-dwd
\r \r
GWS Skill\r
\r
Unified Google Workspace admin and investigation tool. All scripts in scripts/ relative to this file.\r
\r
Security\r
\r
- Never log, echo, or output credentials — service account key and tokens stay in memory only\r
- Never send raw email body content to chat unprompted — always summarize unless explicitly asked for full content\r
- Impersonation is logged — every DWD call specifies which account is being impersonated\r
- Read-only access — no write scopes are granted; cannot send email, create events, or modify files\r
- Credential storage — service account key at
~/.config/gws/service-account.json(chmod 600, outside any repo)\r - No secrets in code — key path loaded from env var
GWS_SERVICE_ACCOUNT_PATHor default path\r \r
Auth\r
\r
All scripts use scripts/auth.py — loads service account key and impersonates users via domain-wide delegation.\r
\r
- Default admin: configured via
GWS_ADMIN_EMAILenv var\r - Domain: configured via
GWS_DOMAINenv var\r - Impersonate another user: pass their email to
--userflag\r \r
Scripts\r
\r
vault.py — Email Investigation (org-wide content search)\r
\r Search anyone's email content. Creates temporary matter → runs query → returns results → auto-deletes matter.\r \r
python3 scripts/vault.py --accounts [email protected] --terms "from:[email protected]" --start "2026-03-01T00:00:00Z" --end "2026-03-26T23:59:59Z"\r
python3 scripts/vault.py --org-unit \x3CorgUnitId> --terms "subject:confidential"\r
python3 scripts/vault.py --accounts [email protected] --terms "from:[email protected]" --export\r
```\r
\r
Search terms use Gmail operators: `from:`, `to:`, `subject:`, `has:attachment`, `filename:`, `newer_than:`, `older_than:`, etc.\r
\r
### gmail.py — Read Any User's Inbox\r
\r
```bash\r
# Metadata summary\r
python3 scripts/gmail.py --user [email protected] --query "from:acme.com newer_than:7d" --max 10 --mode summary\r
# Full email body\r
python3 scripts/gmail.py --user [email protected] --query "from:acme.com" --max 5 --mode full\r
# Single message by ID\r
python3 scripts/gmail.py --user [email protected] --query "" --mode read --message-id \x3Cid>\r
```\r
\r
**Investigation workflow:** Vault count → Gmail summary → Gmail full content.\r
\r
### directory.py — Users, Groups, OUs\r
\r
```bash\r
python3 scripts/directory.py users [--query "name:Jared"] [--max 100]\r
python3 scripts/directory.py user [email protected]\r
python3 scripts/directory.py groups\r
python3 scripts/directory.py members [email protected]\r
python3 scripts/directory.py orgunits\r
```\r
\r
### reports.py — Audit Logs & Activity\r
\r
```bash\r
python3 scripts/reports.py login [--user [email protected]] [--event login_failure] [--start ISO] [--end ISO]\r
python3 scripts/reports.py admin [--max 25]\r
python3 scripts/reports.py drive [--user [email protected]]\r
python3 scripts/reports.py token [--user [email protected]]\r
python3 scripts/reports.py gmail [--user [email protected]]\r
```\r
\r
### drive.py — Search & Read Files\r
\r
```bash\r
python3 scripts/drive.py search --user [email protected] --query "name contains 'invoice'"\r
python3 scripts/drive.py recent --user [email protected]\r
python3 scripts/drive.py file --user [email protected] --id \x3CfileId>\r
python3 scripts/drive.py shared --user [email protected]\r
python3 scripts/drive.py type --user [email protected] --type sheet\r
```\r
\r
### gcalendar.py — Read Calendars\r
\r
```bash\r
python3 scripts/gcalendar.py today --user [email protected]\r
python3 scripts/gcalendar.py tomorrow --user [email protected]\r
python3 scripts/gcalendar.py events --user [email protected] --start ISO --end ISO [--query "meeting"]\r
python3 scripts/gcalendar.py calendars --user [email protected]\r
```\r
\r
### sheets.py — Read Spreadsheets\r
\r
```bash\r
python3 scripts/sheets.py metadata --user [email protected] --id \x3CspreadsheetId>\r
python3 scripts/sheets.py get --user [email protected] --id \x3CspreadsheetId> --range "Sheet1!A1:D10"\r
python3 scripts/sheets.py batch --user [email protected] --id \x3CspreadsheetId> --ranges "Sheet1!A1:B5" "Sheet2!A1:C3"\r
```\r
\r
### docs.py — Read Documents\r
\r
```bash\r
python3 scripts/docs.py get --user [email protected] --id \x3CdocumentId>\r
python3 scripts/docs.py text --user [email protected] --id \x3CdocumentId>\r
```\r
\r
### people.py — Contacts & Org Directory\r
\r
```bash\r
python3 scripts/people.py contacts --user [email protected]\r
python3 scripts/people.py search --user [email protected] --query "John"\r
python3 scripts/people.py directory --user [email protected] --query "manager"\r
```\r
\r
## Setup\r
\r
See `references/setup-checklist.md` for one-time GCP + Google Admin configuration steps.\r
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install gws-dwd - After installation, invoke the skill by name or use
/gws-dwd - Provide required inputs per the skill's parameter spec and get structured output
What is Gws Skill?
Google Workspace admin and investigation tool via service account + domain-wide delegation. Covers Vault (eDiscovery email search), Gmail (read any inbox), D... It is an AI Agent Skill for Claude Code / OpenClaw, with 116 downloads so far.
How do I install Gws Skill?
Run "/install gws-dwd" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Gws Skill free?
Yes, Gws Skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Gws Skill support?
Gws Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Gws Skill?
It is built and maintained by jmac122 (@jmac122); the current version is v1.0.1.