首页/数据 & AI/gws-modelarmor-sanitize-prompt
G

gws-modelarmor-sanitize-prompt

by @googleworkspacev
4.4(136)

通过Google Model Armor对用户提示进行安全净化,确保输入内容符合规范,保护模型安全。

Prompt EngineeringAI SafetyData SanitizationGoogle WorkspaceLLM SecurityGitHub
安装方式
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt
compare_arrows

Before / After 效果对比

1
使用前

直接将用户提示发送给模型,存在潜在的安全和隐私风险,可能导致模型行为异常。

使用后

通过Model Armor模板清理用户提示,增强安全性,确保模型接收到合规且无害的输入。

description SKILL.md

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

FlagRequiredDefaultDescription
--templateFull template resource name (projects/PROJECT/locations/LOCATION/templates/TEMPLATE)
--textText content to sanitize
--jsonFull 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

forum用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价

统计数据

安装量3.4K
评分4.4 / 5.0
版本
更新日期2026年4月29日
对比案例1 组

用户评分

4.4(136)
5
24%
4
51%
3
24%
2
2%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI

时间线

创建2026年3月16日
最后更新2026年4月29日
🎁 Agent 知识卡片