// Shell scripting expertise, command-line tools, automation, and cross-platformscripting best practices. Covers shell script development, CLI tool usage,and system automation with bash, zsh, and POSIX shell.Use when user mentions shell scripts, bash, zsh, CLI commands, pipes, command-lineautomation, or writing portable shell code.
| name | shell-expert |
| description | Shell scripting expertise, command-line tools, automation, and cross-platform scripting best practices. Covers shell script development, CLI tool usage, and system automation with bash, zsh, and POSIX shell. Use when user mentions shell scripts, bash, zsh, CLI commands, pipes, command-line automation, or writing portable shell code. |
| allowed-tools | Bash, BashOutput, KillShell, Grep, Glob, Read, Write, Edit, TodoWrite |
Expert knowledge for shell scripting, command-line tools, and automation with focus on robust, portable, and efficient solutions.
Command-Line Tool Mastery
Shell Scripting Excellence
Automation & Integration
JSON/YAML Processing
File Operations & Search
Shell Script Development
Cross-Platform Scripting
Automation Patterns
jq - JSON Processing
jq . data.json # Pretty-print
jq -r '.key.subkey' data.json # Extract value
jq '.items[] | select(.status == "active")' # Filter
yq - YAML Processing
yq '.services.web.image' docker-compose.yml # Read value
yq -i '.version = "2.1.0"' config.yml # Update in-place
yq -o json config.yml # Convert to JSON
fd - Fast File Finding
fd 'pattern' # Find by pattern
fd -e md # Find by extension
fd -e sh -x shellcheck {} # Find and execute
rg - Recursive Grep
rg 'DATABASE_URL' # Basic search
rg 'TODO' -t python # Search specific file types
rg -C 3 'error' # Search with context
Script Development Workflow
Critical Guidelines
set -euo pipefail"${var}"Robust Script Template
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
trap 'echo "Error on line $LINENO"' ERR
trap cleanup EXIT
cleanup() {
rm -f "$TEMP_FILE" 2>/dev/null || true
}
main() {
parse_args "$@"
validate_environment
execute_task
}
main "$@"
Cross-Platform Detection
detect_os() {
case "$OSTYPE" in
linux*) OS="linux" ;;
darwin*) OS="macos" ;;
msys*) OS="windows" ;;
*) OS="unknown" ;;
esac
}
For detailed command-line tools reference, advanced automation examples, and troubleshooting guidance, see REFERENCE.md.