Runs real-time safety analysis for instructions that may trigger tool execution, external calls, file edits, permission changes, destructive or irreversible...
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 modeio-skill-audit.
scripts/safety.py for instruction and operation safety checks.--context and --target.requests is required for scripts/safety.py.python scripts/bootstrap_env.py
python scripts/doctor_env.py
Pass --context as JSON with these keys:
{
"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 must be a concrete resource identifier such as an absolute path, table name, service name, or URL.
scripts/safety.pypython 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
python 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
approved | 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. |
If the check fails with network/API/dependency issues, do not silently proceed.
scripts/safety.py — live safety check entry pointARCHITECTURE.md — command-safety package boundariesZIP package — ready to use