agentleFS
fmindfmind/dot/skills/gws/SKILL.md

gws

Skill13 starsChanged 4 days agoMITView on GitHub

Use gws for Google Workspace: Gmail, Drive, Docs, Sheets, Calendar, Chat.

  • Reads credentials

15 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

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Inspect the installed command and live schema: use <command> --help for flags and schema for the API contract.

    line 20
  2. Distinctive:

    Choose the content path: read service recipes for metadata versus bodies, Docs tabs, Sheets ranges, Gmail MIME/replies, Calendar times, …

    line 33
  3. Distinctive:

    Apply the smallest call: no broad search followed by an unreviewed batch mutation.

    line 36

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

Use gws for Google Workspace automation from the shell: authentication, API discovery, bounded reads, and verified writes across Drive, Docs, Sheets, Gmail, Calendar, and Chat. Prefer the CLI for supported operations; use a connected app when the requested native editing operation needs its document context or capabilities.

Workflow

  1. Resolve the profile: check gws auth status for the account and scopes without printing credentials. Set GOOGLE_WORKSPACE_CLI_CONFIG_DIR before auth commands to isolate profiles; an existing GOOGLE_WORKSPACE_CLI_TOKEN or GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE can override stored credentials, so verify the effective identity without echoing those values. gws also loads unset variables from a .env in the working directory or any parent, so a project file can switch accounts: run gws, including the draft-doc and draft-mail scripts, from a directory with no .env in its path (such as the scratchpad) and check user there before writing.
  2. Inspect the installed command and live schema: use <command> --help for flags and schema for the API contract. Start without recursive reference expansion; inspect a referenced type separately when needed.

    gws schema <service.resource.method>
    gws schema <service.TypeName>
  3. Start with a bounded read: pass identifiers, filters, and only the needed fields and date range through --params; use --page-all --page-limit <n> only when every page is needed. It emits NDJSON with one object per page, not one JSON array; keep nextPageToken (and Drive incompleteSearch) in fields, because reaching --page-limit with a remaining token means the result is incomplete.

    gws drive files list --params '{"pageSize":10,"q":"trashed = false","fields":"nextPageToken,incompleteSearch,files(id,name,mimeType)"}' --format json
  4. Choose the content path: read service recipes for metadata versus bodies, Docs tabs, Sheets ranges, Gmail MIME/replies, Calendar times, Slides and Drive exports. Prefer a +helper listed by gws <service> --help when its documented semantics match the request.
  5. Prepare writes exactly: resolve the service, stable identifiers or ranges, content, recipients, and sharing effects first. Follow file-based requests to serialize multiline content, separate --params from --json, and inspect a --dry-run. It validates request construction, not permissions or server acceptance. For Chat, follow formatting and threads before composing text.
  6. Write with authority: reuse authority already supplied by the user for the intended create or edit; ask only for missing consequential scope, using the one-off grants in dot-cli authentication. Sending mail or Chat, destructive changes, and permission changes require explicit authority. Prepare the concrete request before asking for missing approval.
  7. Apply the smallest call: no broad search followed by an unreviewed batch mutation; keep retries idempotent with stable request identifiers or a read-before-write guard where the API supports them.
  8. Verify by reading back: fetch the changed resource and compare the requested fields; for messages and events, separate accepted API state from recipient-visible delivery.

Task guides

<!-- guides:start -->
  • cli-details: Use local Workspace helpers and diagnose CLI authentication, schema, pagination, or request failures.
<!-- guides:end -->

Official Skills

Upstream: googleworkspace/cli skills, which generates a shared base skill plus one selection per API. Discover with DISABLE_TELEMETRY=1 skills add googleworkspace/cli --list. Follow the shared vendor-skill policy and include the base dependency required by the chosen service.

Documentation

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.