360 Secure SkillHub
360 安全技能中心

Google Workspace

面向 Google Workspace(Admin Directory、Gmail、Calendar、Drive、Groups、Vault)管理场景:先做只读证据收集,再产出标注 read/write/rollback 的可审查命令与 Markdown 发布清单;删除、转移、挂起、共享变更等高风险操作需明确批准,并要求批量变更附回滚导出。

patrick-erichsen-2
patrick-erichsen-2
热度 28.57
最近更新 2026-06-20 01:51:04
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:工作流 / 自动化脚本 / 任务管理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add google-workspace
Metadata
name
google-workspace
description
Plan, audit, and safely execute Google Workspace admin, Gmail, Calendar, Drive, Groups, and user lifecycle work. Use when Codex is asked to help with Workspace migrations, account cleanups, permission audits, group rollouts, mailbox/calendar changes, or API/GAM/gcloud command planning.

Google Workspace

Use this skill to turn Google Workspace administration requests into safe, reviewable plans and commands. Default to read-only discovery before proposing changes, and keep destructive operations behind explicit confirmation.

Workflow

  1. Identify the workspace surface: Admin Directory, Gmail, Calendar, Drive, Groups, Vault, or shared drives.
  2. Establish the actor and auth path: browser admin console, gam, gcloud, service account with domain-wide delegation, or direct Google API calls.
  3. Gather read-only evidence first:
    • affected users, groups, aliases, calendars, labels, drives, or files
    • current ownership and permission state
    • exact scope of change and rollback path
  4. Produce a preview plan with commands or API calls marked as read, proposed write, or rollback.
  5. Ask for approval before any write, delete, transfer, suspend, archive, or sharing-change operation.

Command Guidance

Prefer commands that can be copied and audited. Use placeholders for domains, users, groups, and file IDs until the user provides real values.

For gam, prefer patterns like:

gam info user user@example.com
gam print groups member user@example.com
gam print drivefileacls query "owner = 'user@example.com'"

For gcloud, first confirm the active project and account:

gcloud config list account project
gcloud auth list

For direct API calls, name the API, HTTP method, endpoint, required OAuth scope, and dry-run/read-only equivalent when one exists.

Safety Rules

  • Never invent customer domains, user emails, group names, file IDs, or org-unit paths.
  • Treat suspended users, external sharing, delegated mailboxes, super-admin accounts, Vault holds, and shared drive ownership as high-risk.
  • Before bulk changes, generate a CSV or JSON input schema and a rollback export.
  • For deletions, prefer suspend/archive/transfer workflows unless the user has explicitly requested irreversible deletion.
  • For mail/calendar migrations, separate identity mapping, data transfer, delegation, forwarding, and retention policy steps.

Reusable Resources

  • Read references/scopes.md when selecting API scopes or explaining OAuth permissions.
  • Run scripts/workspace-change-plan.mjs <input.json> to turn a small JSON change set into a Markdown rollout checklist.

Example input:

{
  "title": "Sales group cleanup",
  "owner": "admin@example.com",
  "changes": [
    {
      "kind": "group-membership",
      "target": "sales@example.com",
      "action": "remove stale members",
      "risk": "medium",
      "rollback": "restore exported membership CSV"
    }
  ]
}