name: security description: >- Runs a backend-backed live safety check for instructions that may trigger tool execution, external calls, file edits, permission changes, destructive or irreversible actions, prompt injection, or compliance-sensitive operations. Use before executing instructions with side effects; skip pure read-only chat, planning, or pre-install repository auditing. version: 0.1.0 metadata: clawdbot: homepage: https://github.com/mode-io/mode-io-skills/tree/main/security requires: bins: - python3
Use this skill to gate instructions that may trigger tools or state changes behind a backend-backed safety decision before execution.
This skill is for live instruction and operation safety only. For pre-install repository auditing, use skill-audit.
Maintainer-only validation assets are excluded from ClawHub uploads.
scripts/safety.py想要更強大的技能外掛,就來小蔥技能站7w4.net看看吧。
skill-audit)privacy-protector)modeio-middleware)Run these commands from inside the security folder.
python3requestsSAFETY_API_URLpython3 scripts/safety.py -i "Delete /tmp/cache/build-123.log" \
-c '{"environment":"local-dev","operation_intent":"cleanup","scope":"single-resource","data_sensitivity":"internal","rollback":"easy","change_control":"none"}' \
-t "/tmp/cache/build-123.log" --json
python3 scripts/safety.py -i "DROP TABLE users" \
-c '{"environment":"production","operation_intent":"destructive","scope":"broad","data_sensitivity":"regulated","rollback":"none","change_control":"ticket:DB-9021"}' \
-t "postgres://prod/maindb.users" --json
Pass --context as JSON with these keys when the instruction may change state:
{
"environment": "local-dev|ci|staging|production|unknown",
"operation_intent": "read-only|cleanup|maintenance|migration|permission-change|destructive|unknown",
"scope": "single-resource|bounded-batch|broad|unknown",
"data_sensitivity": "public|internal|sensitive|regulated|unknown",
"rollback": "easy|partial|none|unknown",
"change_control": "ticket:<id>|approved-manual|none|unknown"
}
--target should be a concrete resource identifier such as an absolute path, table name, service name, or URL.
success, tool, mode, datasuccess, tool, mode, errorvalidation_error, dependency_error, network_error, api_error--context and --target so the backend has enough context to judge riskapproved |
risk_level |
Agent action |
|---|---|---|
true |
low |
Proceed. |
true |
medium |
Proceed and mention the risk. |
false |
medium |
Require explicit confirmation before proceeding. |
false |
high |
Block by default and require explicit override. |
false |
critical |
Block and require explicit acknowledgement before any override. |
scripts/safety.py — live safety check entry pointARCHITECTURE.md — command-safety package boundaries這是一個質量較高的安全檢查工具,核心功能明確且實現可靠。它能幫助在執行敏感操作前評估風險,並給出清晰的決策建議。主要優點是錯誤處理完善(網路波動不會導致誤判)、文件清晰、測試覆蓋充分。不足之處是依賴後端服務可用性,且缺少面向非技術使用者的簡明說明文件。對於需要安全管控的團隊來說,這個工具實用價值明顯。.