PluginBench
Skill
Review
Audit score 70

gws-modelarmor-sanitize-response

googleworkspace/cli

Sanitize model responses through Google Model Armor templates for outbound safety.

What is gws-modelarmor-sanitize-response?

This skill applies Google Model Armor templates to sanitize model-generated responses before sending them to users. Use it when you need to filter or clean model outputs for safety compliance and content policy adherence.

  • Applies Model Armor templates to sanitize model responses
  • Accepts text input via --text flag or piped stdin
  • Supports full JSON request body override with --json flag
  • Processes outbound safety filtering (model to user)
  • Requires template resource name in projects/PROJECT/locations/LOCATION/templates/TEMPLATE format

How to install gws-modelarmor-sanitize-response

npx skills add null --skill gws-modelarmor-sanitize-response
Prerequisites
  • Google Workspace CLI (gws) installed and configured
  • Valid Google Cloud authentication via gws-shared setup
  • Access to a Model Armor template in your Google Cloud project
  • Template resource name: projects/PROJECT/locations/LOCATION/templates/TEMPLATE
Claude Code
Cursor
Windsurf
Cline

How to use gws-modelarmor-sanitize-response

  1. 1.Ensure you have a Model Armor template created in your Google Cloud project
  2. 2.Run the command with your template resource name: gws modelarmor +sanitize-response --template projects/PROJECT/locations/LOCATION/templates/TEMPLATE
  3. 3.Provide text to sanitize either via --text flag or pipe input from another command
  4. 4.Review the sanitized output returned by the template

Use cases

Good for
  • Filter model-generated content before displaying to end users
  • Ensure compliance with content policies on model outputs
  • Sanitize responses in multi-turn conversations before delivery
  • Remove sensitive or harmful content from AI-generated text
  • Apply organization-specific safety rules to model responses
Who it's for
  • AI application developers
  • Content safety engineers
  • Teams deploying LLM applications
  • Organizations with content moderation requirements

gws-modelarmor-sanitize-response FAQ

What's the difference between sanitize-response and sanitize-prompt?

sanitize-response filters model outputs (outbound safety, model to user), while sanitize-prompt filters user inputs (inbound safety, user to model).

Can I use this without a Model Armor template?

No, a valid template resource name is required. You must create a template in your Google Cloud project first.

How do I pass input to this skill?

Use the --text flag for direct text input, pipe content from another command, or use --json to provide a full JSON request body.

What format should the template resource name be?

Use the full format: projects/PROJECT/locations/LOCATION/templates/TEMPLATE where PROJECT, LOCATION, and TEMPLATE are your actual values.

Full instructions (SKILL.md)

Source of truth, from googleworkspace/cli.


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

gws modelarmor +sanitize-response --template <NAME>

Flags

FlagRequiredDefaultDescription
--templateFull template resource name (projects/PROJECT/locations/LOCATION/templates/TEMPLATE)
--textText content to sanitize
--jsonFull JSON request body (overrides --text)

Examples

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