Modern QA2026Step 11 — Choose the right permission mode for scaffolding — tiles
Log inJoin
35 / 139 · 13 Browser Automation with Playwright · Quick Start Preparation: Turn Discovery into a Scaffolding-Ready Package← prev⊞ allnext →☰ Read as one page

2.15Step 11 — Choose the right permission mode for scaffolding

Claude Code has several permission modes that control how often it pauses to ask for approval. The default mode asks before every file edit and every shell command. During scaffolding, that means approving dozens of file creations one by one — tedious and unnecessary.

Recommended: acceptEdits mode

For the scaffolding step, start Claude Code in acceptEdits mode:

claude --permission-mode acceptEdits -n scaffolding

In this mode, Claude creates and edits files without prompting. Shell commands (like npm install) still require approval. This is the right balance: you let Claude build the file structure uninterrupted, but stay in control of anything that installs packages or modifies system state.

Alternative: auto mode

If your account supports it (Team, Enterprise, or API plan), auto mode eliminates nearly all prompts. A separate classifier model reviews each action and blocks anything that looks risky:

claude --permission-mode auto -n scaffolding

Auto mode is ideal for long scaffolding runs where you want to step away and let Claude work.

Alternative: worktree isolation

For extra safety, scaffold in a Git worktree. Claude works in an isolated copy of the repo, and you review the result before merging:

claude --worktree scaffolding

This creates .claude/worktrees/scaffolding/ with its own branch. If you do not like the result, the worktree is discarded cleanly.

If the scaffold needs .env files from your main repo, create a .worktreeinclude file in the project root:

.env
.env.local

What not to use

Do not use --dangerously-skip-permissions (bypass mode) unless you are inside an isolated container or VM. It disables all safety checks.