Agent skill

Workspace Events Subscribe

by googleworkspace in googleworkspace/cli

Subscribes to Google Workspace events with the gws CLI and streams them as NDJSON, with flags for the target resource, event types, Pub/Sub project and output directory.

Apache-2.0Auto-check passedProductivity & Automation

Install Workspace Events Subscribe

skills CLI
$ npx skills add googleworkspace/cli --skill gws-events-subscribe -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install googleworkspace/cli gws-events-subscribe --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/googleworkspace/cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/gws-events-subscribe .claude/skills/gws-events-subscribe && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gws-events-subscribe
GitHub stars
31k
Token cost
~509 tokens
SKILL.md length
147 words
Files
1
Skills in repo
77
Repo updated
First seen
Licence
Apache-2.0

At a glance

Subscribes to Google Workspace events with the gws CLI and streams them as NDJSON, with flags for the target resource, event types, Pub/Sub project and output directory.

  • Streaming Google Chat message events as they are created
  • SKILL.md covers Usage, Flags, Examples and Tips, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Listening to Workspace events from an existing Pub/Sub subscription

What it does

The skill documents one command, gws events +subscribe, which subscribes to events on a Workspace resource and streams them as newline-delimited JSON. Flags set the target resource URI, such as a Chat space, the CloudEvents types, the GCP project for Pub/Sub resources, or an existing subscription to skip setup. It pulls messages in batches, 10 by default every 5 seconds, and can pull once and exit, leave messages unacknowledged, or write each event to its own JSON file in an output directory.

Without --cleanup the Pub/Sub resources it creates remain for reconnection, and with it they are deleted on exit. Ctrl-C stops it gracefully. The skill marks this as a write command that needs your confirmation first, and its prerequisite is the shared gws skill covering authentication, global flags and security rules.

When your agent uses it

  • Streaming Google Chat message events as they are created
  • Listening to Workspace events from an existing Pub/Sub subscription
  • Saving each Workspace event to its own JSON file
  • Pulling a single batch of events for a quick check

Example prompts

  • “Subscribe to new message events in my Chat space and stream them as NDJSON.”
  • “Pull once from the Pub/Sub subscription projects/p/subscriptions/my-sub and exit.”
  • “Stream Workspace events into ./events and clean up the Pub/Sub resources when I stop.”

Requirements

  • The gws CLI, authenticated
  • A Google Cloud project with Pub/Sub
  • The shared gws skill

What it can do on your machine

Read from SKILL.md and the folder at commit a3768d0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Workspace Events Subscribe loads about 509 tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 147 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~26
When it runs · the whole SKILL.md, loaded when a task matches
~509

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from googleworkspace/cli at commit a3768d0, republished under its Apache-2.0 licence (© googleworkspace). 147 words, ~509 tokens.

Download SKILL.mdSave it as .claude/skills/gws-events-subscribe/SKILL.md (or your agent's skills folder).
name
gws-events-subscribe
description
Google Workspace Events: Subscribe to Workspace events and stream them as NDJSON.
metadata.version
0.22.5

events +subscribe

PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.

Subscribe to Workspace events and stream them as NDJSON

Usage

bash
gws events +subscribe

Flags

FlagRequiredDefaultDescription
--target——Workspace resource URI (e.g., //chat.googleapis.com/spaces/SPACE_ID)
--event-types——Comma-separated CloudEvents types to subscribe to
--project——GCP project ID for Pub/Sub resources
--subscription——Existing Pub/Sub subscription name (skip setup)
--max-messages—10Max messages per pull batch (default: 10)
--poll-interval—5Seconds between pulls (default: 5)
--once——Pull once and exit
--cleanup——Delete created Pub/Sub resources on exit
--no-ack——Don't auto-acknowledge messages
--output-dir——Write each event to a separate JSON file in this directory

Examples

bash
gws events +subscribe --target '//chat.googleapis.com/spaces/SPACE' --event-types 'google.workspace.chat.message.v1.created' --project my-project
gws events +subscribe --subscription projects/p/subscriptions/my-sub --once
gws events +subscribe ... --cleanup --output-dir ./events

Tips

  • Without --cleanup, Pub/Sub resources persist for reconnection.
  • Press Ctrl-C to stop gracefully.

[!CAUTION] This is a write command — confirm with the user before executing.

See Also

  • gws-shared — Global flags and auth
  • gws-events — All subscribe to google workspace events commands

© googleworkspace, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/gws-events-subscribe of googleworkspace/cli.

Open the folder on GitHubat commit a3768d0

Compare with similar skills

Workspace Events Subscribe next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Workspace Events Subscribe compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Workspace Events Subscribe this skillgoogleworkspace/cli31k—~509Automated safety check: PassApache-2.0
Google Cloud Vision AutomationComposioHQ/awesome-claude-skills77k3 repos~775Automated safety check: PassNone
Google Workspace CLIlaude-institute/headlong1.2k—~1.2kAutomated safety check: PassApache-2.0
Google Workspace CLILeoYeAI/openclaw-master-skills2.2k—~2.6kAutomated safety check: NotesMIT
Google Admin AutomationComposioHQ/awesome-claude-skills77k3 repos~1.7kAutomated safety check: PassNone
Google Workspaceericrisco/rsc-harness174—~3.2kAutomated safety check: PassMIT

Similar skills

  • Google Cloud Vision Automation

    ComposioHQ/awesome-claude-skills

    Automate Google Cloud Vision tasks via Rube MCP (Composio). An agent skill from ComposioHQ/awesome-claude-skills.

    77k GitHub starsUsed in 3 repos~775 tokens
    Productivity & AutomationAuto-check passed
  • Google Workspace CLI

    laude-institute/headlong

    Drives Google Drive, Gmail, Calendar, Sheets, Docs and Chat from the shell with the gws CLI, including its sign-in, flags, helper commands and safety rules.

    1.2k GitHub stars~1.2k tokensUpdated 2 days ago
    Productivity & AutomationAuto-check passed
  • Google Workspace CLI

    LeoYeAI/openclaw-master-skills

    Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check: notes
  • Google Admin Automation

    ComposioHQ/awesome-claude-skills

    Automate Google Workspace Admin tasks via Rube MCP (Composio): manage users, groups, memberships, suspend accounts, create users, add aliases.

    77k GitHub starsUsed in 3 repos~1.7k tokens
    Productivity & AutomationAuto-check passed
  • Google Workspace

    ericrisco/rsc-harness

    A skill your agent uses when server-side code reads or writes Gmail, Drive, Calendar, or Sheets with a GCP service account and no human in the OAuth loop: picking the auth mode (app-owned vs…

    174 GitHub stars~3.2k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • GCP Workspace Pivot

    wgpsec/AboutSecurity

    GCP 到 Google Workspace 的穿越攻击方法论。当已获取 GCP Service Account 或 Project 权限并发现目标组织使用 Google Workspace、需要从云平台穿越到企业邮件/文档/管理控制台、或发现 Domain-Wide Delegation 配置时使用。覆盖 Domain-Wide Delegation 滥用、OAuth…

    1.8k GitHub stars~2.9k tokensUpdated yesterday
    Backend & APIsAuto-check passed

More from googleworkspace/cli

All 77 skills in this repo
  • Gmail Inbox Watcher

    googleworkspace/cli

    Streams new Gmail messages as NDJSON from the gws command line tool using Google Pub/Sub, with label filters, batch settings and optional per-message files.

    31k GitHub starsUsed in 1 repo~476 tokens
    Auto-check passed
  • Gmail Message Forwarder

    googleworkspace/cli

    Forwards an existing Gmail message to new recipients from the command line with the gws CLI, with options for notes, attachments, CC, BCC and drafts.

    31k GitHub stars~763 tokensUpdated 3 days ago
    Auto-check passed
  • Gmail Reply via gws

    googleworkspace/cli

    Replies to a Gmail message from the gws CLI with automatic threading, plus CC, BCC, extra recipients, attachments, HTML bodies and draft or dry-run modes.

    31k GitHub stars~655 tokensUpdated 3 days ago
    Auto-check passed
  • Gws Calendar Agenda

    googleworkspace/cli

    Google Calendar: Show upcoming events across all calendars. An agent skill from googleworkspace/cli.

    31k GitHub starsUsed in 1 repo~389 tokens
    Auto-check passed
  • Gmail Reply-All Command

    googleworkspace/cli

    Replies to everyone on a Gmail message through the gws CLI, with threading handled automatically, options to add or drop recipients, and a draft mode.

    31k GitHub stars~736 tokensUpdated 3 days ago
    Auto-check passed
  • Gws Drive Upload

    googleworkspace/cli

    Google Drive: Upload a file with automatic metadata. An agent skill from googleworkspace/cli.

    31k GitHub starsUsed in 1 repo~322 tokens
    Auto-check passed

Questions about Workspace Events Subscribe

What does Workspace Events Subscribe do?

Subscribes to Google Workspace events with the gws CLI and streams them as NDJSON, with flags for the target resource, event types, Pub/Sub project and output directory. The skill documents one command, gws events +subscribe, which subscribes to events on a Workspace resource and streams them as newline-delimited JSON. Flags set the target resource URI, such as a Chat space, the CloudEvents types, the GCP project for Pub/Sub resources, or an existing subscription to skip setup.

When should I use Workspace Events Subscribe?

Workspace Events Subscribe fits situations like: streaming Google Chat message events as they are created; listening to Workspace events from an existing Pub/Sub subscription; saving each Workspace event to its own JSON file; pulling a single batch of events for a quick check.

How do I install Workspace Events Subscribe in Claude Code?

Run `npx skills add googleworkspace/cli --skill gws-events-subscribe -a claude-code`. Or copy the skill folder (skills/gws-events-subscribe in googleworkspace/cli) into .claude/skills/gws-events-subscribe in your project. Claude Code loads it when a task matches its description.

How do I install Workspace Events Subscribe in Codex?

Run `npx skills add googleworkspace/cli --skill gws-events-subscribe -a codex`. Or copy the skill folder (skills/gws-events-subscribe in googleworkspace/cli) into .agents/skills/gws-events-subscribe in your project. Codex loads it when a task matches its description.

Can I use Workspace Events Subscribe in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add googleworkspace/cli --skill gws-events-subscribe -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gws-events-subscribe, .gemini/skills/gws-events-subscribe, .github/skills/gws-events-subscribe and .opencode/skills/gws-events-subscribe in your project.

What does Workspace Events Subscribe need to run?

SKILL.md names no scripts, command-line tools or credentials: Workspace Events Subscribe is instructions for the agent only. Our summary lists: The gws CLI, authenticated; A Google Cloud project with Pub/Sub; The shared gws skill.

Does Workspace Events Subscribe access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Workspace Events Subscribe safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Workspace Events Subscribe use?

Workspace Events Subscribe is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Workspace Events Subscribe use?

About 509 tokens (SKILL.md is roughly 2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Workspace Events Subscribe?

Skills that share tags, products or a category with Workspace Events Subscribe: Google Cloud Vision Automation (ComposioHQ/awesome-claude-skills, 77k stars), Google Workspace CLI (laude-institute/headlong, 1.2k stars), Google Workspace CLI (LeoYeAI/openclaw-master-skills, 2.2k stars) and Google Admin Automation (ComposioHQ/awesome-claude-skills, 77k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Workspace Events Subscribe?

googleworkspace (a GitHub organization) maintains it in googleworkspace/cli, which has 31,280 GitHub stars. The repository holds 77 skills in this directory. The repository was last updated on October 6, 2026.

Source: googleworkspace/cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.