跳到正文
Skillpedia
提示词与 LLM32k · #9179

gws-modelarmor-sanitize-response

它能做什么

这个工具用来清理并检查 AI 生成的文本,确保它在展示给任何人之前是安全且得体的。它会使用一个预先定义好的安全模型来完成这项检查。

适用场景

  • ✓当你想确保 AI 的回复中不包含不当内容时。
  • ✓在把 AI 的回复展示给客户或受众之前。
  • ✓当你想对 AI 的回复应用特定的安全规则时。

技能链接

https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor-sanitize-response/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor-sanitize-response/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请使用「my-safety-model」安全模板清理这段 AI 回复:[此处填写 AI 回复]”

每周 5 个新技能,1 分钟读完。

工作原理

你需要提供 AI 生成的文本,以及安全模型的名称。工具会用这个模型审查文本,并删除或标记所有不符合规则的内容。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

modelarmor +sanitize-response

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

Sanitize a model response through a Model Armor template

Usage

gws modelarmor +sanitize-response --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-response --template projects/P/locations/L/templates/T --text 'model output'
model_cmd | gws modelarmor +sanitize-response --template ...

Tips

  • Use for outbound safety (model -> user).
  • For inbound safety (user -> model), use +sanitize-prompt.

See Also

常见问题

「sanitize-response」和「sanitize-prompt」有什么区别?

「sanitize-response」用于检查 AI 会对你说什么(输出)。「sanitize-prompt」用于检查你会对 AI 说什么(输入)。

什么是「模板」?

「模板」是你为检查文本而定义的一组安全规则,就像一个自定义的过滤器。

使用这个工具需要会编程吗?

不需要,你只需要知道命令,以及你想使用的安全模型的名称即可。

详情

作者的原始描述

Google Model Armor: Sanitize a model response through a Model Armor template.

repo: googleworkspace/cli

热度

GitHub 星标
32k
排名
#9179
许可证
Apache-2.0
更新时间
2026/10/6

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能