
The gws-modelarmor-sanitize-response skill allows Google Workspace CLI users to filter model-generated responses through a Model Armor template to ensure outbound safety before content reaches end users. It accepts model output via command-line flags or standard input and applies configured safety policies to detect and sanitize potentially harmful content. This skill is designed for developers integrating AI models into Google Workspace applications who need to implement outbound content filtering as part of their safety pipeline.
$ npx -y skills add googleworkspace/cli --skill gws-modelarmor-sanitize-response --agent claude-codeInstalls into .claude/skills of the current project.
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
Sanitize a model response through a Model Armor template
gws modelarmor +sanitize-response --template <NAME>
| 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) |
gws modelarmor +sanitize-response --template projects/P/locations/L/templates/T --text 'model output'
model_cmd | gws modelarmor +sanitize-response --template ...
Sponsors