google-workspace-cli
БесплатноЗапускает вложенные скриптыНе проверенOffline audit of an exported Google Workspace config: 2SV, passwords, sharing, apps, admins, email DNS. Writes API auth setup guides. Use when asked to audit…
от borghei★ 1 250 звёзд на GitHubОб этом скилле
Google Workspace CLI
Audit a Google Workspace tenant's security settings and email DNS against recommended values, and generate setup guides for Admin SDK / API access. The tools are offline: they read a JSON file built from an export, so the agent's first job is always getting real data into that file.
Quick Start
python3 scripts/workspace_audit.py --generate-sample # schema to fill in
python3 scripts/workspace_audit.py --config assets/sample_workspace_config.json
python3 scripts/auth_setup_guide.py --list-scopes
When to Use
- "Audit our Google Workspace security" or "review our Admin console settings".
- Checking MX, SPF, DKIM and DMARC for a Workspace domain.
- Setting up OAuth or a service account with domain-wide delegation for Workspace APIs.
- Re-checking settings after remediation.
Not for: Microsoft 365 (engineering/ms365-tenant-manager), cloud IAM outside Workspace (engineering/cloud-security), privacy-law questions (ra-qm-team/gdpr-dsgvo-expert).
Clarify First
Before running, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- Task: security audit, email/DNS diagnostics, or an auth setup guide.
- Data access: can the user run GAM (or another Admin SDK client) and
dig, or will they read values off the Admin console by hand? This decides how the config file gets filled. - Output mode: human-readable or JSON for automation.
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
Workflow
1. Export the data
No tool here calls Google. The agent collects the values (or asks the user to run the commands), then writes them into the tool's schema. Useful sources:
| Setting | Where it comes from |
|---|---|
| 2SV enforcement | gam print users fields primaryemail,isenrolledin2sv,isenforcedin2sv — set security.2fa_enforcement to true only if every user is enforced |
| Super admins | gam print admins — list the Super Admin role holders in admin.super_admins |
| Third-party app grants | gam all users print tokens — summarise into security.api_clients (name + scopes) |
| Mobile management | gam print mobile plus Admin console > Devices > Settings |
| Password, session, Drive sharing | Admin console (Security > Password management, Google session control; Apps > Drive > Sharing settings), or the Cloud Identity Policy API where your edition exposes it |
| MX / SPF / DKIM / DMARC | dig +short MX example.com, dig +short TXT example.com, dig +short TXT google._domainkey.example.com, dig +short TXT _dmarc.example.com |
Leave a key out rather than guessing. Missing settings are reported as not provided and never counted as failures, so the report shows exactly what was and was not assessed.
2. Run the checks
# Security audit: the flawed sample fails 2SV, password, sharing and app checks (exit 1); the sound one passes (exit 0)
python3 scripts/workspace_audit.py --config assets/sample_workspace_config.json
python3 scripts/workspace_audit.py --config assets/sample_workspace_config_sound.json --format json
# Diagnostics on DNS, email, security, integrations and conflicting settings
python3 scripts/gws_doctor.py --config assets/sample_doctor_config.json --check all
python3 scripts/gws_doctor.py --config assets/sample_doctor_config.json --check dns,email --format json
# Auth setup guide for API access
python3 scripts/auth_setup_guide.py --method service-account --scopes admin,drive --domain-delegation
3. Report and remediate
- Lead with critical and high findings and give the Admin console path for each fix.
- List the settings that were not provided so the user knows the audit's coverage.
- Re-export and re-run after changes, and verify that the audit exits 0 with nothing critical or high and nothing important left "not provided".
Tools Overview
| Tool | What it checks | Exit codes |
|---|---|---|
workspace_audit.py |
2SV enforcement, password length/complexity, Drive external and link sharing, third-party app access, mobile management, admin recovery, session length, super admin count (2-5), API client scope count, spoofing protection, DMARC policy | 0 no critical/high finding, 1 critical or high finding, 2 bad input or nothing auditable |
gws_doctor.py |
--check dns (record values in the file: Google MX, SPF include, DKIM, DMARC policy), email, security, integration (SSO, directory sync), consistency (e.g. external sharing without 2SV) |
0 no failures, 1 a check failed, 2 bad input, unknown --check, or no checkable section |
auth_setup_guide.py |
Step-by-step OAuth or service-account setup, scopes per API, domain-wide delegation, test steps (`--method oauth | service-account, --sco |
Установить google-workspace-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл google-workspace-cli?
Offline audit of an exported Google Workspace config: 2SV, passwords, sharing, apps, admins, email DNS. Writes API auth setup guides. Use when asked to audit Workspace security, check SPF/DKIM/DMARC, or set up Admin SDK access.
Как установить скилл google-workspace-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл google-workspace-cli запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic