
gws-modelarmor-sanitize-prompt
โ Officialโ 29,425by Google ยท part of googleworkspace/cli
Google Model Armor: Sanitize a user prompt through a Model Armor template.
๐ฅ๐ฅโ VerifiedFreeQuick setup
๐งฐ Not standalone. This skill ships with googleworkspace/cli and only works together with that tool โ install the tool first, then add this skill.
This is the playbook your agent receives when the skill activates โ you don't need to read it to use the skill, but it's here to audit before installing.
modelarmor +sanitize-prompt
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
Sanitize a user prompt through a Model Armor template
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
- gws-shared โ Global flags and auth
- gws-modelarmor โ All filter user-generated content for safety commands
Copy & paste โ that's it
npx skills add googleworkspace/cli --skill "gws-modelarmor-sanitize-prompt" --full-depthRun this in your project โ your agent picks the skill up automatically.
Usage
gws modelarmor +sanitize-prompt --template <NAME>No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.
Licensed under Apache-2.0โ you can use, modify, and redistribute it under that license's terms.
View the full license file on GitHub โ