agentleFS
sp1esp1e/claude-skills/google-workspace-cli/SKILL.md

google-workspace-cli

Skill1 starsChanged 6 months agoMITView on GitHub

This skill should be used when the user asks to "audit Google Workspace", "check GWS security settings", "set up Google Workspace authentication", "diagnose Workspace issues", or "review Google admin configurations".

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before running, confirm these inputs.

    line 27
  2. Distinctive:

    Stop rule: ask only the 2-3 that most change the output.

    line 33
  3. Very specific:

    Audit: - Run workspace_audit.py against the config file

    line 96
  4. Distinctive:

    Re-audit: - Verify changes resolved findings

    line 99
  5. Very specific:

    Generate guide: - Run auth_setup_guide.py with desired method

    line 104
  6. Distinctive:

    Follow steps: - Create credentials in Google Cloud Console

    line 105
  7. Distinctive:

    Verify: - Test API access with provided verification steps

    line 107
  8. Distinctive:

    Review results: - Check DNS, email, and integration health

    line 112
  9. Distinctive:

    Re-check: - Verify fixes pass diagnostics

    line 114

“Common” is measured: kept by at least 6 in 10 of the 5 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Google Workspace CLI

Category: Engineering Domain: Google Workspace Administration

Overview

The Google Workspace CLI skill provides tools for auditing Google Workspace configurations, generating authentication setup documentation, and diagnosing common GWS issues. It helps IT administrators maintain secure, well-configured Workspace environments without needing to navigate complex admin consoles.

Clarify First

Before running, confirm these inputs. If any is unknown or vague, ASK — do not assume:

  • Task — security audit, auth setup guide, or diagnostics (selects workspace_audit.py vs auth_setup_guide.py vs gws_doctor.py)
  • Config export or auth method — the GWS config JSON to audit, or the auth method and scopes for a setup guide (sets --config or --method/--scopes)
  • Output mode — human-readable vs JSON for automation (sets --format json)

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.

Quick Start

# Audit Workspace security configuration
python scripts/workspace_audit.py --config gws-config.json

# Generate auth setup guide
python scripts/auth_setup_guide.py --method oauth --scopes admin,drive

# Run diagnostics
python scripts/gws_doctor.py --check all

# JSON output for automation
python scripts/workspace_audit.py --config gws-config.json --format json

Tools Overview

workspace_audit.py

Audits Google Workspace configuration exports for security best practices.

FeatureDescription
2FA enforcementChecks if 2-step verification is required
Password policyValidates password strength requirements
Sharing settingsReviews external sharing configurations
App accessChecks third-party app access policies
Admin rolesReviews admin role assignments
Mobile managementChecks device management policies
Drive settingsValidates Drive sharing and access controls

auth_setup_guide.py

Generates step-by-step authentication setup documentation for GWS API access.

FeatureDescription
OAuth setupGenerates OAuth 2.0 configuration guide
Service accountCreates service account setup documentation
API scopesLists required scopes for each API
Domain delegationDocuments domain-wide delegation setup
Testing guideProvides verification steps

gws_doctor.py

Diagnostic tool for common Google Workspace configuration issues.

FeatureDescription
DNS checksValidates MX, SPF, DKIM, DMARC records format
SSL/TLSChecks certificate and transport security settings
Integration healthValidates common integration patterns
Config consistencyChecks for conflicting settings
Best practicesCompares against GWS recommended settings

Workflows

Security Audit Workflow

  1. Export config - Export GWS settings to JSON via Admin SDK or manual export
  2. Audit - Run workspace_audit.py against the config file
  3. Review findings - Prioritize critical security gaps
  4. Remediate - Apply recommended settings in Admin Console
  5. Re-audit - Verify changes resolved findings

API Setup Workflow

  1. Plan - Determine which APIs and scopes are needed
  2. Generate guide - Run auth_setup_guide.py with desired method
  3. Follow steps - Create credentials in Google Cloud Console
  4. Configure - Set up domain delegation if needed
  5. Verify - Test API access with provided verification steps

Health Check Workflow

  1. Run diagnostics - Execute gws_doctor.py with all checks
  2. Review results - Check DNS, email, and integration health
  3. Fix issues - Address failures in priority order
  4. Re-check - Verify fixes pass diagnostics

Regular Maintenance

# Monthly security audit
python scripts/workspace_audit.py --config gws-export.json --format json > audit_$(date +%Y%m).json

# Weekly health check
python scripts/gws_doctor.py --check dns,email --format json

Reference Documentation

  • GWS Admin Guide - Security settings, API configuration, DNS requirements

Common Patterns Quick Reference

Security Priorities

SettingPriorityImpact
2FA enforcementCriticalPrevents account takeover
Password policyCriticalReduces credential attacks
External sharingHighPrevents data leakage
App access controlHighLimits third-party risk
Mobile managementMediumSecures device access
Admin role reviewMediumLimits privilege exposure

DNS Records for Email

RecordPurposeExample
MXEmail routingASPMX.L.GOOGLE.COM
SPFSender verificationv=spf1 include:_spf.google.com ~all
DKIMEmail signingDomain-specific CNAME
DMARCPolicy enforcementv=DMARC1; p=reject; rua=mailto:...

API Scopes

APIScopePurpose
Admin SDKadmin.directory.userUser management
Drivedrive.readonlyFile listing
Gmailgmail.settings.basicEmail settings
Calendarcalendar.readonlyCalendar access

Common Issues

IssueSymptomFix
No 2FAAccount takeover riskEnable 2FA enforcement
Weak passwordsCredential stuffingSet 12+ char minimum
Open sharingData leakageRestrict external sharing
No DMARCEmail spoofingAdd DMARC DNS record
Stale adminsExcessive privilegesReview admin roles quarterly

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.