googleworkspace avatar

Gws Modelarmor Sanitize Prompt

The gws-modelarmor-sanitize-prompt skill sanitizes user-generated prompts through Google Model Armor templates to detect and filter potentially unsafe content before it reaches AI models. It's designed for Google Workspace CLI users who need to implement inbound safety measures for user inputs, supporting both direct text input and stdin piping. The skill solves the problem of identifying and mitigating prompt injection attacks and harmful content in user submissions by leveraging pre-configured Model Armor templates.

skills.sh installs
30.3K
GitHub stars
32.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add googleworkspace/cli --skill gws-modelarmor-sanitize-prompt --agent claude-code

Installs into .claude/skills of the current project.

Files

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

Sponsors

Details

Repository
github.com/googleworkspace/cli
Categories
AI & Agent Building, CLI & Terminal, Office & Documents

More from googleworkspace/cli

All 113
1dontbesilent2025 avatardbs-ai-checkdontbesilent2025/dbskill扫描文案中的 AI 写作特征并输出检测报告,默认只诊断不改写。用户要求检查 AI 味、AI 痕迹或机器化表达时使用。28.4Kskills.sh installs
2101-skills avataragent-browser101-skills/skillsagent browser25.5Kskills.sh installs
3dontbesilent2025 avatardbs-agent-migrationdontbesilent2025/dbskill审计项目规则文件、识别真源、统一命名并生成桥接,把项目迁移成多端一致的 Agent 工作台。用户要求迁移 Claude Code、Codex、Grok、通用 Agents 或整理 AGENTS.md 时使用。25.2Kskills.sh installs
4okx avatarokx-agentic-walletokx/onchainos-skillsOKX Agentic Wallet — the single skill for the user's wallet and on-chain execution. Use it whenever the user wants to operate their wallet or execute an on-chai19.7Kskills.sh installs
5okx avatarokx-agent-payments-protocolokx/onchainos-skillsUse when an agent hits HTTP 402 / payment-required, or the user mentions x402, x402Version, X-PAYMENT, PAYMENT-REQUIRED, PAYMENT-SIGNATURE, WWW-Authenticate: Pa15.9Kskills.sh installs
6halthelobster avatarproactive-agenthalthelobster/proactive-agentAI agent architecture for anticipating needs, surviving context loss, and continuous self-improvement.15.3Kskills.sh installs