Guardrails
/install guardrails
guardrails - Interactive Security Guardrails Configuration
Helps users configure comprehensive security guardrails for their OpenClaw workspace through an interactive interview process.
Commands
guardrails setup
Interactive setup mode - Guides user through creating their GUARDRAILS.md file.
Workflow:
- Run environment discovery:
bash scripts/discover.sh - Classify risks:
bash scripts/discover.sh | python3 scripts/classify-risks.py - Generate tailored questions:
bash scripts/discover.sh | python3 scripts/classify-risks.py | python3 scripts/generate_questions.py - Conduct interactive interview with the user:
- Ask questions from the generated question bank (tailored to discovered environment)
- Present suggestions for each question
- Allow custom answers
- Follow up when appropriate
- Generate GUARDRAILS.md:
echo '\x3Cjson>' | python3 scripts/generate_guardrails_md.py /path/to/guardrails-config.json- Stdin JSON format:
{"discovery": {...}, "classification": {...}, "answers": {...}}
- Stdin JSON format:
- Present the generated GUARDRAILS.md for review
- Ask for confirmation before writing to workspace
- Write
GUARDRAILS.mdto workspace root - Save
guardrails-config.jsonto workspace root
Important:
- Be conversational and friendly during the interview
- Explain why each question matters
- Provide context about discovered risks
- Highlight high-risk skills/integrations
- Allow users to skip or customize any answer
- Review the final output with the user before writing
guardrails review
Review mode - Check existing configuration against current environment.
Workflow:
- Run discovery and classification
- Load existing
guardrails-config.json - Compare discovered skills/integrations against config
- Identify gaps (new skills not covered, removed skills still in config)
- Ask user about gaps only - don't re-interview everything
- Update config and GUARDRAILS.md if changes needed
guardrails monitor
Monitor mode - Detect changes and potential violations.
Workflow:
- Run:
bash scripts/monitor.sh - Parse the JSON report
- If status is "ok": silent or brief acknowledgment
- If status is "needs-attention": notify user with details
- If status is "review-recommended": suggest running
guardrails review
Can be run manually or via cron/heartbeat.
Files Generated
- GUARDRAILS.md - The main guardrails document (workspace root)
- guardrails-config.json - Machine-readable config for monitoring (workspace root)
Notes
- This skill only helps create guardrails - enforcement is up to the agent
- Discovery (
discover.sh) uses bash + jq; classification (classify-risks.py) uses Python standard library only - Question generation and GUARDRAILS.md generation require an LLM — set
OPENAI_API_KEYorANTHROPIC_API_KEY - Python scripts require the
requestslibrary (pip install requests) - Discovery and classification are read-only operations
- Only
setupandreviewmodes write files, and only with user confirmation
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install guardrails - 安装完成后,直接呼叫该 Skill 的名称或使用
/guardrails触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Guardrails 是什么?
Interactively configure, review, and monitor security guardrails for your OpenClaw workspace by discovering risks, interviewing users, and generating GUARDRA... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2168 次。
如何安装 Guardrails?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install guardrails」即可一键安装,无需额外配置。
Guardrails 是免费的吗?
是的,Guardrails 完全免费(开源免费),可自由下载、安装和使用。
Guardrails 支持哪些平台?
Guardrails 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Guardrails?
由 dgriffin831(@dgriffin831)开发并维护,当前版本 v1.0.1。