agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when writing Bash scripts or command-line automation. Covers strict mode, safe quoting, argument parsing, trap-based cleanup, portability, and ShellCheck-clean scripts.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill shell --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/shellContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when writing Bash scripts or command-line automation. Covers strict mode, safe quoting, argument parsing, trap-based cleanup, portability, and ShellCheck-clean scripts.
name: shell description: Use when writing Bash scripts or command-line automation. Covers strict mode, safe quoting, argument parsing, trap-based cleanup, portability, and ShellCheck-clean scripts. metadata: category: languages version: 1.0.0 tags: [bash, shell, scripting, shellcheck, automation]
Write shell scripts that fail loudly instead of silently, handle paths with spaces, and clean up after themselves. Most shell bugs are one missing quote or one unchecked exit code.
1. **Start strict** — `set -Eeuo pipefail` and an `IFS` you control. 2. **Parse arguments explicitly** — Validate required inputs and print usage on error. 3. **Quote everything** — Every variable expansion is `"$var"` unless you have a specific reason otherwise. 4. **Register cleanup** — `trap` before you create the first temporary resource. 5. **Gate** — Run ShellCheck; run the script under `bash -n` and, where practical, with `set -x` in a dry run.
**Script skeleton:**
#!/usr/bin/env bash
set -Eeuo pipefail
IFS=$'\n\t'
readonly SCRIPT_NAME="${0##*/}"
usage() {
cat <<USAGE
Usage: ${SCRIPT_NAME} --source DIR --dest DIR [--dry-run]
--source DIR Directory to sync from (required)
--dest DIR Directory to sync to (required)
--dry-run Print actions without performing them
USAGE
}
die() { printf '%s: %s\n' "$SCRIPT_NAME" "$1" >&2; exit 1; }
main() {
local source="" dest="" dry_run=0
while (($# > 0)); do
case "$1" in
--source) source="${2:-}"; shift 2 ;;
--dest) dest="${2:-}"; shift 2 ;;
--dry-run) dry_run=1; shift ;;
-h|--help) usage; exit 0 ;;
*) usage >&2; die "unknown argument: $1" ;;
esac
done
[[ -n "$source" && -n "$dest" ]] || { usage >&2; die "missing required argument"; }
[[ -d "$source" ]] || die "source not a directory: $source"
command -v rsync >/dev/null || die "rsync is required but not installed"
local workdir
workdir="$(mktemp -d)"
trap 'rm -rf "$workdir"' EXIT
local -a flags=(--archive --delete)
((dry_run)) && flags+=(--dry-run)
rsync "${flags[@]}" "$source/" "$dest/"
}
main "$@"A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…