PluginBench
Skill
Pass
Audit score 90

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
Prerequisites
  • GCP project with Model Armor API enabled
  • gws CLI installed and authenticated (see gws-shared skill)
  • Valid GCP location (e.g., us-central1)
Claude Code
Cursor
Windsurf
Cline

How to use gws-modelarmor-create-template

  1. 1.Authenticate with GCP using gws auth (see gws-shared skill)
  2. 2.Run gws modelarmor +create-template with required flags: --project, --location, --template-id
  3. 3.Optionally specify --preset jailbreak or provide custom --json configuration
  4. 4.Confirm the write operation when prompted
  5. 5.Use the created template name with +sanitize-prompt and +sanitize-response commands

Use cases

Good for
  • 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
Who it's for
  • 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

What happens if I don't specify --preset or --json?

The command defaults to the jailbreak preset template configuration.

Can I customize the template configuration?

Yes, use the --json flag to provide a custom JSON body that overrides any preset.

What should I do with the created template?

Use the template name with gws modelarmor +sanitize-prompt and +sanitize-response to filter user inputs and model outputs.

Is this a destructive operation?

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.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.

Create a new Model Armor template

Usage

gws modelarmor +create-template --project <PROJECT> --location <LOCATION> --template-id <ID>

Flags

FlagRequiredDefaultDescription
--projectGCP project ID
--locationGCP location (e.g. us-central1)
--template-idTemplate ID to create
--presetUse a preset template: jailbreak
--jsonJSON 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