360 Secure SkillHub
360 安全技能中心

Gws Modelarmor Sanitize Prompt

这是gws工具下Model Armor模块的子命令,核心是通过指定安全模板对用户提示词做内容安全清理,适用于预处理用户输入、规避违规内容的场景。支持通过--text参数、JSON请求体或标准输入传入待处理内容,输出合规的清理后提示词,需依赖gws工具,若清理响应内容可改用+sanitize-response命令。

googleworkspace-bot
googleworkspace-bot
热度 74.06
最近更新 2026-05-11 17:29:02
分类:安全依赖:第三方 API

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gws-modelarmor-sanitize-prompt
Metadata
name
gws-modelarmor-sanitize-prompt
description
Google Model Armor: Sanitize a user prompt through a Model Armor template.
metadata
{"version":"0.22.5","openclaw":{"category":"security","requires":{"bins":["gws"]},"cliHelp":"gws modelarmor +sanitize-prompt --help"}}

modelarmor +sanitize-prompt

PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.

Sanitize a user prompt through a Model Armor template

Usage

gws modelarmor +sanitize-prompt --template <NAME>

Flags

Flag Required Default Description
--template ✓ — Full template resource name (projects/PROJECT/locations/LOCATION/templates/TEMPLATE)
--text — — Text content to sanitize
--json — — Full JSON request body (overrides --text)

Examples

gws modelarmor +sanitize-prompt --template projects/P/locations/L/templates/T --text 'user input'
echo 'prompt' | gws modelarmor +sanitize-prompt --template ...

Tips

  • If neither --text nor --json is given, reads from stdin.
  • For outbound safety, use +sanitize-response instead.

See Also