提示词与 LLM32k · #9180
gws-modelarmor
它能做什么
这个命令可以帮助保障 AI 生成内容的安全与得体。它就像一个过滤器,确保 AI 的回复中不包含危险或不当的信息。
适用场景
- ✓当你想确保 AI 的回复是安全的时。
- ✓当你要创作会被很多人看到的内容时。
- ✓为了防止 AI 生成冒犯性或有害的内容。
技能链接
https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/googleworkspace/cli/blob/main/skills/gws-modelarmor/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add googleworkspace/cli --skill gws-modelarmor
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/gws-modelarmor/SKILL.md -o SKILL.md
可以这样问 AI
“请检查这段 AI 回复是否可以安全发布。”
每周 5 个新技能,1 分钟读完。
工作原理
它使用一个名为 Model Armor 的系统来分析文本。该系统会先检查内容是否符合安全规则,然后才会展示给你或其他人。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
modelarmor (v1)
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
gws modelarmor <resource> <method> [flags]
Helper Commands
| Command | Description |
|---|---|
+sanitize-prompt |
Sanitize a user prompt through a Model Armor template |
+sanitize-response |
Sanitize a model response through a Model Armor template |
+create-template |
Create a new Model Armor template |
Discovering Commands
Before calling any API method, inspect it:
# Browse resources and methods
gws modelarmor --help
# Inspect a method's required params, types, and defaults
gws schema modelarmor.<resource>.<method>
Use gws schema output to build your --params and --json flags.
常见问题
什么是 Model Armor?
Model Armor 是谷歌用来确保人工智能生成安全、负责任内容的一套规则和工具。
使用它需要安装什么吗?
这个命令属于谷歌的工具集。如果你已经有这些工具的使用权限,就可以直接使用。否则,你可能需要先进行设置。
我可以创建自己的安全规则吗?
可以,Model Armor 允许你创建自己的「模板」,根据你的需求定义什么是安全的,什么不是。
详情
热度
- GitHub 星标
- 32k
- 排名
- #9180
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/6
评论
- …