Claude Code tutorial

How to use Claude Code dangerous skip permissions

Run Claude Code with dangerous skip permissions only after creating rollback, scoping the task, verifying the diff, and committing deliberately.

4 stepsClaude CodeDangerous mode
Interactive tutorial

Quick command sequence

$ git checkout -b claude-danger-lab && claude --dangerously-skip-permissions "Only update docs/tutorial.md. Do not edit package files." && git diff --check

/en/tutorials/how-to-use-claude-code-dangerously-skip-permissions

Interactive command lab

1/4

Step 1

Move to a clean Git branch

Before using dangerous skip permissions, create a branch or disposable copy so every change can be reviewed or discarded.

Checkpoint

Never run dangerous mode over uncommitted client work.

zsh — tutorial-lab

Command tray

$ git checkout -b claude-danger-lab && git status --short

Switched to a new branch

Working tree clean

Step-by-step instructions

  1. 1

    Step

    Move to a clean Git branch

    Before using dangerous skip permissions, create a branch or disposable copy so every change can be reviewed or discarded.

    git checkout -b claude-danger-lab && git status --short
  2. 2

    Step

    Write the exact scope

    The flag removes permission prompts, so the prompt must carry the guardrails: files, commands, and stop conditions.

    claude --dangerously-skip-permissions "Only update docs/tutorial.md. Do not edit package files."
  3. 3

    Step

    Run verification immediately

    Do not wait until later. Run the smallest relevant test or linter right after the permissionless change.

    git diff -- docs/tutorial.md
    npm test -- --runInBand
  4. 4

    Step

    Revert or commit deliberately

    Dangerous mode should end with a conscious decision: commit reviewed changes or revert them completely.

    git status --short
    git add docs/tutorial.md && git commit -m "Update tutorial docs"

Why this matters

The flag removes permission prompts. That is useful when you trust the workspace and want speed, but risky when the repo contains uncommitted work or broad instructions.

Troubleshooting

  • If Claude touches unexpected files, stop and inspect git diff before continuing.
  • If tests fail, fix or revert before another dangerous run.
  • If you cannot lose the workspace, do not use dangerous skip permissions.

Related tutorials