Skip to content
Skillpedia
Prompts & LLMs32k · #6277

gws-modelarmor-sanitize-response

Lets your agent check AI responses with a safety model. Helps ensure AI outputs are safe and reliable.

What it does

This tool cleans and checks text generated by an AI to ensure it's safe and appropriate before being shown to anyone. It uses a predefined safety model for this verification.

When to use it

  • ✓When you want to be sure the AI's response doesn't contain inappropriate content.
  • ✓Before displaying an AI response to a customer or audience.
  • ✓To apply specific safety rules to AI responses.

Example of what to ask your AI

“Clean this AI response using the 'my-safety-model' security template: [AI response here]”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor-sanitize-response/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor-sanitize-response/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

You provide the text the AI generated and the name of a safety model. The tool then uses this model to review the text and remove or flag any content that doesn't comply with the rules.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-response

Or download just the file:

curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/gws-modelarmor-sanitize-response/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

modelarmor +sanitize-response

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

Sanitize a model response through a Model Armor template

Usage

gws modelarmor +sanitize-response --template <NAME>

Flags

Flag Required Default Description
--template ✓ — Full template resource name (projects/PROJECT/locations/LOCATION/templates/TEMPLATE)
--text — — Text content to sanitize
--json — — Full JSON request body (overrides --text)

Examples

gws modelarmor +sanitize-response --template projects/P/locations/L/templates/T --text 'model output'
model_cmd | gws modelarmor +sanitize-response --template ...

Tips

  • Use for outbound safety (model -> user).
  • For inbound safety (user -> model), use +sanitize-prompt.

See Also

FAQ

What's the difference between 'sanitize-response' and 'sanitize-prompt'?

'Sanitize-response' is for checking what the AI will say to you (output). 'Sanitize-prompt' is for checking what you say to the AI (input).

What is a 'template'?

A 'template' is a set of safety rules you define to check text. It's like a custom filter.

Do I need to know how to code to use this?

No, you just need to know the command and the name of the safety model you want to use.

Details

Original description by the author

Google Model Armor: Sanitize a model response through a Model Armor template.

repo: googleworkspace/cli

Popularity

GitHub stars
32k
Ranking position
#6277
License
Apache-2.0
Updated
10/6/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills