bygoogleworkspace· 58 skills
Google Model Armor: Sanitize a user prompt through a Model Armor template.
$npx -y skills add googleworkspace/cli --skill gws-modelarmor-sanitize-promptInstalls into the current project.
Run `npx skills use "https://github.com/googleworkspace/cli" --skill "googleworkspace/cli/gws-modelarmor-sanitize-prompt"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/googleworkspace/cli" that are relevant to the current task. Run `npx skills add "https://github.com/googleworkspace/cli"` and select the relevant skills, then follow their instructions.
| 1 | # modelarmor +sanitize-prompt |
| 2 | |
| 3 | > **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. |
| 4 | |
| 5 | Sanitize a user prompt through a Model Armor template |
| 6 | |
| 7 | ## Usage |
| 8 | |
| 9 | ```bash |
| 10 | gws modelarmor +sanitize-prompt --template <NAME> |
| 11 | ``` |
| 12 | |
| 13 | ## Flags |
| 14 | |
| 15 | | Flag | Required | Default | Description | |
| 16 | |------|----------|---------|-------------| |
| 17 | | `--template` | ✓ | — | Full template resource name (projects/PROJECT/locations/LOCATION/templates/TEMPLATE) | |
| 18 | | `--text` | — | — | Text content to sanitize | |
| 19 | | `--json` | — | — | Full JSON request body (overrides --text) | |
| 20 | |
| 21 | ## Examples |
| 22 | |
| 23 | ```bash |
| 24 | gws modelarmor +sanitize-prompt --template projects/P/locations/L/templates/T --text 'user input' |
| 25 | echo 'prompt' | gws modelarmor +sanitize-prompt --template ... |
| 26 | ``` |
| 27 | |
| 28 | ## Tips |
| 29 | |
| 30 | - If neither --text nor --json is given, reads from stdin. |
| 31 | - For outbound safety, use +sanitize-response instead. |
| 32 | |
| 33 | ## See Also |
| 34 | |
| 35 | - [gws-shared](../gws-shared/SKILL.md) — Global flags and auth |
| 36 | - [gws-modelarmor](../gws-modelarmor/SKILL.md) — All filter user-generated content for safety commands |