Skip to content
Skillpedia
Prompts & LLMs32k · #6276

gws-modelarmor-sanitize-prompt

Lets your agent clean and check user prompts with a safety model. Ensures user inputs are safe and appropriate.

What it does

This tool helps clean and prepare text you want to send to an artificial intelligence. It uses a predefined template to ensure the text is safe and appropriate.

When to use it

  • ✓When you want to make sure your question to the AI won't cause issues.
  • ✓Before sending sensitive information to the AI.
  • ✓To standardize the format of questions for different AIs.

Example of what to ask your AI

“Clean my prompt: 'Tell me about the secrets of the universe.' using the 'universal-secrets-template'.”

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-prompt/SKILL.md

Ready-to-paste message

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

You provide the text you want to clean and the name of a cleaning template. The tool applies the rules of that template to your text.

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-prompt

Or download just the file:

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

Original text by the author, straight from GitHub.

modelarmor +sanitize-prompt

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

Sanitize a user prompt through a Model Armor template

Usage

gws modelarmor +sanitize-prompt --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-prompt --template projects/P/locations/L/templates/T --text 'user input'
echo 'prompt' | gws modelarmor +sanitize-prompt --template ...

Tips

  • If neither --text nor --json is given, reads from stdin.
  • For outbound safety, use +sanitize-response instead.

See Also

FAQ

What is a 'template'?

It's a set of predefined rules that the tool uses to clean your text.

What happens if I don't provide text?

The tool will read the text you type directly in the terminal or copy from elsewhere.

Can I use this to clean the AI's responses?

No, this tool is for cleaning what you send to the AI. To clean responses, use the '+sanitize-response' tool.

Details

Original description by the author

Google Model Armor: Sanitize a user prompt through a Model Armor template.

repo: googleworkspace/cli

Popularity

GitHub stars
32k
Ranking position
#6276
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