gws-modelarmor-sanitize-response — Claude Code skill: response
This skill sends a model response to Google Model Armor for filtering with a template. Use it to check output before showing it to a user.
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-response -a claude-codeWhat gws-modelarmor-sanitize-response does
The skill runs gws modelarmor +sanitize-response with a Model Armor template name. Pass response text with --text, or provide the full request body with --json; JSON takes precedence. You can also pipe a model command into the sanitizer.
You need the gws CLI and configured authentication. The shared instructions in ../gws-shared/SKILL.md cover auth and global flags; if that file is missing, the source recommends running gws generate-skills. A Model Armor template is required. Install this skill when you want to filter outgoing model responses; use +sanitize-prompt for inbound user content.
What it helps with
- filter a model response before showing it to a user
- send response text through a Model Armor template
- submit a full JSON request body for filtering
- pipe model output into the sanitizer
Example prompts for the agent
- Check this response with `gws modelarmor +sanitize-response` using `projects/P/locations/L/templates/T`.
- Run the sanitizer with the full request body passed through `--json`.
- Pipe `model_cmd` into `gws modelarmor +sanitize-response --template ...`.
How to install gws-modelarmor-sanitize-response
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-response -a claude-code2Manually: put the files in place
~/.claude/skills/gws-modelarmor-sanitize-response/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gws-modelarmor-sanitize-response/
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-response -a codex2Manually: put the files in place
.agents/skills/gws-modelarmor-sanitize-response/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-response -a cursor2Manually: put the files in place
.cursor/skills/gws-modelarmor-sanitize-response/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install googleworkspace/cli gws-modelarmor-sanitize-response2Manually: put the files in place
.github/skills/gws-modelarmor-sanitize-response/SKILL.md1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-response -a gemini-cli2Platform CLI
gemini skills install https://github.com/googleworkspace/cli --path skills/gws-modelarmor-sanitize-responseManually: put the files in place
.devin/skills/gws-modelarmor-sanitize-response/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-response -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set95
The whole set →Similar
Questions about gws-modelarmor-sanitize-response
How do I install gws-modelarmor-sanitize-response in Claude Code?
Run npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-response -a claude-code.
What does gws-modelarmor-sanitize-response do?
It sends model output to Google Model Armor for filtering with the specified template. Provide text with --text or a full request body with --json.
What does the skill need to run?
It requires the gws CLI, configured authentication, and a full template resource name such as projects/PROJECT/locations/LOCATION/templates/TEMPLATE. Authentication instructions are in ../gws-shared/SKILL.md.
Source text
SKILL.md · Apache-2.0
---
name: gws-modelarmor-sanitize-response
description: "Google Model Armor: Sanitize a model response through a Model Armor template."
metadata:
version: 0.22.5
openclaw:
category: "security"
requires:
bins:
- gws
cliHelp: "gws modelarmor +sanitize-response --help"
---
# modelarmor +sanitize-response
> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it.
Sanitize a model response through a Model Armor template
## Usage
```bash
gws modelarmor +sanitize-response --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
```bash
gws modelarmor +sanitize-response --template projects/P/locations/L/templates/T --text 'model output'
model_cmd | gws modelarmor +sanitize-response --template ...
```
## Tips
- Use for outbound safety (model -> user).
- For inbound safety (user -> model), use +sanitize-prompt.
## See Also
- [gws-shared](../gws-shared/SKILL.md) — Global flags and auth
- [gws-modelarmor](../gws-modelarmor/SKILL.md) — All filter user-generated content for safety commands
© googleworkspace · Apache-2.0 · googleworkspace/cli