为生产环境操作和自主代理执行提供破坏性行为防护与风险拦截。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "safety-guard" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/safety-guard/SKILL.md 2. 保存为 ~/.claude/skills/safety-guard/SKILL.md 3. 装好后重载技能,告诉我可以用了
你是生产环境安全守卫。在执行任何命令前检查风险。如果命令可能删除数据、覆盖配置、批量修改资源或导致服务中断,先停止执行,说明风险,并给出更安全的替代方案。现在评估这条命令:kubectl delete namespace prod
识别命令为高危操作,拒绝直接执行,并提供确认步骤、备份建议或只读替代方案。
请为一个可自主执行运维任务的 AI 代理制定安全规则。要求:禁止直接在生产库执行删除或全表更新;涉及重启、扩容、权限变更时必须人工审批;所有高风险操作先生成执行计划和回滚方案。
输出一组清晰的代理安全策略,包含禁止事项、审批条件、执行前检查和回滚要求。
请审查以下生产数据库 SQL 是否存在破坏性风险,并给出更安全写法:UPDATE orders SET status = 'cancelled';
指出该语句会全表更新,建议增加 WHERE 条件、先备份或分批执行,并给出改写示例。
Three modes of protection:
Intercepts destructive commands before execution and warns:
Watched patterns:
- rm -rf (especially /, ~, or project root)
- git push --force
- git reset --hard
- git checkout . (discard all changes)
- DROP TABLE / DROP DATABASE
- docker system prune
- kubectl delete
- chmod 777
- sudo rm
- npm publish (accidental publishes)
- Any command with --no-verify
When detected: shows what the command does, asks for confirmation, suggests safer alternative.
Locks file edits to a specific directory tree:
/safety-guard freeze src/components/
Any Write/Edit outside src/components/ is blocked with an explanation. Useful when you want an agent to focus on one area without touching unrelated code.
Both protections active. Maximum safety for autonomous agents.
/safety-guard guard --dir src/api/ --allow-read-all
Agents can read anything but only write to src/api/. Destructive commands are blocked everywhere.
/safety-guard off
Uses PreToolUse hooks to intercept Bash, Write, Edit, and MultiEdit tool calls. Checks the command/path against the active rules before allowing execution.
codex -a never sessions~/.claude/safety-guard.log帮助开发者为代码代理配置性能优化、安全防护与研究优先工作流。
提供数据库迁移、回滚与零停机发布的最佳实践指导,适用于多种 ORM 与 SQL 数据库。
通过双评审智能体对结果进行对抗式校验,提升输出发布前的可靠性
帮助你掌握地道 Rust 模式、所有权与并发实践,编写安全高性能应用。
基于 C++ Core Guidelines 编写、审查并重构更安全现代的 C++ 代码。
为 Claude Code 会话提供系统化校验流程,帮助检查结果正确性与质量。
在生产环境作业或自主执行代理时,帮助预防破坏性操作与高风险失误。
为编程代理提供代码、测试与文档的质量守卫,拦截常见 AI 失误。
帮助用户扫描Agent Skills安全风险并进行可视化管理与排查。
自动生成测试场景并分析代理执行过程,量化技能与规则遵循率。
帮助 AI 编码代理在开发过程中发现并修复常见应用安全问题。
为 AI 智能体工具调用执行合规策略审查,并返回可审计的放行或拦截结果。