AI Skill Report Card

Administering Google Workspace GAM7

A-84·Nov 30, 2026·Source: Web

Administering Google Workspace with GAM7

14 / 15

Input: "List files shared with 'anyone with the link' for every user in OU /Ventas, into one CSV."

gam config auto_batch_min 1 redirect csv ./AnyoneShares.csv multiprocess ou /Ventas print filelist fields id,name,permissions pm type anyone em

Output: AnyoneShares.csv with columns Owner,id,name,permissions... (one row per matching file, all users merged).

Flags: auto_batch_min 1 runs one subprocess per user; redirect csv ... multiprocess merges every subprocess into one file; ou /Ventas selects users directly in that OU (ou_and_children adds sub-OUs); pm type anyone em opens/closes a permission match.

Validated against: GamCommands.txt (main) · wiki: Bulk-Processing, Permission-Matches

Recommendation▾
Make examples more representative of the skill's own claims: Example 2 (offboarding) shows a checklist and five bare commands with no concrete output, and its closing note admits the commands must still be validated. Add expected output lines for each step and one 'bad vs good' contrast, such as an incorrect Legacy-GAM command next to the corrected GAM7 form.

GAM7 releases weekly and shares its codebase and gam.cfg with GAMADV-XTD3 (7.00.00 = "Merged GAM-Team version"). XTD3 syntax still present in current docs is valid GAM7. Never use Legacy GAM syntax (the pre-merge GAM-team branch). Never trust memory for flags: confirm each keyword in the current GamCommands.txt or the wiki.

Use the bundled helper scripts/gam7ref.py (stdlib-only Python 3; python on Windows; caches the official docs 12 h):

Bash
python3 scripts/gam7ref.py cmd "print filelist" "showownedby" # BNF blocks containing ALL terms python3 scripts/gam7ref.py def DriveFileEntity # expand a <NonTerminal> python3 scripts/gam7ref.py wiki Users-Drive-Permissions --grep "delete drivefileacl" python3 scripts/gam7ref.py since "addlabelid" # estimated minimum version python3 scripts/gam7ref.py wikigrep "orphans" # which wiki page documents a term python3 scripts/gam7ref.py version # latest documented version

Fallbacks if the script cannot run:

  • Shell: curl -sSL https://raw.githubusercontent.com/GAM-team/GAM/main/src/GamCommands.txt -o GamCommands.txt then grep -n -A10 "^gam .*print filelist" GamCommands.txt
  • No shell: WebFetch on https://raw.githubusercontent.com/wiki/GAM-team/GAM/<Page>.md
  • No network: deliver the command marked "not validated in this session" and list what to verify.
13 / 15
Progress:
- [ ] 1. Locate the BNF block with `cmd`; every keyword must appear in it
- [ ] 2. Expand non-terminals with `def` (user selectors, field lists, matches)
- [ ] 3. Read the wiki page for defaults and official examples
- [ ] 4. Check `since`; if keyword is 7.4x+, add "requires GAM7 >= X (`gam version simple`)"
- [ ] 5. Edge cases: search site:groups.google.com/g/google-apps-manager (secondary source; docs win on conflict)
- [ ] 6. Not supported? Say so first, then give the closest alternative
- [ ] 7. Deliver: command, flag breakdown, provenance line

Step 6 wording: "Not natively supported by GAM7 (absent from GamCommands.txt and the wiki)", followed by the nearest GAM command, console path, direct API call, Apps Script or gcloud. Never invent a flag.

Topic → wiki page map: references/wiki-index.md.

Recommendation▾
Tighten for conciseness: the Response format, Shells and scripts, Performance and filtering, Best Practices, and Common Pitfalls sections repeat points (multiprocess, num_threads, no external parallelism over gam csv, commit-batch hang, ou vs ou_and_children, quoting of ~columns). Merge these into one pitfalls list and cut the duplicate warnings.
  • Lead with the command or script. No preamble, no restating the question.
  • GAM commands without a named shell: bare code block, no inline comments (# is not a comment in CMD). Explanation goes in the breakdown.
  • Scripts (only when a shell is named): language-tagged block (powershell, bat, bash) with heavy comments.
  • After the block: flag breakdown, one line per flag. Then a few lines on any non-trivial filter/parallel logic.
  • Repetitive task → show CSV header + 1-2 sample rows and the gam csv command that consumes it.
  • Destructive operations (delete, remove, suspend, wipe, purge, transfer): deliver exactly the requested command; the breakdown still explains flags such as doit.
  • Close with: Validated against: GamCommands.txt (main) · GAM7 <version> · wiki: <Page>
  • Spanish prose when the user writes Spanish; commands and flags verbatim from docs.
16 / 20

Example 1: Bulk create users from CSV

Input: "Create these users in OU /Soporte: users.csv has primaryEmail,givenName,familyName,password."

gam csv users.csv gam create user "~primaryEmail" firstname "~givenName" lastname "~familyName" password "~password" changepassword on org /Soporte

Breakdown: gam csv runs one gam per row (5 parallel by default, num_threads); "~col" substitutes the CSV column (quoted to survive ~); changepassword on forces a reset at first login; org sets the OU. Output: one User: x@dominio.com, Created line per row.

Example 2: Offboarding checklist

Input: "Offboard jperez@dominio.com: suspend, remove from groups, transfer Drive to msilva, set vacation reply."

Progress:
- [ ] Suspend
- [ ] Remove from all groups
- [ ] Transfer Drive
- [ ] Vacation responder
- [ ] Verify
gam update user jperez@dominio.com suspended on
gam user jperez@dominio.com delete groups
gam user jperez@dominio.com transfer drive msilva@dominio.com
gam user jperez@dominio.com vacation on subject "Ya no trabaja aqui" message "Contacte a msilva@dominio.com" 
gam info user jperez@dominio.com

Breakdown: suspended on blocks sign-in; delete groups removes memberships; transfer drive moves owned files; vacation on sets the auto-reply; info user confirms final state. Validate each against cmd (e.g. gam7ref.py cmd "transfer drive") before delivery, since transfer options vary by version.

Example 3: Failure case: quota error in bulk run

Input: "Running gam csv over 40,000 users, I see Got HTTP response code 429: rateLimitExceeded and slow retries."

Diagnosis: concurrency exceeds the project quota. Fix:

gam config num_threads 5 csv users.csv gam user "~email" print filelist fields id,name redirect csv ./files.csv multiprocess

Breakdown: lower num_threads (default 5) to reduce parallel API calls; GAM already retries with backoff, so do not wrap it in external parallelism (workers × num_threads multiplies calls against the same quota).

Example 4: Unsupported request

Input: "Change the Gmail 'smart reply' admin default for all users."

Output: "Not natively supported by GAM7 for this setting (absent from GamCommands.txt). Alternative: Admin console → Apps → Google Workspace → Gmail → User settings. For Cloud Identity policies GAM7 offers gam print|show|info policies; confirm with gam7ref.py wiki Cloud-Identity-Policies whether this policy type is modifiable before claiming it."

Recommendation▾
Strengthen the Quick Start and Example 3 so they stand alone. The Quick Start omits the stated Owner column header caveat and relies on a long flag line that a reader must trust; Example 3's fix reorders flags in a way that could confuse. Show actual sample CSV rows and a verified rate-limit output, and avoid depending on an external script (gam7ref.py) for basic correctness when its availability is not guaranteed.
  • No shell named → GAM7 commands only; loop with gam csv, gam loop, gam batch|tbatch, redirect ... multiprocess. Keep them shell-neutral: double quotes around args with spaces or ~ | > < &; use GAM redirect csv|stdout|stderr, never shell >; note when \" (Linux/macOS/CMD) differs from PowerShell's `" and when regex backslashes in row filters differ (\\\ Linux/macOS, \\ Windows).
  • Shell named (PowerShell, Batch, Bash) → use that shell and read references/shells.md (official escaping rules, commented templates). Bare "PowerShell" = PowerShell 7 (#Requires -Version 7.0, ForEach-Object -Parallel); do not use it for 5.1.

Parallelize from most to least native:

  1. gam csv with redirect csv <file> multiprocess (num_threads, default 5).
  2. config auto_batch_min N for gam <UserTypeEntity> ... on large collections, no CSV needed.
  3. gam batch (processes; cannot contain gam csv) or gam tbatch (threads; can).
  4. External parallelism (ForEach-Object -Parallel, xargs -P) only for multi-tenant/multi-gam.cfg section jobs or non-GAM steps. Use thread-safe collections, explicit -ThrottleLimit, absolute paths, and check each gam exit code.

Design for unattended runs: no prompts (commit-batch without text, since commit-batch <Text> waits for a keypress), output via redirect, check return codes.

Filter closest to the source:

  1. API: query/queries, Drive query/fullquery, minimal fields.
  2. GAM output: config csv_output_row_filter, csv_output_row_drop_filter (+ _mode), csv_output_header_filter, csv_output_header_drop_filter, csv_output_row_limit; reusable via selectfilter.
  3. gam csv input: matchfield/skipfield, skiprows/maxrows, csv_input_row_filter.

Row-filter quoting is strict: list in ", each field:filter pair in ', and \" around names containing : or spaces. Full syntax, select, multiprocessexit, gam.cfg performance variables, filter types and return codes: references/lotes-y-filtros.md.

  • Run the destructive command's print/show counterpart first when the user did not ask for the destructive form only (e.g. gam ou /X print filelist before a mass change); when they asked for the destructive command, give it as requested.
  • Use ou vs ou_and_children deliberately; confirm with def UserTypeEntity.
  • Keep fields minimal; large-domain runs (10k+ users) should use redirect csv ... multiprocess instead of one giant sequential call, which also avoids memory growth and API pagination stalls.
  • Name outputs per run (./reports/Shares-$(date).csv via shell, or fixed names with redirect csv ... append).
  • Always note minimum version for recent keywords.
  • Inventing flags from Legacy GAM or half-remembered XTD3 syntax. Always cmd first.
  • Writing > for output in neutral commands; use redirect.
  • Putting gam csv inside gam batch (unsupported; use tbatch).
  • Unquoted "~column" references, breaking on spaces or special characters.
  • commit-batch "text" in scheduled jobs (hangs waiting for a key).
  • Stacking external parallelism on top of gam csv (429 errors from multiplied concurrency).
  • Using ou when sub-OUs were intended (or the reverse).
  • Claiming a console setting is scriptable without confirming it in GamCommands.txt or the wiki.
  • Row-filter quoting mistakes (missing ' pairs, unescaped : in header names).
  • scripts/gam7ref.py: doc lookup helper (must ship alongside this file)
  • references/lotes-y-filtros.md: bulk processing, redirect, meta commands, gam.cfg performance variables, filters, return codes
  • references/shells.md: per-shell escaping and commented PowerShell 7 / 5.1 / Batch / Bash templates
  • references/wiki-index.md: Workspace topic → wiki page map
0
Grade A-AI Skill Framework
Scorecard
Criteria Breakdown
Quick Start
14/15
Workflow
13/15
Examples
16/20
Completeness
15/20
Format
14/15
Conciseness
12/15