gws-modelarmor-sanitize-prompt — Claude Code skill: setup and use
This skill sends a user prompt through a Google Model Armor template. Use it when an incoming prompt needs to pass through a configured Model Armor filter.
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt -a claude-codeWhat gws-modelarmor-sanitize-prompt does
The skill runs gws modelarmor +sanitize-prompt with a required Model Armor template resource name in the form projects/PROJECT/locations/LOCATION/templates/TEMPLATE. Pass text with --text or a full request body with --json. If neither flag is present, the command reads from stdin; when both are given, --json takes precedence over --text.
You need the gws executable. First read ../gws-shared/SKILL.md for authentication, global flags, and security rules. If that file is missing, run gws generate-skills. Use +sanitize-response to check outbound responses instead. Install this skill when user prompts should be filtered through a Model Armor template; it is not the command for outbound content.
What it helps with
- filter a user prompt through a Model Armor template
- send text for checking with
--text - submit a full request body with
--json - pipe a prompt to the command through stdin
Example prompts for the agent
- Check `user input` with the template `projects/P/locations/L/templates/T`.
- Read the prompt from stdin and run `gws modelarmor +sanitize-prompt` with the required template.
- Send this request body with `--json` for Model Armor filtering.
How to install gws-modelarmor-sanitize-prompt
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt -a claude-code2Manually: put the files in place
~/.claude/skills/gws-modelarmor-sanitize-prompt/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gws-modelarmor-sanitize-prompt/
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt -a codex2Manually: put the files in place
.agents/skills/gws-modelarmor-sanitize-prompt/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt -a cursor2Manually: put the files in place
.cursor/skills/gws-modelarmor-sanitize-prompt/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install googleworkspace/cli gws-modelarmor-sanitize-prompt2Manually: put the files in place
.github/skills/gws-modelarmor-sanitize-prompt/SKILL.md1Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt -a gemini-cli2Platform CLI
gemini skills install https://github.com/googleworkspace/cli --path skills/gws-modelarmor-sanitize-promptManually: put the files in place
.devin/skills/gws-modelarmor-sanitize-prompt/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt -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-prompt
How do I install gws-modelarmor-sanitize-prompt in Claude Code?
Run npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt -a claude-code.
What does gws-modelarmor-sanitize-prompt do?
It checks a user prompt through the specified Google Model Armor template. Provide text as an argument or through stdin.
What does the skill need to run?
It requires the gws executable and authentication configured as described in ../gws-shared/SKILL.md. A full Model Armor template resource name is required.
Source text
SKILL.md · Apache-2.0
---
name: gws-modelarmor-sanitize-prompt
description: "Google Model Armor: Sanitize a user prompt through a Model Armor template."
metadata:
version: 0.22.5
openclaw:
category: "security"
requires:
bins:
- gws
cliHelp: "gws modelarmor +sanitize-prompt --help"
---
# modelarmor +sanitize-prompt
> **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it.
Sanitize a user prompt through a Model Armor template
## Usage
```bash
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
```bash
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](../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