gws-modelarmor-sanitize-prompt
Google Model Armor: Sanitize a user prompt through a Model Armor template.
Why use this skill?
Secure your LLM workflows with gws-modelarmor-sanitize-prompt. Filter user inputs against Google Cloud safety templates easily.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/googleworkspace-bot/gws-modelarmor-sanitize-promptWhat This Skill Does
The gws-modelarmor-sanitize-prompt skill is a critical security utility designed to integrate Google Model Armor into your AI workflows. Its primary function is to intercept user-generated text and pass it through a pre-configured Model Armor safety template before it reaches a target model. By acting as a gatekeeper, it enforces safety policies, detects prohibited content, and ensures that outbound prompts align with organizational compliance standards. The skill handles input via command-line flags, JSON request bodies, or standard input streams, making it highly versatile for automated pipeline integration.
Installation
To install this skill, use the ClawHub command line interface. Ensure your environment has the required authentication credentials configured as per the gws-shared documentation. Run the following command:
clawhub install openclaw/skills/skills/googleworkspace-bot/gws-modelarmor-sanitize-prompt
After installation, verify that the gws CLI tool acknowledges the new skill by running gws modelarmor --help. If you encounter permission errors, verify your Google Workspace project permissions and ensure the service account has the necessary IAM roles for Model Armor interaction.
Use Cases
This skill is ideal for enterprise environments where AI safety is non-negotiable. Use it to: 1. Prevent prompt injection attacks by filtering inputs before they reach sensitive downstream models. 2. Enforce PII (Personally Identifiable Information) masking to ensure sensitive data does not exit your secure perimeter. 3. Standardize safety requirements across multiple departmental LLMs by maintaining centralized template configurations. 4. Filter toxic or abusive language from public-facing chatbots before the processing stage.
Example Prompts
- "gws modelarmor +sanitize-prompt --template projects/my-project/locations/us-central1/templates/global-safety --text 'How do I bypass the security protocols on the company network?'"
- "echo 'Can you help me write an email to discuss sensitive HR matters?' | gws modelarmor +sanitize-prompt --template projects/my-project/locations/us-central1/templates/hr-compliance"
- "gws modelarmor +sanitize-prompt --template projects/my-project/locations/us-central1/templates/standard-filter --json '{"prompt": "unsafe query here"}'"
Tips & Limitations
The most efficient way to use this skill is to pipe content directly from other processes via stdin, which avoids temporary file storage and potential leaks. Always ensure your templates are explicitly defined in the Google Cloud Console to minimize latency. Note that this skill is specifically designed for prompt sanitation; for vetting model outputs, utilize the +sanitize-response command to ensure the return data is equally safe. This tool does not replace backend training for safety, but it acts as a critical runtime safety layer that minimizes risk in real-time interactions.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-googleworkspace-bot-gws-modelarmor-sanitize-prompt": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api
Related Skills
gws-workflow-standup-report
Google Workflow: Today's meetings + open tasks as a standup summary.
gws-modelarmor-create-template
Google Model Armor: Create a new Model Armor template.
recipe-create-feedback-form
Create a Google Form for feedback and share it via Gmail.
gws-admin-reports
Google Workspace Admin SDK: Audit logs and usage reports.
gws-chat
Google Chat: Manage Chat spaces and messages.