When working with Claude Code (Claude CLI), certain flags are powerful but verbose. Typing them repeatedly slows you down and increases the chance of mistakes.
A common example is running Claude with relaxed permission checks:
claude --dangerously-skip-permissions
This guide shows how to create custom commands specifically for Claude Code, so you can run Claude in different modes with short, readable commands.
๐ฏ Goal
Turn this:
claude --dangerously-skip-permissions prompt.txt
Into this:
claude-dev prompt.txt
Same behavior. Cleaner workflow.
๐ง How Claude Code Is Typically Used
Claude Code is often run in different โmodesโ, such as:
- Development mode
- Experimental mode
- Safe/default mode
- Debug or verbose mode
Each mode usually means the same claude command with different flags. This makes Claude an ideal candidate for custom wrapper commands.
โ Why Use Wrapper Commands Instead of Aliases
While aliases work, wrapper scripts are the better choice for Claude Code because:
- They behave like real commands
- They accept arguments cleanly
- They work in scripts, SSH sessions, and automation
- They make Claude usage self-documenting
For Claude Code, this is the recommended pattern.
๐ Creating a Claude-Specific Command Wrapper
Step 1: Decide the Claude mode name
Choose a name that clearly represents how Claude will run:
claude-dev
claude-exp
claude-unsafe
claude-fast
In this example, weโll use:
claude-dev
Step 2: Create the command
Run:
sudo tee /usr/local/bin/claude-dev > /dev/null <<'EOF'
#!/bin/bash
claude --dangerously-skip-permissions "$@"
EOF
What this does:
- Wraps the
claudebinary - Always applies the chosen flags
- Passes all user arguments through correctly
Step 3: Make it executable
sudo chmod +x /usr/local/bin/claude-dev
Step 4: Test it
claude-dev
Or with a file:
claude-dev prompt.txt
Claude now runs in your custom โdevโ mode automatically.
โ ๏ธ Important: Correct Flag Name
Claude CLI is strict about flag names.
โ Incorrect:
--dangerous-skip-permissions
โ Correct:
--dangerously-skip-permissions
If youโre unsure, always verify with:
claude --help
๐ Verifying Your Claude Wrapper
Confirm which command is running:
which claude-dev
Expected output:
/usr/local/bin/claude-dev
Inspect the wrapper:
cat /usr/local/bin/claude-dev
๐ก Recommended Claude Command Patterns
Once you understand the pattern, you can create multiple Claude-specific commands:
Safe default Claude
claude-safe
#!/bin/bash
claude "$@"
Experimental Claude
claude-exp
#!/bin/bash
claude --dangerously-skip-permissions --verbose "$@"
Project-specific Claude
claude-project-x
#!/bin/bash
claude --context project-x "$@"
Each command becomes a clear mental model for how Claude will behave.
๐ง Why This Pattern Works Well for Claude Code
Claude Code is:
- Flag-heavy
- Context-sensitive
- Often run repeatedly with the same options
Wrapper commands turn Claude into a toolbox of modes, instead of a single overloaded command.
This scales extremely well as your usage grows.
๐ Conclusion
If you use Claude Code seriously, creating Claude-specific wrapper commands is one of the best quality-of-life improvements you can make.
You get:
- Shorter commands
- Fewer mistakes
- Clear intent
- Better automation
And most importantly โ a smoother Claude workflow.
Stephen Ndegwa
Stephen Ndegwa is a contributor at the Hostraha blog, sharing insights on web hosting, cloud infrastructure, and web development.