# Claude Code

> Running Anthropic's Claude Code safely: hooks, permissions, settings and guardrails.

Web page: https://vinescale.com/blog/tags/claude-code/

Claude Code can run shell commands, edit files and call MCP tools with whatever access your terminal has. These guides cover the controls it ships with, such as permission rules in settings.json, PreToolUse hooks and the Bash sandbox, and how to combine them so a mistake never reaches production.

- [How to stop Claude Code from running destructive commands](https://vinescale.com/blog/stop-claude-code-destructive-commands.md) (2026-10-31): Use deny rules, a PreToolUse hook that exits with code 2, the Bash sandbox and least-privilege credentials so Claude Code can't drop tables or delete infrastructure.

## Browse by topic

- [Hooks](https://vinescale.com/blog/tags/hooks.md): Using agent hooks to check, warn about or block an action before it runs.
- [Permissions](https://vinescale.com/blog/tags/permissions.md): Allow lists, deny lists, approval modes and credentials for coding agents.
- [Databases](https://vinescale.com/blog/tags/databases.md): Protecting production databases from destructive queries and unsafe migrations by AI agents.
- [Infrastructure](https://vinescale.com/blog/tags/infrastructure.md): Keeping agents from deleting or changing cloud infrastructure, Terraform state and Kubernetes resources.
- [Incidents](https://vinescale.com/blog/tags/incidents.md): Public incidents where AI coding agents broke something, and what they teach.
- [Guardrails](https://vinescale.com/blog/tags/guardrails.md): The general practice of putting safety checks between an AI agent and the systems it can change.
