Home/AI LLM Engineering/gws-modelarmor-sanitize-prompt
G

gws-modelarmor-sanitize-prompt

by @googleworkspacev
4.6(136)

Securely sanitizes user prompts via Google Model Armor, ensuring input compliance and model safety.

prompt-engineeringai-safetydata-sanitizationgoogle-workspacellm-securityGitHub
Installation
npx skills add https://github.com/googleworkspace/cli --skill gws-modelarmor-sanitize-prompt
compare_arrows

Before / After Comparison

1 组
Before

Directly sending user prompts to the model carries potential security and privacy risks, which may lead to abnormal model behavior.

After

By cleaning user prompts through Model Armor templates, security is enhanced, ensuring the model receives compliant and harmless input.

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
--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

User Reviews (0)

Write a Review

Effect
Usability
Docs
Compatibility

No reviews yet

Statistics

Installs29.5K
Rating4.6 / 5.0
Version
Updated2026年10月23日
Comparisons1

User Rating

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

Rate this Skill

0.0

Compatible Platforms

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

Timeline

Created2026年3月16日
Last Updated2026年10月23日
🎁 Agent Knowledge Cards
Survey