Short answers to the questions developers ask about AI coding agents and safety.
- How to stop Claude Code from deleting your files. Three ways to stop Claude Code from running rm -rf or wiping your project: permission rules, a hook, or a guard like Antelog.
- How to make Cursor’s agent safe around production. Keep Cursor’s agent from deleting production data: separate credentials, the auto-run allowlist, and a hook that blocks dangerous commands.
- Is Claude Code’s dangerously-skip-permissions flag safe?. What Claude Code’s --dangerously-skip-permissions flag really does, when it’s risky, and how to keep the speed without the risk.
- What to do after an AI agent deletes your database. Step by step: stop the agent, check every restore option, find out what ran, and make sure it can’t happen again.
- Claude Code hooks: block dangerous commands. Write a Claude Code PreToolUse hook that blocks dangerous shell commands, and where simple hooks fall short.