Cookbook/Running Claude Code in Dangerous Mode with Auto-Accept
workflow
6 min

Running Claude Code in Dangerous Mode with Auto-Accept

workflow
productivity
caution

Running Claude Code in Dangerous Mode with Auto-Accept

What is Dangerous Mode?

Dangerous Mode (also known as "Bypass Permissions" mode) allows Claude Code to perform file operations without asking for your confirmation. This can significantly speed up workflows when you trust Claude's actions and don't need to review each change.

Warning: This mode bypasses safety checks. Only use it when you're confident about the operations being performed. It is recommended to use this mode in an environment where you have backups or version control in place.

Starting Claude in Dangerous Mode

First, perform a one-time acknowledgment to enable Dangerous Mode:

claude --dangerously-skip-permissions

Use this command when you want Claude to remember the context and continue with the same context. If you are starting a new feature then don't use the --continue flag.:

claude --continue --dangerously-skip-permissions

Creating an Auto-Accept Alias

For even faster workflows, you can create a shell alias that starts Claude in Dangerous Mode and automatically accepts all changes:

Bash/Zsh Setup

Add this to your ~/.bashrc or ~/.zshrc:

alias claude-auto='claude --continue --dangerously-skip-permissions'

Usage Example

# Start Claude with auto-accept enabled
claude-auto

Practical Use Cases

  1. Bulk File Operations

    claude-save "Rename all .js files in src/ to .ts"
    
  2. Automated Refactoring

    claude-save "Update all import statements to use absolute paths"
    
  3. Project Setup

    claude-save "Set up a new React project with TypeScript, ESLint, and Prettier"
    

Safety Considerations

  • Always have backups or use version control
  • Review the git diff after operations
  • Start with regular mode for unfamiliar tasks
  • Use Dangerous Mode only in controlled environments cla

Master Claude Code with Expert Training

These recipes are from our comprehensive 2-day training course. Learn directly from experts and transform your development workflow.