cli

motlin's avatarfrom motlin

CLI guidelines. Use whenever using the Bash tool, which is almost always. Also use when you see "command not found: __zoxide_z" errors.

⭐0stars🔀1forks📁View on GitHub🕐Updated Dec 22, 2025

When & Why to Use This Skill

This Claude skill provides a standardized set of CLI guidelines to optimize terminal interactions and shell command execution. It focuses on improving efficiency through advanced directory navigation with zoxide, enforcing the use of descriptive long-form flags for better command readability, and reducing execution overhead by minimizing redundant directory changes. By following these best practices, the agent ensures more reliable, maintainable, and error-free interactions with the Bash tool.

Use Cases

  • Efficient Directory Navigation: Utilizing zoxide and command-specific flags like 'git -C' to manage file paths without the need for repetitive 'cd' commands.
  • Command Standardization: Enforcing the use of long-form flags (e.g., --message instead of -m) to ensure that all terminal operations are explicit and easy to debug.
  • Environment Troubleshooting: Automatically identifying and resolving 'command not found' errors related to shell utilities like zoxide.
  • Optimized Script Execution: Streamlining multi-step CLI workflows by combining commands and adhering to best practices for agent-driven terminal automation.
namecli
descriptionCLI guidelines. Use whenever using the Bash tool, which is almost always. Also use when you see "command not found: __zoxide_z" errors.

CLI Guidelines

Directory Navigation

  • I replaced cd with zoxide. Use command cd to change directories
    • This is the only command that needs to be prefixed with command
    • Don't prefix git with command git
  • Try not to use cd or zoxide at all. It's usually not necessary with CLI commands
    • Don't run cd <dir> && git <subcommand>
    • Prefer git -C <dir> <subcommand>

Flag Names

Prefer long flag names when available:

  • Don't run git commit -m
  • Run git commit --message instead