gws-modelarmor-sanitize-prompt

Sanitize user text prompts through a Google Model Armor template.

30.3k|1.8k|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/googleworkspace/cli --skill gws-modelarmor-sanitize-prompt-googleworkspace
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gws-modelarmor-sanitize-prompt
Source: https://github.com/googleworkspace/cli/tree/main/skills/gws-modelarmor-sanitize-prompt
Command: npx skills add https://github.com/googleworkspace/cli --skill gws-modelarmor-sanitize-prompt-googleworkspace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps ensure user-provided text is safe and compliant by running it through a predefined Google Model Armor template, preventing potentially harmful or inappropriate content from being processed.

Core Features & Use Cases

  • Prompt Sanitization: Cleanses user input against a specified Model Armor template.
  • Input Flexibility: Accepts text directly or via a full JSON request body.
  • Use Case: Before sending a user's query to a generative AI model, use this Skill to sanitize the prompt, ensuring it adheres to safety guidelines and doesn't contain malicious or policy-violating content.

Quick Start

Sanitize the user input 'What is the capital of France?' using the template 'projects/P/locations/L/templates/T'.

Frequently Asked Questions about gws-modelarmor-sanitize-prompt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sanitize user prompts before sending them to an AI model?▼

To sanitize user prompts, you can use a predefined Model Armor template to evaluate text content. This process cleanses user input to ensure it adheres to safety guidelines before processing.

What is prompt sanitization in AI safety?▼

Prompt sanitization is the process of screening user-provided text against a predefined safety template. It prevents harmful or policy-violating content from being sent to generative AI models.

Can I use a JSON request body for prompt sanitization?▼

Yes, prompt sanitization accepts input flexibility by allowing you to provide text directly or through a full JSON request body. This accommodates various integration methods.

Do I need a Model Armor template to sanitize prompts?▼

Yes, you must specify a full template resource name to sanitize prompts. The template defines the safety and compliance rules used to evaluate the user-provided text.

When should I use prompt sanitization for AI inputs?▼

You should use prompt sanitization before sending user queries to generative AI models. It ensures inputs are safe, compliant, and free from malicious or inappropriate content.