提示词与 LLM32k · #9178
gws-modelarmor-sanitize-prompt
它能做什么
这个工具用来清理和整理你要发送给人工智能的文本。它会使用预设模板,确保文本安全、得体。
适用场景
- ✓当你想确保向 AI 提出的问题不会引发问题时。
- ✓在发送敏感信息给 AI 之前。
- ✓当你想统一不同 AI 的提问格式时。
技能链接
https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor-sanitize-prompt/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor-sanitize-prompt/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/gws-modelarmor-sanitize-prompt/SKILL.md -o SKILL.md
可以这样问 AI
“用“universal-secrets-template”模板清理我的提示词:“告诉我宇宙的秘密。””
每周 5 个新技能,1 分钟读完。
工作原理
你提供要清理的文本和清理模板的名称,工具会把该模板的规则应用到你的文本上。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
modelarmor +sanitize-prompt
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto 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
- gws-shared — Global flags and auth
- gws-modelarmor — All filter user-generated content for safety commands
常见问题
什么是“模板”?
模板就是一组预先设定好的规则,工具会用它来清理你的文本。
如果我不提供文本,会怎样?
工具会读取你直接在终端里输入的内容,或者从其他地方复制的内容。
能用它清理 AI 的回复吗?
不能。这个工具只用于清理你发送给 AI 的内容。要清理回复,请使用“+sanitize-response”工具。
详情
作者的原始描述
Google Model Armor: Sanitize a user prompt through a Model Armor template.
repo: googleworkspace/cli
热度
- GitHub 星标
- 32k
- 排名
- #9178
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/6
评论
- …