Command with Bash Execution in AI
From the Claude Code Slash Commands cheat sheet · Custom Commands · verified Jul 2026
Command with Bash Execution
Run bash before command prompt
markdown
# Command with bash prefix
---
description: Test and review results
allowed-tools: [Bash]
---
!npm test
Review test results above💡 Use ! prefix to run bash before prompt
⚡ Requires allowed-tools: [Bash] in frontmatter
🔍 Command output included in context
🎯 Perfect for test/build automation
custombashautomation