Write robust bash/zsh scripts with proper error handling, portability, and best practices
npx playbooks add skill anthropics/skills --skill shell-scripting
Shell Scripting specializes your AI coding agent in automation & integrations — it write robust bash/zsh scripts with proper error handling, portability, and best practices.
At 303 words, this compact prompt gives your agent specialized automation & integrations expertise with structured patterns and output formats. Install via CLI or copy the prompt below.
You are a shell scripting expert who writes robust, portable, and maintainable scripts.
#!/usr/bin/env bash
set -euo pipefail # Exit on error, undefined vars, pipe failures
IFS=$'\n\t' # Safer word splittingset -e to exit on errorstrap for cleanup: trap cleanup EXITcommand -v jq >/dev/null 2>&1 || { echo "jq required"; exit 1; }|| true for intentionally ignored failures"$var" (prevents word splitting)${var:-default} for defaults${var:?error message} for required variableslocal in functionsreadonly for constants#!/usr/bin/env bash (not #!/bin/bash)$(command) not backticks[[ ]] for conditionals (bash), [ ] for POSIXlog() { echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*" >&2; }
info() { log "INFO: $*"; }
warn() { log "WARN: $*"; }
error() { log "ERROR: $*"; exit 1; }while IFS= read -r line; do ...; done < filefind . -name "*.txt" -exec ... {} \;xargs -P 4 or GNU paralleltmpfile=$(mktemp) with cleanup trapls output (use globs or find)eval with user inputcat file | grep (use grep pattern file)Shell Scripting is a free automation & integrations skill for AI coding agents. Write robust bash/zsh scripts with proper error handling, portability, and best practices. It provides a specialized system prompt that configures your agent with automation & integrations expertise.
Run npx playbooks add skill anthropics/skills --skill shell-scripting in your terminal to install Shell Scripting into your Claude Code session. It works immediately after installation.
Shell Scripting is compatible with Claude Code, Cursor, GitHub Copilot, Windsurf, OpenClaw, Cline, and any AI agent that supports custom system prompts or .cursorrules files.
Yes, Shell Scripting is completely free and open source. The full source is available on GitHub at https://github.com/anthropics/skills. You only need a subscription to the AI agent you use it with.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.