What problem does it solve? When modifying Nexi's assistant engine, developers risk weakening two critical security boundaries: the AST scanner that vets Forge-generated code before execution, and the approval-token stripping that prevents a model from self-authorizing gated tool calls. This Skill explains exactly how both gates work so changes preserve them instead of relaxing them. ## Core Features & Use Cases - Forge code-generation gate: Explains how engine/forge/safety_scan.py AST-walks generated code, allowlists pure-compute stdlib modules, blocks dangerous calls and reflection primitives, and flags any dunder access to close sandbox-escape paths. - Tool-execution approval gate: Documents how execute_tool strips model-supplied approval tokens and why the only legitimate confirmation path is approval_queue.approve() with a private sentinel. - Debugging checklist: Guides diagnosis when the scanner rejects seemingly safe code or when a tool executes without approval across the ReAct and direct command.py dispatch paths. - Use Case: Before adding a new high-safety tool to _TOOLS or editing safety_scan.py, consult this Skill to route approval through approval_queue rather than inventing a new confirmation flag. ## Quick Start Ask the assistant to review the Nexi safety gates before modifying engine/forge/safety_scan.py or engine/tool_registry.py.