Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
日本語の概要は準備中です。原文の説明を表示しています。
Bash scripting guidance — safe scripting patterns, quoting, error handling, pipes, and maintainable shell code.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Bash is the glue of Unix systems: deployment scripts, CI steps, cron jobs, and one-liners that would take fifty lines in another language. It's also a footgun collection — unquoted variables, silent failures, and pipe errors have caused legendary outages. The difference is discipline: a few strict habits make bash scripts reliable instead of terrifying.
This skill covers the safe subset of bash: strict mode, quoting, error handling, and the patterns for writing scripts you'd trust in production — plus knowing when to reach for Python instead.
set -euo pipefail — exit on error, fail on undefined variables, propagate pipe failures. The single most important bash habit; without it, scripts fail silently and continue."$variables" — unquoted expansions undergo word splitting and globbing. The #1 source of "works until the filename has a space" bugs. Use "$@" for argument arrays.0 success, non-zero failure; check explicitly where it matters (if ! command; then). $? captures the last status — use it immediately before anything overwrites it.cmd1 | cmd2 — without pipefail, a failing cmd1 is masked by cmd2's success. set -o pipefail fixes it; still, avoid mega-pipes that are undebuggable — break complex logic into steps with temp files or variables.[[ ]] over [ ] (fewer surprises, pattern matching, no word splitting); -f/-d/-n/-z tests; (( )) for arithmetic. Quote inside [[ ]] only where needed — it's safer than [ ] by design.local variables — local prevents global-namespace pollution, the source of subtle cross-function bugs. Return values via stdout or namerefs, not just exit codes.$1, $@, $#; getopts for flags; validate argument counts and show usage. Scripts with undocumented arguments are write-only.trap for cleanup (temp files, locks) on EXIT/ERR/INT — scripts must clean up after themselves even when interrupted.mkdir -p, grep -q || append), use locks (flock) for cron jobs that might overlap.<<EOF for multiline input, <<< for single strings — cleaner than echo chains for generating config files.<(cmd) and >(cmd) — diffing command outputs, feeding pipelines as files. Powerful for comparisons without temp files.arr=(a b c), "${arr[@]}" — for lists that survive spaces. Associative arrays (declare -A) for key-value maps.set -x traces execution; bash -n syntax-checks without running; ShellCheck (the linter) catches most bugs statically — run it in CI on every script.jq, error handling with retries, anything over ~100 lines — that's Python's job. Bash for orchestration, Python for logic.#!/usr/bin/env bash, avoid bashisms in sh scripts, beware GNU vs BSD tool differences (macOS vs Linux sed/date).#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
usage() { echo "Usage: $(basename "$0") <env>"; exit 1; }
[[ $# -eq 1 ]] || usage
main() {
local env="$1"
# ... script logic ...
}
main "$@"
"$var", "$@", "${arr[@]}" — make unquoted expansion a code-review red flag.trap cleanup for temp files and locks:
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT INT TERM
flock prevents overlapping cron runs from corrupting state:
exec 9>/var/lock/myscript.lock
flock -n 9 || { echo "Already running"; exit 0; }
echo; log to stderr for diagnostics, stdout for data:
log() { echo "[$(date '+%F %T')] $*" >&2; }
while getopts "e:v" opt; do
case $opt in e) env="$OPTARG";; v) verbose=1;; *) usage;; esac
done
set -euo pipefail — silent failures continuing; strict mode always."$var" everywhere.ls — filenames with spaces/newlines break it; use globs or find -print0.cd without checking — cd $dir; rm -rf * in the wrong directory; cd "$dir" || exit 1.> — clobbering files accidentally; set -o noclobber in interactive shells, care in scripts.set -o pipefail or explicit ${PIPESTATUS[@]} checks.local everything.flock for scheduled scripts./tmp races and assumptions; mktemp, configurable paths.echo for data — mixing diagnostics and output; log to stderr, data to stdout.sed, date, stat; test on target platforms or use portable constructs.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
日本語の概要は準備中です。原文の説明を表示しています。
Create 3D visuals with modeling, texturing, lighting, rendering, and optimization for web and product.
日本語の概要は準備中です。原文の説明を表示しています。
Create 3D web experiences: scene setup, models, materials, lighting, animation, scroll-driven scenes, and performance budgets. Use when adding 3D to websites beyond basic demos.
日本語の概要は準備中です。原文の説明を表示しています。
Writing abstracts that get papers read — structured content, the 5-sentence core, and journal-specific constraints.
日本語の概要は準備中です。原文の説明を表示しています。
Learn effectively from courses and academies: choosing programs, studying actively, and converting courses into skills. Use when investing time/money in structured learning.
日本語の概要は準備中です。原文の説明を表示しています。
Audit designs for accessibility with WCAG checklists covering color, type, focus, motion, and content.
日本語の概要は準備中です。原文の説明を表示しています。