Production-grade shell tools - jq, xargs, parallel, pipelines
Process JSON with jq, handle arguments with xargs, and parallelize tasks using GNU parallel. Use this when you need to parse API responses, batch process files, or build efficient data pipelines from shell commands.
/plugin marketplace add pluginagentmarketplace/custom-plugin-bash-shell/plugin install custom-plugin-bash-shell@pluginagentmarketplace-bash-shellThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/validate.pyMaster jq, xargs, GNU parallel, and advanced pipelines
After completing this skill, you will be able to:
# Basic queries
jq '.' file.json # Pretty print
jq '.key' file.json # Get key
jq '.array[0]' file.json # First element
jq '.nested.key' file.json # Nested
# Filtering
jq '.[] | select(.active)' # Filter
jq '.[] | select(.count > 10)'
# Transform
jq '.[] | {id, name}' # Select fields
jq 'map(.price * .qty)' # Calculate
jq -r '.[] | @csv' # To CSV
# From variables
jq -n --arg x "$VAR" '{value: $x}'
# Basic usage
echo "a b c" | xargs echo
# Safe with spaces
find . -print0 | xargs -0 rm
# Limit arguments
cat list | xargs -n 1 process
cat list | xargs -n 10 process
# Parallel
cat list | xargs -P 4 -n 1 process
# Placeholder
cat urls | xargs -I {} curl {}
# Basic
parallel echo ::: a b c
# From file
parallel process :::: list.txt
# With options
parallel -j 4 process ::: *.txt
parallel --progress process ::: *.txt
# Complex
parallel -j 4 --delay 0.5 \
'curl -s {} | jq .name' :::: urls.txt
# Sort and unique
sort file.txt
sort -n file.txt # Numeric
sort -u file.txt # Unique
sort file | uniq -c # Count
# Cut and paste
cut -d',' -f1,3 file.csv
paste file1.txt file2.txt
# Transform
tr 'a-z' 'A-Z' < file
tr -d '\r' < dos.txt > unix.txt
curl -s 'https://api.example.com/users' |
jq -r '.[] | select(.active) | [.id, .email] | @csv' |
sort -t',' -k2 |
head -20
# Compress all logs in parallel
find . -name "*.log" |
parallel -j 4 gzip
# Batch API calls with rate limit
cat ids.txt |
parallel -j 5 --delay 0.2 \
'curl -s "https://api.example.com/item/{}"'
# JSON to formatted output
cat data.json |
jq -r '.items[] | "\(.id)\t\(.name)\t\(.price)"' |
column -t
| Don't | Do | Why |
|---|---|---|
| Parse JSON with grep | Use jq | Proper parsing |
| Sequential when parallel | Use parallel | Speed |
cat | xargs | xargs < file | Efficiency |
| Error | Cause | Fix |
|---|---|---|
jq: error | Invalid JSON | Validate with jq . |
xargs: arg too long | Too many args | Use -n |
parallel: not found | Not installed | apt install parallel |
# Validate JSON
jq '.' < input.json
# Debug pipeline
command1 | tee /dev/stderr | command2
# Test jq filter
echo '{"a":1}' | jq '.a'
# Faster sorting
LC_ALL=C sort file.txt
# Parallel for CPU-bound
parallel -j $(nproc) process ::: *.txt
# Stream large files
jq -c '.[]' large.json | while read -r line; do
# process line
done
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.