Skip to main content
command

gws-modelarmor-create-template — Claude Code command

A slash command that has Claude create a Google Model Armor template in GCP, either from the jailbreak preset or from your own JSON filter config.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --command google-workspace/gws-modelarmor-create-template
Open on GitHub

What gws-modelarmor-create-template does

Under the hood the command runs gws modelarmor +create-template and walks the agent through checks first: confirm the CLI is present, inspect the method schema with gws schema, then build the flags. Three arguments are mandatory: --project for the GCP project ID, --location, and --template-id. Filters come from --preset jailbreak or from a body passed in --json, and the JSON takes precedence over the preset. Pass neither and you get the jailbreak preset.

The template you create is meant to be fed to +sanitize-prompt and +sanitize-response for screening user input and model replies. Since this writes a resource to the cloud, confirmation is requested before anything runs.

Two things have to exist beforehand: the Google Workspace CLI gws on the machine and working authentication, which gws auth status reports. The command also refers to a gws-shared/SKILL.md file holding global flags and security rules; if that file is absent it suggests running gws generate-skills. An unauthenticated call stops at the first step, so check the status first.

What it helps with

  • create a Model Armor template with the jailbreak preset
  • set template filters through a custom JSON body
  • inspect the gws method schema before calling it
  • get a template ready for prompt and response sanitizing

Example prompts for the agent

  • Create a Model Armor template in my-project, region us-central1, ID my-tmpl, using the jailbreak preset
  • Build a new template from the JSON config in armor.json
  • Show the gws modelarmor-create-template schema and list the required flags

How to install gws-modelarmor-create-template

1claude-code-templates

npx claude-code-templates@latest --command google-workspace/gws-modelarmor-create-template

2Manually: put the files in place

.claude/commands/gws-modelarmor-create-template.md

Call it with /gws-modelarmor-create-template. For all projects use ~/.claude/commands/

Questions about gws-modelarmor-create-template

How do I install gws-modelarmor-create-template in Claude Code?

Run npx claude-code-templates@latest --command google-workspace/gws-modelarmor-create-template; the command lands in .claude/commands/gws-modelarmor-create-template.md.

What does gws-modelarmor-create-template do?

It calls gws modelarmor +create-template to create a Google Model Armor template in a given project and region, guiding the agent through the pre-flight checks.

What do I need before running it?

The gws CLI installed, authentication configured and confirmed with gws auth status, and a gws-shared/SKILL.md file; when that file is missing the command suggests gws generate-skills.

Source text

gws-modelarmor-create-template.md · MIT
---
allowed-tools: Bash, Read, Write, Edit
argument-hint: "[resource] [method] [flags]"
description: "Google Model Armor: Create a new Model Armor template."
---

# Google Workspace Modelarmor Create Template

Execute Google Workspace Modelarmor Create Template operations: $ARGUMENTS

## Prerequisites

- Google Workspace CLI (`gws`) must be installed
- Authentication configured: Run `gws auth status` to verify
- Review `gws modelarmor-create-template --help` for all available commands

## Available Resources and Methods

# 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

```bash
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

```bash
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](../gws-shared/SKILL.md) — Global flags and auth
- [gws-modelarmor](../gws-modelarmor/SKILL.md) — All filter user-generated content for safety commands

## Usage

```bash
# List available resources and methods
gws modelarmor-create-template --help

# Inspect method schema before calling
gws schema modelarmor-create-template.<resource>.<method>

# Execute command with arguments
gws modelarmor-create-template $ARGUMENTS
```

## Task

Execute the requested Modelarmor Create Template operation: $ARGUMENTS

1. **Verify Prerequisites**
   - Check `gws` is installed: `gws --version`
   - Verify authentication: `gws auth status`
   - Review available commands: `gws modelarmor-create-template --help`

2. **Inspect Method Schema**
   - Before calling any method, inspect its parameters
   - Use `gws schema` to understand required fields
   - Review parameter types and constraints

3. **Execute Operation**
   - Build command with appropriate flags
   - Use `--params` for query/path parameters
   - Use `--json` for request body
   - Handle pagination with `--max-results` or `--page-token`

4. **Error Handling**
   - Check command output for errors
   - Review API quotas and rate limits
   - Handle authentication issues
   - Retry transient failures

---

**License**: Apache License 2.0
**Source**: [Google Workspace CLI](https://github.com/googleworkspace/cli)
**Original Skill**: `gws-modelarmor-create-template`

© davila7 · MIT · davila7/claude-code-templates

Similar slash commands

All slash commands for Security →

From the same set495

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor