
Gws Modelarmor Sanitize Prompt
The gws-modelarmor-sanitize-prompt skill sanitizes user-generated prompts through Google Model Armor templates to detect and filter potentially unsafe content before it reaches AI models. It's designed for Google Workspace CLI users who need to implement inbound safety measures for user inputs, supporting both direct text input and stdin piping. The skill solves the problem of identifying and mitigating prompt injection attacks and harmful content in user submissions by leveraging pre-configured Model Armor templates.
- skills.sh installs
- 30.3K
- GitHub stars
- 32.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
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
- gws-shared — Global flags and auth
- gws-modelarmor — All filter user-generated content for safety commands
Sponsors
Details
- Repository
- github.com/googleworkspace/cli
- Categories
- AI & Agent Building, CLI & Terminal, Office & Documents
More from googleworkspace/cli
All 113- Gws Classroom30.2K
- Gws Modelarmor Sanitize Response30.2K
- Recipe Log Deal Update30.2K
- Recipe Create Classroom Course30K
- Gws Script27.3K
- Gws Script Push26.7K
- Gws Admin670
- Recipe Batch Rename Files634
- Gws Apps Script629
- Recipe Cancel And Notify624
- Recipe Batch Reply To Emails621
- Gws Apps Script Push620
- Recipe Send Personalized Emails620
- Recipe Search And Export Emails619
- Recipe Audit External Sharing602
- Gws Groupssettings598
- Recipe Deploy Apps Script596
- Recipe Triage Security Alerts583
- Recipe Transfer File Ownership582
- Gws Alertcenter570
- Gws Cloudidentity568
- Gws Vault563
- Gws Licensing552
- Gws Reseller541