openclaw/skills/gws-shared/SKILL.md
gws CLI: Shared patterns for authentication, global flags, and output formatting.
npx skillsauth add Dbochman/dotfiles gws-sharedInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The gws binary must be on $PATH. See the project README for install options.
Credentials are AES-256-GCM encrypted at ~/.config/gws/. Auth requires a browser (OAuth) — auth locally, then scp credentials + .encryption_key + accounts.json to headless machines.
DANGER: gws auth logout without --account <email> NUKES ALL accounts. Always use gws auth logout --account <email> for per-account removal.
| Account | Owner | Flag |
|---------|-------|------|
| [email protected] | Dylan | Default (no flag needed) |
| [email protected] | Julia | --account [email protected] |
| [email protected] | Dylan (spam) | --account [email protected] |
| [email protected] | OpenClaw | --account [email protected] |
When Dylan asks about "my email/calendar/drive", use default. When he says "Julia's", use her account.
| Flag | Description |
|------|-------------|
| --format <FORMAT> | Output format: json (default), table, yaml, csv |
| --dry-run | Validate locally without calling the API |
| --sanitize <TEMPLATE> | Screen responses through Model Armor |
gws <service> <resource> [sub-resource] <method> [flags]
| Flag | Description |
|------|-------------|
| --params '{"key": "val"}' | URL/query parameters |
| --json '{"key": "val"}' | Request body |
| -o, --output <PATH> | Save binary responses to file |
| --upload <PATH> | Upload file content (multipart) |
| --page-all | Auto-paginate (NDJSON output) |
| --page-limit <N> | Max pages when using --page-all (default: 10) |
| --page-delay <MS> | Delay between pages in ms (default: 100) |
--account vs GOOGLE_WORKSPACE_CLI_ACCOUNTThe CLI has two ways to pick an account, and they don't behave identically:
--account <email> — works on the helper subcommands (+agenda, +insert, +inbox, etc.) and on gws auth ....GOOGLE_WORKSPACE_CLI_ACCOUNT=<email> — works on EVERYTHING, including the raw API resource calls (calendar events list, gmail users messages get, calendar calendarList list, etc.).Calling raw API endpoints with --account may return 401 "No credentials provided" even though the account is fully authenticated — the flag isn't plumbed through to those code paths in v0.4.4. Set the env var instead:
[email protected] gws calendar events list \
--params '{"calendarId":"primary","maxResults":3}'
For scripts that hit raw endpoints, export the var once at the top instead of passing --account per call.
The gws CLI occasionally returns this error mid-token-refresh:
{"error":{"code":401,"message":"<service> auth failed: Failed to get token","reason":"authError"}}
This is a race, not a real auth failure: the local token cache is being rewritten while the API call reads it. Distinguishable from real auth failures because real ones say Access denied. No credentials provided. Run gws auth login instead.
When you see "Failed to get token", retry once after sleeping 3-5 seconds before reporting auth failure. A second call almost always succeeds.
out=$(gws calendar +agenda --days 7 2>&1)
if echo "$out" | grep -q '"Failed to get token"'; then
sleep 5
out=$(gws calendar +agenda --days 7 2>&1)
fi
echo "$out"
Hit on 2026-05-02 — Dylan's morning briefing fired at 08:00 ET, which was the exact moment the token cache file was being rewritten. The agent saw the 401, didn't retry, and reported "Calendar auth is failing" in the briefing. Manual retry 30 minutes later worked first try.
--dry-run for destructive operations--sanitize for PII/content safety screeninghttps://github.com/googleworkspace/clihttps://github.com/googleworkspace/cli/issuesdevelopment
Search the web for current information, news, facts, and answers. Use when asked questions about current events, needing to look something up, finding websites, researching topics, or when you need up-to-date information beyond your training data.
development
Summarize any URL, YouTube video, podcast, PDF, or file into concise text. Use when asked to read an article, summarize a link, get the gist of a video or podcast, extract content from a URL, or when you need to understand what a web page or document contains.
development
Play music via Spotify and control Google Home speakers. Use when asked to play music, songs, artists, playlists, podcasts, or control speakers/volume/audio.
testing
Create new OpenClaw skills, modify and improve existing skills, and measure skill performance with evals. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. Also use when asked to "make a skill", "turn this into a skill", "improve this skill", or "test this skill".