Skip to content
Back to skills

Gws Shared

ASecurity

gws program: signing in, flags every command takes, output.

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 6, 2026
ai-agentsgoshellbashnodetestinggitapi

Works with

  • terminal
  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned November 6, 2026

npx -y skills add marqueskaio/atlas --skill gws-shared --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Gws Shared?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Gws Shared
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/marqueskaio-gws-shared/badge)](https://www.skillsdirectory.com/skills/marqueskaio-gws-shared)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: gws-shared
description: "gws program: signing in, flags every command takes, output."
metadata:
  version: 0.22.5
  category: "productivity"
  requires:
    bins:
      - gws
---

# gws: what every Google Workspace skill relies on

## Getting the program

Atlas runs `gws`, so the program has to be found on `$PATH`. Where Node.js 18 or newer is
installed, `npm install -g @googleworkspace/cli` downloads the binary that fits the machine. Without
Node, the binary comes from the GitHub Releases page of the `gws` project, or, on macOS and Linux,
from `brew install googleworkspace-cli`.

## Signing in

Start by running `gws auth status`. The sign-in itself is done by the user, a single time:

```bash
# Needs gcloud, signed in: makes the Cloud project, turns the APIs on and signs in
gws auth setup

# Later on, or when the OAuth client was made by hand in the Google Cloud console
gws auth login -s gmail,calendar
```

- `gws auth setup` asks its questions in a terminal, and the commands Atlas runs get no input. So
  ask the user to run it in their own terminal and to tell you once it has finished.
- `gws auth login` opens a browser and waits there for the user. You may run this one; tell the
  user beforehand what they will see.

- Request just the services the user will use (`-s gmail,calendar`). An app Google has not
  verified (testing mode) gets roughly 25 scopes at most, so the full preset fails, and on
  `@gmail.com` accounts most of all.
- On the consent screen, "Google hasn't verified this app" is normal when the project is the
  user's own. They click Continue.
- "Error 403: access_denied" ("the app has not completed Google's verification") says the app is
  in testing and the user's account is not a test user of it. They add the account in Audience,
  Test users, at `https://console.cloud.google.com/auth/audience`, then sign in again.
- `gws auth status` shows which APIs the project has turned on. When one the user needs is off,
  `gcloud services enable <api>.googleapis.com --project <id>` turns it on (Atlas asks first).
- A login in testing mode lasts 7 days before Google expires it. Publishing the app for the user
  alone ("In production", left unverified) makes it last.
- Where there is no browser (a container, a server), the user signs in on their own computer and
  runs `gws auth export --unmasked > credentials.json` there; the server is pointed at that file by
  `GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE`. Never print what the file holds.

## Flags any command accepts

| Flag | What it does |
|------|--------------|
| `--format <FORMAT>` | How output is printed: `json` (the default), `table`, `yaml` or `csv` |
| `--dry-run` | Checks the call locally and sends nothing to the API |
| `--sanitize <TEMPLATE>` | Passes responses through a Model Armor screen |

## How a command is built

```bash
gws <service> <resource> [sub-resource] <method> [flags]
```

### Flags of an API method

| Flag | What it does |
|------|--------------|
| `--params '{"key": "val"}'` | Parameters that go in the URL or query string |
| `--json '{"key": "val"}'` | The body of the request |
| `-o, --output <PATH>` | Writes a binary response to a file |
| `--upload <PATH>` | Sends a file's content (multipart) |
| `--page-all` | Follows every page by itself, printing NDJSON |
| `--page-limit <N>` | How many pages --page-all reads at most (10 unless set) |
| `--page-delay <MS>` | Milliseconds to wait between pages (100 unless set) |

## Keeping the user safe

- **Never** print a secret (an API key, a token) as it is.
- **Every command that writes or deletes goes through Atlas's approval** (send, reply, forward,
  insert, update, delete, `gws auth export`). State in one line what you are going to do, then
  run it: the user's approval is the confirmation. Don't ask for it in chat beforehand, and when
  the user refuses, don't look for another way to get the same result.
- For a destructive operation, reach for `--dry-run` first.
- To screen for personal data or unsafe content, use `--sanitize`.

## Quoting in the shell

- **`!` in zsh:** a sheet range such as `Sheet1!A1` holds a `!`, which zsh takes for history
  expansion. Put the value in double quotes (escaping any quotes inside) rather than single quotes:
  ```bash
  # Breaks in zsh: the ! is expanded
  gws sheets +read --spreadsheet ID --range 'Sheet1!A1:D10'

  # Works
  gws sheets +read --spreadsheet ID --range "Sheet1!A1:D10"
  ```
- **JSON values:** put single quotes around what `--params` and `--json` receive, so the double
  quotes inside reach `gws` untouched by the shell:
  ```bash
  gws drive files list --params '{"pageSize": 5}'
  ```

- **Windows PowerShell 5.1** strips the double quotes inside an argument it hands to a program, so
  `--params '{"pageSize": 5}'` arrives at `gws` broken. Escape them (`'{\"pageSize\": 5}'`), or use
  PowerShell 7.3 or newer, which passes them through as written.

## When gws itself is wrong

- A bug in `gws`, or a feature it lacks, is reported at `https://github.com/googleworkspace/cli/issues`: send the user there.
- Before a new issue is opened, **always** look through the issues and feature requests already filed.
- When one already covers it, the user adds what they know as a comment on that thread, and does not open a second one.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.