소스 정보
- 저장소
- miles990/claude-software-skills
- 최근 소스 활동
- 2026년 1월 8일 02:34
- 감지된 SKILL.md 언어
- 영어
- 스타
- 20
- 포크
- 5
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/miles990/claude-software-skills --skill shell-bash명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
Enterprise-grade repository analysis with arc42/C4 architecture documentation, technical debt quantification, security assessment, and multi-stakeholder reporting
Claude Code Plugin 開發、發布、安裝、更新與 Marketplace 管理完整指南
Flame Engine core fundamentals - components, input, collision, camera, animation, scenes
SOC 직업 분류 기준
SKILL.md 표시 중
| name | shell-bash |
| description | Shell scripting and Bash programming patterns |
| domain | programming-languages |
| version | 1.0.0 |
| tags | ["bash","shell","scripting","automation","cli"] |
| triggers | {"keywords":{"primary":["bash","shell","sh","zsh","script","terminal","cli"],"secondary":["grep","sed","awk","pipe","cron","automation","makefile"]},"context_boost":["devops","linux","unix","automation","sysadmin"],"context_penalty":["web","frontend","mobile","gui"],"priority":"medium"} |
Shell scripting patterns for automation, system administration, and CLI tools.
#!/usr/bin/env bash
#
# Script: backup.sh
# Description: Backup files to remote server
# Usage: ./backup.sh [options] <source> <destination>
#
set -euo pipefail # Exit on error, undefined vars, pipe failures
IFS=$'\n\t' # Safer word splitting
# Constants
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly SCRIPT_NAME="$(basename "${BASH_SOURCE[0]}")"
readonly LOG_FILE="/var/log/${SCRIPT_NAME%.sh}.log"
# Default values
VERBOSE=false
DRY_RUN=false
COMPRESS=true
# Cleanup on exit
cleanup() {
local exit_code=$?
# Cleanup temporary files
rm -f "${TEMP_FILE:-}"
exit "$exit_code"
}
trap cleanup EXIT
# Logging functions
log() {
local level="$1"
shift
echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$level] $*" | tee -a "$LOG_FILE"
}
info() { log "INFO" "$@"; }
warn() { log "WARN" "$@" >&2; }
error() { log "ERROR" "$@" >&2; }
debug() { [[ "$VERBOSE" == true ]] && log "DEBUG" "$@" || true; }
die() {
error "$@"
exit 1
}
# Usage
usage() {
cat <<EOF
Usage: $SCRIPT_NAME [options] <source> <destination>
Options:
-v, --verbose Enable verbose output
-n, --dry-run Show what would be done
-h, --help Show this help message
Examples:
$SCRIPT_NAME /data /backup
$SCRIPT_NAME -v --dry-run /home/user /mnt/backup
EOF
}
# Main function
main() {
parse_args "$@"
validate_inputs
perform_backup
}
# Run main if script is executed directly
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
main "$@"
fi
# Using getopts (POSIX)
parse_args_getopts() {
while getopts ":vnh" opt; do
case $opt in
v) VERBOSE=true ;;
n) DRY_RUN=true ;;
h) usage; exit 0 ;;
\?) die "Invalid option: -$OPTARG" ;;
:) die "Option -$OPTARG requires an argument" ;;
esac
done
shift $((OPTIND - 1))
SOURCE="${1:-}"
DESTINATION="${2:-}"
}
# Using manual parsing (supports long options)
parse_args() {
while [[ $# -gt 0 ]]; do
case "$1" in
-v|--verbose)
VERBOSE=true
shift
;;
-n|--dry-run)
DRY_RUN=true
shift
;;
-c|--compress)
COMPRESS=true
shift
;;
--no-compress)
COMPRESS=false
shift
;;
-h|--help)
usage
exit 0
;;
--)
;;
-*)
die
;;
*)
;;
SOURCE=
DESTINATION=
}
() {
[[ -z ]] && die
[[ -z ]] && die
[[ -e ]] || die
}
# Variable assignment
name="John"
readonly CONSTANT="immutable"
# Default values
name="${name:-default}" # Use default if unset or empty
name="${name:=default}" # Assign default if unset or empty
name="${name:+alternative}" # Use alternative if set and non-empty
name="${name:?error message}" # Error if unset or empty
# String manipulation
str="Hello, World!"
echo "${str:0:5}" # "Hello" (substring)
echo "${str: -6}" # "World!" (last 6 chars)
echo "${#str}" # 13 (length)
echo "${str/World/Bash}" # "Hello, Bash!" (replace first)
echo "${str//o/0}" # "Hell0, W0rld!" (replace all)
echo "${str#Hello, }" # "World!" (remove prefix)
echo "${str%!}" # "Hello, World" (remove suffix)
echo "${str^^}"
filename=
# Indexed arrays
declare -a fruits=("apple" "banana" "cherry")
fruits+=("date") # Append
echo "${fruits[0]}" # "apple" (first element)
echo "${fruits[-1]}" # "date" (last element)
echo "${fruits[@]}" # All elements
echo "${#fruits[@]}" # 4 (length)
echo "${!fruits[@]}" # 0 1 2 3 (indices)
# Iterate
for fruit in "${fruits[@]}"; do
echo "$fruit"
done
# With indices
for i in "${!fruits[@]}"; do
echo "$i: ${fruits[i]}"
done
# Associative arrays (bash 4+)
declare -A user=(
[name]="John"
[email]="john@example.com"
[age]=30
)
echo ""
key ;
evens=()
n ;
(( n % == )) && evens+=()
# Test operators
# Strings
[[ -z "$str" ]] # Empty
[[ -n "$str" ]] # Not empty
[[ "$a" == "$b" ]] # Equal
[[ "$a" != "$b" ]] # Not equal
[[ "$a" < "$b" ]] # Less than (lexicographic)
[[ "$a" =~ ^[0-9]+$ ]] # Regex match
# Numbers
[[ "$a" -eq "$b" ]] # Equal
[[ "$a" -ne "$b" ]] # Not equal
[[ "$a" -lt "$b" ]] # Less than
[[ "$a" -le "$b" ]] # Less than or equal
[[ "$a" -gt "$b" ]] # Greater than
[[ "$a" -ge "$b" ]]
[[ -e ]]
[[ -f ]]
[[ -d ]]
[[ -r ]]
[[ -w ]]
[[ -x ]]
[[ -s ]]
[[ -nt ]]
[[ -ot ]]
[[ == ]];
[[ == ]];
start|begin)
start_service
;;
stop|end)
stop_service
;;
restart)
stop_service
start_service
;;
*)
1
;;
[[ -f ]] && process_file
[[ -d ]] || -p
# For loop
for item in item1 item2 item3; do
echo "$item"
done
# C-style for
for ((i = 0; i < 10; i++)); do
echo "$i"
done
# While loop
counter=0
while [[ $counter -lt 5 ]]; do
echo "$counter"
((counter++))
done
# Read file line by line
while IFS= read -r line; do
echo "$line"
done < "$file"
# Process command output
while IFS= read -r file; do
echo "Processing: $file"
done < <(find . -name "*.txt")
# Until loop
until [[ -f "$lockfile" ]]; do
sleep 1
done
# Break and continue
for i in {1..10}; do
[[ -eq 5 ]] &&
[[ -eq 8 ]] &&
# Basic function
greet() {
local name="$1"
echo "Hello, $name!"
}
# Function with return value
is_valid_email() {
local email="$1"
[[ "$email" =~ ^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$ ]]
}
# Check return value
if is_valid_email "test@example.com"; then
echo "Valid email"
fi
# Function with output capture
get_user_count() {
wc -l < /etc/passwd
}
count=$(get_user_count)
# Function with array parameter
process_files() {
local -a files=("$@")
for file in "${files[@]}"; do
echo "Processing: $file"
done
}
process_files file1.txt file2.txt file3.txt
# Function with named reference (bash 4.3+)
modify_array() {
local -n arr=$1
arr+=("new_element")
}
my_array=("a" "b" "c")
modify_array my_array
() {
dividend=
divisor=
[[ -eq 0 ]];
>&2
1
$((dividend / divisor))
}
result=$(safe_divide 10 2) &&
# grep - search patterns
grep "error" logfile.txt # Find lines with "error"
grep -i "error" logfile.txt # Case-insensitive
grep -E "error|warning" logfile.txt # Extended regex
grep -v "debug" logfile.txt # Invert match
grep -c "error" logfile.txt # Count matches
grep -l "error" *.log # List files with matches
grep -r "TODO" src/ # Recursive search
# sed - stream editor
sed 's/old/new/' file.txt # Replace first occurrence
sed 's/old/new/g' file.txt # Replace all
sed -i.bak 's/old/new/g' file.txt # In-place with backup
sed '/pattern/d' file.txt # Delete matching lines
sed -n '10,20p' file.txt # Print lines 10-20
sed 's/^/prefix: /' file.txt # Add prefix
# awk - field processing
awk '{print $1}' file.txt # First field
awk -F: '{print $1}' /etc/passwd # Custom delimiter
awk '{sum += $1} END {print sum}' data.txt # Sum first column
awk 'NR > 1' file.txt # Skip header
awk '$3 > 100 {print $1, $3}' data.txt # Conditional print
awk '{print NR": "$0}' file.txt
-d: -f1 /etc/passwd
-c1-10 file.txt
-d, -f1,3 data.csv
file.txt
-n numbers.txt
-r file.txt
-t: -k3 -n /etc/passwd
file.txt
file.txt | -c
file.txt | -d
|
-d < file.txt
-s < file.txt
find . -name | xargs -l
find . -name -print0 | xargs -0
| xargs -n1
urls.txt | xargs -P4 -I{} curl {}
# Background processes
long_running_command &
pid=$! # Get PID of last background job
wait $pid # Wait for specific process
# Run multiple in background and wait
for file in *.txt; do
process_file "$file" &
done
wait # Wait for all
# Parallel processing with xargs
find . -name "*.jpg" -print0 | xargs -0 -P4 -I{} convert {} {}.png
# Job control
jobs # List jobs
fg %1 # Bring job 1 to foreground
bg %1 # Resume job 1 in background
kill %1 # Kill job 1
# Process substitution
diff <(sort file1.txt) <(sort file2.txt)
while read -r line; do
echo "$line"
done < <(command_that_outputs)
# Command groups
{ cmd1; cmd2; cmd3; } > output.txt # Group and redirect
( cd /tmp && cmd1; cmd2 ) # Subshell (doesn't affect current shell)
# Coprocesses
coproc my_coproc { while read -r line; ; ; }
>&
-r response <&