What problem does it solve?
This Skill provides comprehensive guidance and patterns to overcome the complexities and common pitfalls of using Claude Code's Bash tool. It prevents errors, streamlines CLI operations, and enhances security, allowing you to automate complex development workflows with confidence and efficiency.
Core Features & Use Cases
- Error Prevention & Troubleshooting: Addresses 12 common Bash tool issues (e.g., pipe failures, timeouts, env var persistence) with proven solutions, saving debugging time.
- Advanced Automation with Hooks: Implement
PreToolUse, PostToolUse, and SessionStart hooks for security (dangerous command blocking), audit logging, and environment setup.
- Efficient CLI Orchestration: Learn patterns for command chaining (
&&, ||), parallel execution, HEREDOC for multi-line content, and output capture to build robust workflows.
- Use Case: Automatically enforce coding standards by running a linter (
prettier --write) as a PostToolUse hook after any file edit, ensuring consistent code quality without manual intervention. Or, set up a PreToolUse hook to prevent accidental rm -rf / commands, safeguarding your environment.
Quick Start
Set up a PreToolUse hook to log every bash command executed in this session to ~/.claude/bash-audit.log.