Get the FREE Ultimate OpenClaw Setup Guide →

install-aliases

npx machina-cli add skill Pamacea/smite/shell --openclaw
Files (1)
SKILL.md
4.3 KB

Mission

Cross-platform shell aliases for Claude Code - cc for normal mode and ccc for bypass-permissions mode.


When to Use

  • First-time setup: Run once when installing Claude Code
  • New machine: Run on each new development machine
  • Alias missing: Run if cc/ccc commands don't work
  • Shell change: Re-run after switching shells

Examples

# Installation command
/install-aliases

# After installation
cc "build my feature"          # Normal mode (asks permission)
ccc "generate boilerplate"     # Bypass mode (auto-accepts)

When NOT to Use

  • Every session (one-time installation only)
  • When aliases already work (idempotent but unnecessary)
  • In CI/CD (use full claude command instead)
  • For temporary usage (use full claude command)

Core Workflow

  1. Input: User runs /install-aliases command
  2. Process:
    • Detect shell (PowerShell, Bash, Zsh, cmd.exe)
    • Create backup of shell profile
    • Append alias definitions to profile
    • Verify installation
  3. Output: Global aliases installed and ready after shell reload

Key Principles

  • Cross-platform: Windows (PowerShell/CMD), macOS (Bash/Zsh), Linux (Bash/Zsh)
  • One-time installation: Run once, works forever
  • Idempotent: Safe to re-run without errors
  • Safe backup: Creates backup before modifying profiles
  • Global availability: Works from any directory/project

Aliases

cc (Normal Mode)

  • Behavior: claude - asks for permission on edits
  • Use case: Development, code review, cautious workflows
  • PowerShell: function cc { claude $args }
  • Bash/Zsh: alias cc='claude'

ccc (Bypass Mode)

  • Behavior: claude --bypass-permissions - auto-accepts all edits
  • Use case: Boilerplate generation, bulk edits, trusted workflows
  • PowerShell: function ccc { claude --bypass-permissions $args }
  • Bash/Zsh: alias ccc='claude --bypass-permissions'

Integration

  • Installation command: /install-aliases in smite project
  • Shell reload required: . $PROFILE (PowerShell), source ~/.bashrc (Bash), source ~/.zshrc (Zsh)
  • Files modified: $PROFILE (Windows), ~/.bashrc or ~/.zshrc (macOS/Linux)
  • Backups created: $PROFILE.backup, ~/.bashrc.backup, ~/.zshrc.backup

Configuration

  • PowerShell execution policy: May require Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
  • cmd.exe: Works immediately with .bat files (no reload needed)
  • Shell detection: Automatic based on available commands

Error Handling

  • Permission denied: Suggest checking shell permissions
  • Execution policy error: Guide to set RemoteSigned policy
  • Alias not working: Verify installation with grep/Get-Content
  • Corrupted profile: Restore from backup

Anti-Patterns

Anti-PatternProblemFix
Running every sessionUnnecessary overheadOne-time installation only
Not reloading shellAliases don't workRun reload command after install
Using wrong shellAliases not foundSystem detects shell automatically
Skipping backupCan't revert if neededAutomatic backup created
Using ccc for everythingBypasses safety netUse cc for normal work, ccc only for trusted bulk operations
Ignoring execution policyFails on PowerShellCheck/Set RemoteSigned policy if needed

Integration

  • Installation command: /install-aliases in smite project
  • Shell reload required: . $PROFILE (PowerShell), source ~/.bashrc (Bash), source ~/.zshrc (Zsh)
  • Files modified: $PROFILE (Windows), ~/.bashrc or ~/.zshrc (macOS/Linux)
  • Backups created: $PROFILE.backup, ~/.bashrc.backup, ~/.zshrc.backup

Auto-generated from plugin.json - Last sync: 2025-01-22

Note: Previously named shell-aliases, now shell

Source

git clone https://github.com/Pamacea/smite/blob/main/plugins/essentials/skills/shell/SKILL.mdView on GitHub

Overview

Install the cc (normal) and ccc (bypass) global Claude Code aliases across PowerShell, Bash, Zsh, and cmd.exe with a single command. This cross-platform setup automatically detects the shell, creates backups, and verifies the installation so Claude Code commands are available globally after a shell reload.

How This Skill Works

Run /install-aliases. The installer detects your active shell, backs up the relevant profile, appends the cc and ccc alias definitions for the supported shells, and then verifies the installation so the aliases are ready after you reload the shell.

When to Use It

  • First-time setup on a Claude Code installation
  • Setting up a new development machine
  • Aliases missing or not working (cc/ccc not recognized)
  • After switching or upgrading your shell (PowerShell, Bash, or Zsh)
  • Before starting a Claude Code project to ensure global access

Quick Start

  1. Step 1: Run /install-aliases
  2. Step 2: Reload your shell (PowerShell: . $PROFILE; Bash/Zsh: source ~/.bashrc or source ~/.zshrc)
  3. Step 3: Verify by running cc or ccc to confirm the aliases are active

Best Practices

  • Treat it as a one-time installation per machine; run once and it should persist
  • Make sure to let the installer create backups before modifying profiles
  • Rely on the idempotent design so re-running is safe
  • Let the shell reload after installation to apply the new aliases
  • Verify cc and ccc work from any directory once installed

Example Use Cases

  • On macOS with Zsh, run /install-aliases, then source ~/.zshrc
  • Windows PowerShell: /install-aliases, then reload the profile and run cc
  • Use normal mode: cc 'build my feature' (prompts for permission)
  • Use bypass mode: ccc 'generate boilerplate' (auto-accepts)
  • If the profile is corrupted, restore from the created backup file (e.g., ~/.zshrc.backup)

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers