claude-code-bash-patterns
CommunityMaster Claude Code's Bash, automate CLI workflows.
Software Engineering#devops#security#CLI automation#error prevention#Bash#Claude Code hooks#Git workflows
Authorjackspace
Version1.0.0
Installs0
System Documentation
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, andSessionStarthooks 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 aPostToolUsehook after any file edit, ensuring consistent code quality without manual intervention. Or, set up aPreToolUsehook to prevent accidentalrm -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.
Dependency Matrix
Required Modules
jqpython3
Components
scriptsreferencesassets
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: claude-code-bash-patterns Download link: https://github.com/jackspace/ClaudeSkillz/archive/main.zip#claude-code-bash-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.