gws-modelarmor
googleworkspace/cli
Filter user-generated content for safety using Google Model Armor templates.
What is gws-modelarmor?
Google Model Armor is a safety filtering service that sanitizes user prompts and model responses through configurable templates. Use it to protect applications from harmful content and ensure compliance with safety policies.
- Sanitize user prompts before sending to models
- Filter model responses for safety violations
- Create and manage custom Model Armor templates
- Inspect API schemas to understand required parameters
- Apply safety policies consistently across interactions
How to install gws-modelarmor
npx skills add null --skill gws-modelarmor- Google Workspace CLI (gws) installed and configured
- Authentication set up via gws-shared skill
- Access to Google Model Armor API
How to use gws-modelarmor
- 1.Run `gws modelarmor --help` to browse available resources and methods
- 2.Use `gws schema modelarmor.<resource>.<method>` to inspect required parameters
- 3.Call `gws modelarmor sanitize-prompt` to filter user input before processing
- 4.Call `gws modelarmor sanitize-response` to filter model output
- 5.Create custom templates with `gws modelarmor create-template` for organization-specific policies
Use cases
- Sanitize user input in chatbot applications before processing
- Filter AI-generated responses to remove harmful content
- Create organization-specific safety templates for content moderation
- Validate prompts and responses against custom safety policies
- Protect user-facing applications from unsafe content generation
- AI application developers
- Content moderation teams
- Security and compliance engineers
- Teams building chatbots or generative AI products
gws-modelarmor FAQ
sanitize-prompt filters user input before it reaches the model, while sanitize-response filters the model's output before returning it to users.
Yes, use the create-template command to build organization-specific Model Armor templates tailored to your safety requirements.
No, authentication is handled by the gws-shared skill. Ensure it is installed and configured first.
Run `gws modelarmor --help` to browse resources, then use `gws schema modelarmor.<resource>.<method>` to inspect parameters.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
name: gws-modelarmor description: "Google Model Armor: Filter user-generated content for safety." metadata: version: 0.22.5 openclaw: category: "productivity" requires: bins: - gws cliHelp: "gws modelarmor --help"
modelarmor (v1)
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
gws modelarmor <resource> <method> [flags]
Helper Commands
| Command | Description |
|---|---|
+sanitize-prompt | Sanitize a user prompt through a Model Armor template |
+sanitize-response | Sanitize a model response through a Model Armor template |
+create-template | Create a new Model Armor template |
Discovering Commands
Before calling any API method, inspect it:
# Browse resources and methods
gws modelarmor --help
# Inspect a method's required params, types, and defaults
gws schema modelarmor.<resource>.<method>
Use gws schema output to build your --params and --json flags.
Related skills
More from googleworkspace/cli and the wider catalog.
gws-gmail
Send, read, and manage Gmail emails via Google Workspace CLI.
gws-drive
Manage Google Drive files, folders, and shared drives via CLI.
gws-docs
Read and write Google Docs via command line.
gws-calendar
Manage Google Calendar events, calendars, and access control via CLI.
gws-sheets
Read and write Google Sheets spreadsheets via CLI.
gws-gmail-send
Send emails via Gmail with attachments, CC/BCC, HTML support, and draft options.