Drives console-only Google Workspace Admin settings (admin.google.com) that no API or GAM can reach, using a signed-in Chrome profile. Recipes for Gmail default routing, outbound routing, and passwordless policies with idempotent ensure and read-back verification.
Ships in web-forge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Self-Evolving Skill: This skill improves through use. When Google changes a console page, a step fails, or a control needs a new trick, fix the primitive in
scripts/lib/page.tsor the recipe inscripts/recipes/google-admin/, add a unit test where the part is pure, and record the lesson here immediately. Only update for real, reproducible issues, and never add a real tenant, address, group or screenshot.
Some Google Workspace settings exist only in the Admin console: Gmail Default routing is absent from the Cloud Identity Policy API's supported settings, and GAM cannot set it. This skill drives those pages through your own signed-in Chrome profile, the same way every time, and proves the result by reading it back. It is the Google Admin recipe family of the web-forge recipe runner: the browser connection, step runner, screenshots, re-authentication gate and secret handling are web-forge's own, shared with every other recipe; the method behind them is the dashboard-forge skill.
Use an API whenever one exists. Reach for this only when the setting is console-only.
chrome-profile.sh setup <admin-email>, then chrome-profile.sh doctor. The default connection mode (--connect extension) reaches the browser through chrome-profile.sh playwright-mcp <admin-email>. --connect cdp [--site <name>] uses a persistent web-forge profile instead (default site google-admin; a human signs in there once). Google binds sessions to the profile's device key, so a copied cookie jar does not sign a cdp profile in (dashboard-forge Vendor Quirks, 2026-08-13).WF="$(cc-plugin-root web-forge)/scripts/web-forge.ts"
bun "$WF" --help # human-readable flags
bun "$WF" recipes --json # machine-readable: every recipe, verb, flag and exit code
# 1. Keep one browser session (one tab) open across runs. Optional but recommended: a re-auth prompt
# passed in that tab stays passed for the next run. Runs in the foreground: background it.
bun "$WF" serve --account [email protected] --port 47811 &
# 2. Plan only: navigate, fill the dialog, read the form back, then CANCEL. Nothing is saved.
bun "$WF" gmail-default-routing ensure --account [email protected] --port 47811 \
--description "Staff mail → shared inbox" --match group:[email protected] \
--change-envelope-recipient [email protected] --add-original-to-header --scope non-recognized \
--dry-run --screenshots ./shots
# 3. The same command without --dry-run creates the rule and verifies it; with --verify it only reads back.
bun "$WF" stop --port 47811
Without --port (or WEB_FORGE_BRIDGE_PORT) each run opens its own session; in extension mode Microsoft's extension then attaches to a fresh tab, which stays open afterwards. A bridge that serves a different target (another account, or another cdp site) is refused, so a run cannot drive the wrong identity. Any flag set can also come from a JSON file kept in the tenant's own repository: --spec routing.json ({"account": "…", "match": "group:…", "add-original-to-header": true}); flags on the command line win.
Output: one JSON object on stdout (ok, action, spec, rule, observed, diff, steps); progress and screenshot paths on stderr. Exit codes: 0 ok · 1 failed or read-back mismatch · 2 usage · 3 rule exists but differs and --update was not given · 4 sign-in or re-authentication not completed in time.
gmail-default-routing ensure| Flag | Meaning |
|---|---|
--match group:<email> · single:<email> · pattern:<regex> · all | Envelope recipients to match |
--change-envelope-recipient <email> | Tick "Change envelope recipient", choose "Replace recipient", enter the address |
--add-original-to-header | Tick "Add X-Gm-Original-To header" |
--scope non-recognized (default) · all | Only addresses with no mailbox, or recognized ones too |
--description <text> | Your label, returned in the JSON only: the Default routing dialog has no description field |
--dry-run · --verify · --update | Plan and cancel · read back only · change an existing rule that differs |
Every other "Modify message" checkbox is set clear: the rule matches the spec exactly or it is reported as different.
Idempotency. A rule's identity is its match (kind + value), because Google stores no description. The rules table is lossy (a group rule reads "Group membership:" plus a fragment of the group's display name, never its address, and every modify action reads "Rewrite message"), so the table only narrows by match kind; the harness then opens each candidate's Edit setting dialog, reads the full form, and cancels. Same match and same form: nothing is done (unchanged). Same match, different form: the differences are reported and nothing changes unless --update is given. Two rules with the same match: ambiguous, resolve by hand.
Read-back. After Save the page is reloaded, the rule is found again and its Edit dialog is read and compared field by field. A mismatch exits 1. This is still the same console: an end-to-end mail test (or Email Log Search) is the independent confirmation.
gmail-routing ensureGmail › Routing › Routing, the per-org-unit setting. Unlike Default routing it can act on outbound mail (for example, send every outbound message addressed to one outside address to an internal one instead), and it has a description field, which identifies the rule.
| Flag | Meaning |
|---|---|
--description <text> | Stored by Google and shown in the table's Description column; the rule's identity (required) |
--messages outbound[,inbound,internal-outbound,internal-inbound] | "1. Email messages to affect" (required) |
--account-types users[,groups,inactive,archived-delegate] | Account types the action applies to (default users, Google's own default) |
--envelope-recipient single:<email> | "Show options › B. Envelope filter › Only affect specific envelope recipients", single address |
--change-envelope-recipient <email> · --add-original-to-header | As in Default routing |
--org-unit <name> | Refuse unless the page shows "Showing settings for users in " (the page opens at the top unit; no navigation) |
--dry-run · --verify · --update | As above. A filled form that does not read back as the spec is cancelled and reported (fill-mismatch, with the raw form), never saved |
Every "Modify message" box the spec does not ask for, "A. Address lists" and "Only affect specific envelope senders" are set clear. The envelope filter is what limits a change of envelope recipient to the one recipient it names; the others on the same message are not affected.
Measured 2026-11-26: the page holds several settings, each a form named after it (Outbound gateway, Routing, Non-Gmail mailbox …), so the table and its Add another rule button are looked up inside the form named "Routing". Show options is a link, not a button; an Edit dialog may already show "Hide options". Two text fields are both named "Email address:", the senders' first (kept in the DOM, hidden, while its box is clear) and the recipients' second, so the recipients' value is the last one. The table's "Consequences" column summarises the X-Gm-Original-To header as "Add custom headers"; the Edit dialog is the record.
passwordless ensure · passwordless inspectSecurity › Authentication › Passwordless: "Allow users to skip their password and authenticate with a passkey" (Google's help page calls it "Allow users to skip passwords at sign-in by using passkeys"). Off as Google ships it; users then read "Skip password when possible isn't allowed for this account". The Cloud Identity Policy API exposes only the sibling settings/security.passkeys_restriction (measured 2026-11-10 on a full policies.list). --allow-skip on|off acts on the unit the page opens with (the top organizational unit); --verify, --dry-run as above; inspect is a read-only survey (checkboxes, buttons, text) for writing new steps. Turning it on also stops users adding a security key for 2-Step Verification only (passkeys on security keys still work), as the page itself says.
The Admin console periodically sends an administrator to accounts.google.com for a fresh password before admin pages. The shared gate (scripts/lib/gate.ts), with this family's classifier (scripts/recipes/google-admin/family.ts):
accounts.google.com with "Verify it's you", "Enter your password" or "To continue, first verify"; any other accounts.google.com page counts as sign-in).--alert local (default) posts a desktop notice through ~/.claude/tools/notify when present; --alert emergency also sends a Pushover Emergency (priority 2, retry 60 s, expire 600 s) through the pushover-commander plugin with the HTTP(S) proxy variables removed. The core is called with --no-wait, so it returns once Pushover accepted the page instead of polling for the acknowledgement; the log then reads emergency alert sent, and a real failure names its exit code, signal or spawn error. Use emergency for crown-level admin steps.--reauth-wait, default 600 s), because a reload discards what the operator is typing. When the tab reaches admin.google.com the run continues.--connect extension mode the navigation itself can fail with "No open tabs … Chrome may have detached the debugger because the page contains a frame that extensions are not allowed to debug": the console redirected to the password page and a password manager's inline frame detached the extension. Open the console URL in that profile's own window (chrome-profile.sh open <admin-email> <url>), pass the check there through the password manager's own menu (by hand, or with Orca computer use on that window), close the extension's leftover tabs (chrome-profile.sh tabs close --id …), then re-run: the recipe then loads the console normally. A fresh --connect cdp profile that has never signed in is no shortcut: Google's sign-in page there stayed on the identifier step after Next.page.bringToFront() and clicks with { force: true }. Synthetic dispatchEvent clicks are ignored by the console (jsaction wants real input events).option by name, then confirm the listbox's selected option.role=checkbox, use that checkbox. (Its direct parent holds only the text.)aria-label ("Enter new email address", "Email address:", "Regexp Learn more").hasText matches textContent, where a <br> leaves no space ("Name (x)[email protected]"), so an address is bounded by any character that cannot belong to one, not by whitespace.--screenshots, or under ~/.local/state/web-forge/failures/), presses Cancel, and reloads the page, so a half-filled rule is never saved.treeitem whose clickable child is a group named after the unit (getByRole("group", { name: "<Unit>", exact: true })); a unit with children shows a treeitem "Expand <Unit>" with an "Expand" button that must be clicked before its children exist in the tree. treeitem by plain name, or getByText, timed out.locator("body").ariaSnapshot(), between "Showing settings for users in " and the next section: options read option "2 weeks" [selected], radios radio "On" [checked], and the "Authentication" line says Inherited, Overridden or Locally applied. The page has several form elements and unnamed checkboxes, so locator("form").first() queries found nothing.getByRole("listbox").filter({ has: getByRole("option", { name: "2 weeks" }) })), click it, then the option, then confirm the listbox's selected option (the general listbox rule above).Pass --screenshots <dir> to save one PNG per step (failures are always saved, by default under ~/.local/state/web-forge/failures/) (navigation, dialog open, every selection, Save, read-back), then read them. The console is complicated; the accessibility tree alone misled us once (above). Keep screenshots out of repositories: they show tenant data.
serve), taking screenshots after every action. Write down accessible roles and visible label text, never CSS classes.scripts/recipes/google-admin/<name>.ts (another console: a new scripts/recipes/<family>/ with a family.ts classifier) exporting: URL, the dialog name regex, LABELS, FLAGS (a FlagSpec[]), and pure functions specFromFlags, planForm(spec) → FormOp[], observedFromForm(FormState), diffRule, plus run(verb, flags, driver, gate). Reuse applyOps, READ_FORM, PRESS_DIALOG_BUTTON, Driver.extractToVault (for any secret the page reveals) and the primitives in scripts/lib/page.ts (select, tick, fill, radio, pick, readForm, readGrid). Add a primitive there only when a new control type needs one.scripts/recipes/index.ts with its family; --help and recipes --json pick it up.--dry-run, then the real run, then --verify.admin.google.com/ac/managedsettings/<id>/passwordless (take it from Google's help page; ac/security/passwordless is a 404). The page opens as a read-only summary (label, then ON/OFF); its row's "Edit …" button opens the form. The checkbox is a native one named by aria-label, so getByRole('checkbox', { name }) finds it (unlike the Material checkboxes above). The edit panel's SAVE and CANCEL are outside role=main and are not role=button: find them by visible text page-wide and click the visible match (a hidden "Save" span exists elsewhere on the page).Google changes the console without notice. Selectors use accessible roles and the words on screen, so a reworded label ("Change envelope recipient") or a restructured dialog breaks a recipe loudly (a step fails, a screenshot is saved, the dialog is cancelled) rather than silently. The English UI is assumed. Tested live: create, --dry-run, --verify, unchanged, differs. gmail-routing: --dry-run (including a fill-mismatch it reported and cancelled), create and --verify (2026-11-26). Not yet exercised live: --connect cdp, --update, single/pattern/all matches, and the re-authentication wait (classification is unit-tested).
After this skill completes, check before closing:
observed and the Edit dialog disagree, fix readForm or the recipe's observedFromForm and add the captured (anonymised) shape as a test fixture.Only update if the issue is real and reproducible — not speculative.
What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/azure-provisionBootstrap Azure automation when interactive `az login` is blocked by a Conditional Access policy (error 530035, "Device state: Unregistered"). Mints a service principal through the Azure Portal session ONCE — using Microsoft Graph over a captured token, not DOM clicking — then provisions resource groups, Cognitive Services / AI Language / Speech resources and their keys entirely via az/REST, writing key AND endpoint together into the SCS vault. Use when az login fails but the portal works, when moving Azure resources to a client's own tenant, or when you need unattended Azure automation from a machine that is not Entra-joined. Triggers: "az login blocked", "AADSTS530035", "Conditional Access Azure CLI", "create Azure service principal", "migrate Azure account", "provision Azure AI resources", "Azure app registration".
/cf-access-wallPut any set of hostnames — including bare *.workers.dev Workers, no custom domain needed — behind a Cloudflare Access login wall (GitHub SSO and/or emailed one-time PIN for non-technical users) from a declarative JSON spec, idempotently. Handles the Zero Trust org, identity providers, per-app sessions, email allow-lists, and service tokens for CLI/CI clients. Use when capability URLs / unguessable slugs are no longer enough and a team needs real identity on private mini-sites. Triggers: "protect this site with login", "GitHub login on the site", "email code login", "Cloudflare Access", "put the workers behind auth", "secure the mini-site".
/dashboard-forgeSupervised browser automation of vendor dashboards and admin consoles for operations that have NO public API — minting scoped API tokens, creating OAuth apps, flipping account-level toggles, console-only settings. The method skill of web-forge, the one harness for this - recipes as data run by the web-forge CLI (idempotent ensure, read-back, a screenshot per step, a login gate that never types a credential) or node forge scripts; two connection modes (a signed-in profile of your everyday Chrome through the Playwright Extension, or a persistent per-site profile over CDP where a human logs in once); secrets extracted DOM-to-vault without ever being exposed; UI drift survived via the step-and-shoot method and a dated Vendor Quirks log. Use when a task needs a dashboard click-path (Cloudflare token/Zero Trust, GitHub OAuth apps, any admin console) and the vendor offers no API or your token lacks the scope to grant itself more. Triggers - "no API for this", "create an OAuth app", "mint a token in the dashboard", "automate the admin console", "browser-automate the setup", "write a console recipe"./web-forge:admin-consolefrom web-forge
npx claudepluginhub terrylica/cc-skills --plugin web-forge