PlugWiki

gws-modelarmor: a Google Workspace CLI skill for Claude

Makes Claude screen prompts and model replies through Google Cloud Model Armor with the gws tool.

Installs
30.3K
on skills.sh
Stars
32K
on GitHub
Updated
Oct 2026
last repo commit

gws-modelarmor teaches Claude the gws modelarmor commands. They run a user prompt or a model response through a Model Armor template to sanitize it, and they can create a new template. The helper commands live in three companion skills that SKILL.md links to, and the install box adds them.

It needs the gws command-line tool installed and signed in to your Google account, plus these skills, which the install box adds: gws-shared, gws-modelarmor-sanitize-prompt, gws-modelarmor-sanitize-response, gws-modelarmor-create-template. Claude runs the gws commands in your terminal, so it works in an agent that can run shell commands. Ask for the job in plain words and give your own names, dates and addresses.

Good for

  • Developers who want prompt and response screening in an agent
  • Security teams that already use Google Cloud Model Armor
  • Claude Code or Codex users who already run the gws command-line tool

Install gws-modelarmor

Claude Code

  1. 1

    Copy this prompt.

    Install the gws-modelarmor skill in Claude Code. Run this command:
    
    npm install -g @googleworkspace/cli
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js 18 or newer.

Read-only mode: Add --dry-run to a gws command to check the request without calling the API.

Run all three steps in order. The skills only drive the gws program, so it must be installed and signed in first. The skills CLI adds 5 skills: gws-shared, gws-modelarmor-sanitize-prompt, gws-modelarmor-sanitize-response, gws-modelarmor-create-template, gws-modelarmor. At sign-in, choose only the Google services this skill needs, for example gws auth login -s drive,gmail,sheets. The README warns that the full recommended scope list fails for unverified apps, and gives a manual OAuth route if gcloud is not available. The Claude app is not covered: the README does not document it, and gws has to run on your own computer.

From the project README. Source.

What's in the skill

When it loads

Google Model Armor: Filter user-generated content for safety.

Sections in SKILL.md

  1. Helper Commands
  2. Discovering Commands

Key facts

License
Apache-2.0
Skill version
0.22.5
Installs on skills.sh
30,279 as of 2026-11-02
Last repo commit
2026-10-30

What it includes

  • Claude reads the shared gws skill for sign-in and safety rules

    SKILL.md opens with a note to read ../gws-shared/SKILL.md for sign-in, global flags and security rules, and to run gws generate-skills if it is missing.

    Prerequisite: read gws-shared

  • The general form of every Model Armor call

    The command shape for the Model Armor API: a resource, a method and flags.

    Runs code · gws modelarmor <resource> <method>

  • Screens a user prompt through a Model Armor template

    Takes --template (required) plus --text, or --json for a full request body. With neither, it reads the text from stdin. For text going out of the model, SKILL.md points to +sanitize-response.

    Runs code · +sanitize-prompt

  • Screens a model response through a Model Armor template

    Same flags as +sanitize-prompt. The companion skill says to use it for outbound safety, from model to user.

    Runs code · +sanitize-response

  • Creates a new Model Armor template in a Google Cloud project

    Takes --project, --location and --template-id. It uses the jailbreak preset unless you pass --preset or --json. The companion skill marks it as a write command to confirm with you first.

    Runs code · +create-template

  • Claude checks a method's parameters before it calls it

    Claude runs gws modelarmor --help to browse resources and methods, and gws schema to see a method's required parameters, types and defaults. It builds --params and --json from that.

    Runs code · Discovering commands

From the official docs

Permissions

Medium risk

It can create Model Armor templates in your Google project. Sign in with only the Google service this skill needs, and ask Claude to confirm each change before it runs.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It can create Model Armor templates in your Google project

    The create-template helper is marked as a write command to confirm with you first. Check the project, location and template ID before Claude runs it. github.com

  • Text you screen is sent to Model Armor

    The sanitize commands send the prompt or reply text to a Model Armor template. Check the template and project before you screen private text. github.com

  • Sign in with only the Google service you need

    gws signs in with OAuth through a Google Cloud project, and your choice at gws auth login decides what it can reach. The README says the full recommended preset has 85+ scopes and fails for unverified apps. github.com

  • gws is not an official Google product

    The README says so, and warns to expect breaking changes before v1.0. Its npm route downloads the gws binary from GitHub Releases. github.com

Technical details
Turning on read-onlygws has a --dry-run flag that validates a request locally without calling the API.
Talks toGoogle Workspace APIs, called by the gws program. Google Discovery Service, which gws reads at runtime
Sign-in and keysgws signs in with Google OAuth. The README says credentials are encrypted at rest (AES-256-GCM), with the key in your OS keyring, or in ~/.config/gws/.encryption_key when the file backend is chosen.
Scopes
  • Whatever you choose at gws auth login

Questions

What do I get from gws-modelarmor?

Claude can run the gws modelarmor commands: screen a prompt, screen a model reply, and create a template. You need a Google Cloud project with Model Armor and a template name in the form projects/PROJECT/locations/LOCATION/templates/TEMPLATE.

How do I install gws-modelarmor?

Use the install box at the top of this page. It adds gws-modelarmor, gws-shared and gws-modelarmor-sanitize-prompt, gws-modelarmor-sanitize-response and gws-modelarmor-create-template with the skills CLI. You also need the gws program installed and signed in to Google, which the first two steps in the box cover. The README lists Node.js 18+ for the npm install and a Google Cloud project for sign-in.

Do I need a Google Cloud project or an API key?

You need a Google Cloud project for sign-in. The README describes OAuth sign-in with a Google account, and it also supports a service account file or a pre-obtained access token. gws auth setup creates the project for you but needs the gcloud CLI. Without gcloud, the README has a manual OAuth route. In testing mode Google limits an unverified app to about 25 scopes, so pick individual services at sign-in.

Is gws-modelarmor safe to run?

Use it with care. It can create Model Armor templates in your Google project. The gws-shared skill tells the agent to confirm write and delete commands with you and to prefer --dry-run for destructive operations. The README says gws is not an officially supported Google product and that breaking changes are expected before v1.0. Watch the first run yourself.

Does gws-modelarmor work in the Claude app or Codex?

The install box has Claude Code and Codex tabs that use the skills CLI. The README does not document the Claude app, and the skill only drives a gws program installed on your own computer. The README also documents OpenClaw and a Gemini CLI extension for the repo's skills.

How is it different from the --sanitize flag?

The gws README and gws-shared describe --sanitize as a global flag that screens API responses through a Model Armor template, to catch prompt injection before it reaches your agent. This skill covers the modelarmor commands themselves. The README says the mode is warn by default or block.

Information

updated Nov 2, 2026

Folder
skills/gws-modelarmor

googleworkspace/cliskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 6
  1. googleworkspace/cli README · github.com
  2. gws-shared SKILL.md · github.com
  3. gws-modelarmor SKILL.md · github.com
  4. gws-modelarmor-create-template SKILL.md · github.com
  5. gws-modelarmor-sanitize-prompt SKILL.md · github.com
  6. gws-modelarmor-sanitize-response SKILL.md · github.com

Updated Nov 2, 2026.