How Do I Set Up Claude Code Aliases and Skip Permission Prompts?
I kept typing claude over and over again. Every time I wanted to run Claude Code, I had to type the full command. Then came the permission prompts—approve this, confirm that. My development flow felt like driving with a manual transmission in stop-and-go traffic.
Then I discovered the --dangerously-skip-permissions flag and shell aliases. Let me show you how I set this up and why that scary flag name is actually a feature, not a bug.
The Permission Prompt Problem
Claude Code asks for permission before executing certain operations. This is a safety feature. But during intensive coding sessions, I found myself approving the same types of operations repeatedly:
- “Allow read of file X?”
- “Allow write to file Y?”
- “Allow bash command Z?”
Each prompt breaks my train of thought. Context switching kills productivity.
My First Solution: A Simple Alias
I added this to my ~/.zshrc:
alias cc='claude --dangerously-skip-permissions'After running source ~/.zshrc, I could type cc instead of claude, and it would skip permission prompts automatically.
This worked great… until I used it on a repository I didn’t fully trust.
The Scary Flag Name is Intentional
That --dangerously-skip-permissions flag isn’t named that way by accident. The Claude team intentionally made it sound alarming.
From the Reddit discussion that taught me this lesson:
“The flag name is intentionally scary. Only use it after you fully understand what Claude Code can and will do to your codebase.”
When you skip permissions, Claude Code can:
- Read any file in your project
- Write to any file (including deleting content)
- Execute bash commands
- Access environment variables you’ve configured
In trusted personal projects? Fine. In production codebases or repos with sensitive data? Dangerous.
A Better Approach: Dual Aliases
I realized I needed options. Not every situation warrants skipping permissions. So I created two aliases:
# Standard Claude Code (with prompts)alias cc='claude'
# Skip permissions version (use carefully)alias ccs='claude --dangerously-skip-permissions'Now I have control:
cc— Normal development, code review, unfamiliar repositoriesccs— Trusted personal projects, rapid prototyping
This small distinction made a big difference in my workflow safety.
When I Use Each Alias
I follow a simple decision tree:
Start coding | v Is this my personal project? / \ YES NO | | v v Do I trust Claude? Use `cc` with full access? (with prompts) / \ YES NO | | v v Use `ccs` Use `cc`Additional Aliases I Found Useful
Over time, I expanded my Claude Code aliases:
# Model-specific aliasesalias cc-opus='claude --model opus'alias cc-sonnet='claude --model sonnet'
# Thinking enabledalias cc-think='claude --thinking'
# Combined: speed + modelalias cc-fast='claude --dangerously-skip-permissions --model sonnet'Each serves a specific purpose in my workflow.
Common Mistakes to Avoid
I made these mistakes so you don’t have to:
Mistake 1: Enabling globally without understanding
I added --dangerously-skip-permissions to my main alias first. Bad idea. I needed the prompts as training wheels to understand what Claude Code actually does.
Mistake 2: Using in untrusted repositories
I ran ccs in a work repository once. Claude accessed files I didn’t expect it to touch. Nothing catastrophic happened, but it was a wake-up call.
Mistake 3: No alternative for control For a while, I only had the skip-permissions alias. When I needed more oversight, I had no convenient option. The dual-alias approach fixed this.
The Trust Model Shift
Using --dangerously-skip-permissions changes your relationship with Claude Code:
Standard Mode: Skip Mode:----------- ----------I request → Claude asks → I request → Claude actsI approve → Claude acts (no approval needed)
Pros: Safety, visibility Pros: Speed, flowCons: Friction, interruptions Cons: Risk, blind trustThe shift from interactive confirmation to pre-established trust requires you to accept upfront that Claude might do things you wouldn’t have approved.
Setting Up Your Aliases
For Zsh users, edit ~/.zshrc. For Bash users, edit ~/.bashrc:
# Claude Code aliases# Standard mode with permission promptsalias cc='claude'
# Skip permissions - ONLY for trusted environmentsalias ccs='claude --dangerously-skip-permissions'
# Reload your configuration# source ~/.zshrc # Zsh# source ~/.bashrc # BashAfter adding, reload your shell configuration.
Key Takeaways
- Start with
cc— Use the standard alias first to learn what permissions Claude requests - Earn the skip — Only use
ccsafter you understand Claude’s operation patterns in your codebase - Keep both options — Having
ccandccslets you match risk to task - Respect the scary name —
--dangerously-skip-permissionssounds alarming for good reason
The productivity gain from aliases is real. But the flag name reminds us: with great power comes great responsibility. Use the skip-permissions flag intentionally, not lazily.
Final Words + More Resources
My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me
Here are also the most important links from this article along with some further resources that will help you in this scope:
Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!
Comments