Step-by-step instructions
- 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
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
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
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
Copilot
How to Install GitHub Copilot CLI on Mac and Windows
Step-by-step guide to installing the GitHub Copilot CLI extension. Learn how to authenticate and run gh copilot suggest and explain in your terminal.
Aider
How to Install Aider AI Coding CLI on Mac and Windows
Step-by-step guide to installing the Aider AI pair programming CLI on macOS and Windows. Learn how to configure API keys for Claude 3.7 and GPT-4o.