Skip to content

Guide · Agent skill

How to use the Google Model Armor Filter agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The gws-modelarmor skill teaches an AI agent how to use Google's Model Armor service through the gws command-line tool. Model Armor screens text for unsafe content, so this skill lets an agent check a user's prompt before it is processed or check a model's reply before it is shown. This guide explains what the skill does, how to install it, how to ask for it in plain language, and what it needs to run.

Google Model Armor Filtergoogleworkspace/cli · Apache-2.0

Quick start

  1. 1Download the ZIP. Download the gws-modelarmor skill ZIP from this page.
  2. 2Unzip the skill. Unzip it into ~/.claude/skills/ for all projects, or into .claude/skills/ inside a single project.
  3. 3Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.
  4. 4Install the gws tool. Make sure the gws command-line tool is installed and available as gws.
  5. 5Configure authentication. Set up Google Cloud and Model Armor access through the shared gws authentication described in ../gws-shared/SKILL.md.
  6. 6Ask in plain language. Request a prompt check, a response check, or a new template in plain words.
  7. 7Verify parameters. Let the agent run gws schema on the method first so the --params and --json flags are correct.

What is an agent skill?

An agent skill is a folder containing a SKILL.md file. The file gives an AI agent instructions for a specific task, so the agent knows which tool to run and how to use it. This skill is one of those folders. It does not add a new app; it teaches an agent how to work with the gws command-line tool and Google Model Armor.

What does the gws-modelarmor skill make the agent do?

The skill lists three helper commands. Each one is a task the agent can perform through a Model Armor template:

  • +sanitize-prompt: screen a user prompt before it is processed.
  • +sanitize-response: screen a model response before it is shown to a user.
  • +create-template: create a new Model Armor template that defines the filtering settings.

Install the skill

Download the skill ZIP from this page and unzip it into one of these locations:

For all your projects, unzip into ~/.claude/skills/. For a single project, unzip into that project's .claude/skills/ folder.

If you use the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.

  • Personal install: ~/.claude/skills/
  • Project install: .claude/skills/ inside your project
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

Set up the requirements

The skill needs the gws command-line tool (the source lists the binary as gws). It also needs Google Cloud and Model Armor access configured through the shared gws authentication described in ../gws-shared/SKILL.md. The skill's own file says that if that shared file is missing, you can run gws generate-skills to create it.

  • gws command-line tool installed and available as gws
  • Google Cloud / Model Armor access configured through shared gws authentication
  • Network access, since the skill uses the network

How to trigger the skill with natural requests

You do not need to type commands yourself. Describe the task in plain language and the agent should pick up the skill when the request matches what it covers. Good requests name the job: screening a prompt, screening a reply, or setting up a template.

The skill tells the agent to check exact parameters before calling anything, using gws schema, so you can ask for the check to be done first.

  • Check this user message with Model Armor before you send it to the model.
  • Screen the model's reply for unsafe content before showing it to the user.
  • Create a Model Armor template for my chat app.
  • Look up the parameters for the Model Armor sanitize prompt method before running it.

How the agent looks up commands

Before calling any API method, the agent is told to inspect it. It can browse resources and methods, then check a method's required parameters, types, and defaults. The output of gws schema is used to build the --params and --json flags.

# Browse resources and methods gws modelarmor --help # Inspect a method's required params, types, and defaults gws schema modelarmor.<resource>.<method>

Safety notes: scripts and network

This skill runs scripts and uses the network. The commands call Google's Model Armor service through gws, so review what your agent is about to run and which Google Cloud project it is connected to. The skill's source does not state how accurate its detection is, so treat Model Armor as one safety layer in your product, not a guarantee.

  • Runs scripts: yes
  • Uses network: yes
  • Detection accuracy is not stated in the skill; do not rely on it as the only safety control.

Tips for getting good results

Point the agent at the shared authentication file first if setup fails. Ask it to inspect a method with gws schema before running it, so parameters are correct. Keep your Model Armor templates named and documented so the team knows which filtering settings are in use.

  • Run gws modelarmor --help to see every resource and method.
  • Use gws schema on a specific method before building flags.
  • Run gws generate-skills if the shared authentication file is missing.

What people use it for

  • Screening a user's chat message for unsafe content before an AI model processes it.
  • Checking a model's reply before it is shown to the end user.
  • Creating a Model Armor template that defines the filtering settings for an app.
  • Browsing the modelarmor resources and methods with gws to learn what is available.

Frequently asked questions

How do I install the gws-modelarmor skill?

Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder. If you use the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills instead.

What do I need before the skill works?

You need the gws command-line tool installed as gws, and Google Cloud / Model Armor access configured through the shared gws authentication in ../gws-shared/SKILL.md. The skill also runs scripts and uses the network.

Is the gws-modelarmor skill free?

The skill is published under the Apache-2.0 licence. The source does not state pricing for Google Model Armor or the gws tool, so check Google's own terms for any costs.

What is the difference between sanitize-prompt and sanitize-response?

sanitize-prompt screens a user's prompt through a Model Armor template before it is processed. sanitize-response screens a model's reply through a template before it is shown to the user.

Why does the agent run gws schema first?

The skill tells the agent to inspect a method's required parameters, types, and defaults with gws schema before calling it. This output is used to build the --params and --json flags, which helps avoid incorrect calls.

Can I rely on this skill to make my app fully safe?

No. The skill describes Model Armor as a filter, and its source does not state detection accuracy. Use it as one layer in a wider safety approach.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Choose this skill if you are a developer building chat or AI features who wants a content-safety check on prompts and replies, especially if your team already uses Google Cloud and the gws CLI. Pick something else if you need a finished safety product with no coding or cloud setup, or if you need guaranteed safety, since the skill does not state its detection accuracy.

Download the skill