gws-modelarmor-create-template
googleworkspace/cli
Create Google Model Armor templates to protect AI models from jailbreak and safety attacks.
What is gws-modelarmor-create-template?
This skill creates new Model Armor templates in Google Cloud Platform that define safety policies for AI model inputs and outputs. Use it to set up content filtering and prompt injection protection before deploying models.
- Create templates with custom or preset configurations (jailbreak preset available)
- Specify GCP project, location, and unique template identifiers
- Use JSON body for advanced template customization
- Generate templates for use with prompt and response sanitization tools
- Apply safety policies across multiple model deployments
How to install gws-modelarmor-create-template
npx skills add null --skill gws-modelarmor-create-template- GCP project with Model Armor API enabled
- gws CLI installed and authenticated (see gws-shared skill)
- Valid GCP location (e.g., us-central1)
How to use gws-modelarmor-create-template
- 1.Authenticate with GCP using gws auth (see gws-shared skill)
- 2.Run gws modelarmor +create-template with required flags: --project, --location, --template-id
- 3.Optionally specify --preset jailbreak or provide custom --json configuration
- 4.Confirm the write operation when prompted
- 5.Use the created template name with +sanitize-prompt and +sanitize-response commands
Use cases
- Set up jailbreak protection before deploying a generative AI application
- Create organization-wide safety templates for consistent content filtering
- Define custom safety policies for specific use cases or industries
- Establish baseline Model Armor configuration for development environments
- Prepare templates for integration with prompt sanitization workflows
- Security engineers implementing AI safety controls
- Platform teams managing multiple AI model deployments
- DevOps engineers configuring GCP-based AI infrastructure
- Compliance officers establishing content safety policies
gws-modelarmor-create-template FAQ
The command defaults to the jailbreak preset template configuration.
Yes, use the --json flag to provide a custom JSON body that overrides any preset.
Use the template name with gws modelarmor +sanitize-prompt and +sanitize-response to filter user inputs and model outputs.
Yes, this is a write command. Always confirm with the user before executing.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
name: gws-modelarmor-create-template description: "Google Model Armor: Create a new Model Armor template." metadata: version: 0.22.5 openclaw: category: "security" requires: bins: - gws cliHelp: "gws modelarmor +create-template --help"
modelarmor +create-template
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
Create a new Model Armor template
Usage
gws modelarmor +create-template --project <PROJECT> --location <LOCATION> --template-id <ID>
Flags
| Flag | Required | Default | Description |
|---|---|---|---|
--project | ✓ | — | GCP project ID |
--location | ✓ | — | GCP location (e.g. us-central1) |
--template-id | ✓ | — | Template ID to create |
--preset | — | — | Use a preset template: jailbreak |
--json | — | — | JSON body for the template configuration (overrides --preset) |
Examples
gws modelarmor +create-template --project P --location us-central1 --template-id my-tmpl --preset jailbreak
gws modelarmor +create-template --project P --location us-central1 --template-id my-tmpl --json '{...}'
Tips
- Defaults to the jailbreak preset if neither --preset nor --json is given.
- Use the resulting template name with +sanitize-prompt and +sanitize-response.
[!CAUTION] This is a write command — confirm with the user before executing.
See Also
- gws-shared — Global flags and auth
- gws-modelarmor — All filter user-generated content for safety commands
Related skills
More from googleworkspace/cli and the wider catalog.
gws-modelarmor-sanitize-prompt
Sanitize user prompts through Google Model Armor templates for safety compliance.
gws-modelarmor-sanitize-response
Sanitize model responses through Google Model Armor templates for outbound safety.
gws-people
Manage Google Workspace contacts, groups, and profiles via CLI.
gws-script
Manage Google Apps Script projects via CLI with deploy, versioning, and execution capabilities.
gws-script-push
Upload local files to a Google Apps Script project from your codebase.
gws-shared
Shared authentication, global flags, and output formatting patterns for gws CLI.