bash-automation
Skill470 starsChanged 4 months agoMITView on GitHub
Workflows für Shell-Scripting, Automatisierung, Parsing, CI-Tooling.
Files
Bash Automation & Scripting Skill
Workflows für Shell-Scripting, Automatisierung, Parsing, CI-Tooling.
Robuste Scripts
Template
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# Config
VERSION="1.0.0"
LOG_FILE="/tmp/script.log"
# Colors
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; NC='\033[0m'
info() { echo -e "${GREEN}[✓]${NC} $*"; }
warn() { echo -e "${YELLOW}[!]${NC} $*"; }
error() { echo -e "${RED}[✗]${NC} $*" >&2; exit 1; }
# Usage
usage() {
cat <<EOF
Usage: $(basename "$0") [options]
Options:
-h, --help Show help
-v, --verbose Verbose output
-o, --output Output file
EOF
exit 0
}
[[ $# -eq 0 ]] && usage
while [[ $# -gt 0 ]]; do
case $1 in
-h|--help) usage ;;
-v|--verbose) VERBOSE=1 ;;
-o|--output) OUTPUT="$2"; shift ;;
*) error "Unknown: $1" ;;
esac
shift
done
info "Starting..."
trap 'warn "Interrupted"; exit 1' INT TERM
trap 'info "Cleanup done"' EXITError Handling
# Run with timeout
timeout 30 command || { error "Command timed out"; }
# Retry loop
for i in {1..3}; do
command && break || sleep $((i * 2))
done
# Log everything
exec 1> >(tee -a "$LOG_FILE") 2>&1Parsing Patterns
JSON mit jq
# API Response parsen
curl -s https://api.example.com/data | jq -r '
.items[] | select(.status == "active") | {name, id, created}
'
# CSV → JSON
jq -R 'split(",") | {name: .[0], age: .[1] | tonumber}' < data.csv | jq -sYAML mit yq
# Config lesen
yq '.services.web.image' docker-compose.yml
# Value setzen
yq -i '.version = "2.0"' config.yamlDocker Automation
# Bulk cleanup
docker ps -aq --filter "status=exited" | xargs -r docker rm
docker images -q --filter "dangling=true" | xargs -r docker rmi
# Bulk exec
for c in $(docker ps -q --filter "name=web"); do
docker exec "$c" kill -USR2 1 # reload
done
# Healthcheck loop
until curl -sf http://localhost:8080/health; do
echo "Waiting..."; sleep 2
done
info "Service ready"Git Automation
# Bulk branch cleanup
git branch --merged main | grep -v "main\|*" | xargs -r git branch -d
# Auto-commit
git add -A && git commit -m "chore: auto-update $(date +%Y-%m-%d)" || true
# Status for all repos
for d in ~/projects/*/; do
(cd "$d" && echo "=== $d ===" && git status -s)
doneCI Helper Functions
# Semantic Version from Git
git_describe_version() {
local tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")
local commit=$(git rev-list --count HEAD 2>/dev/null || echo "0")
echo "${tag}-build.${commit}"
}
# Check if CI
is_ci() {
[ -n "${CI:-}" ] || [ -n "${GITHUB_ACTIONS:-}" ] || [ -n "${GITLAB_CI:-}" ]
}
# Parallel execution
run_parallel() {
local pids=()
for cmd in "$@"; do
(eval "$cmd") &
pids+=($!)
done
for pid in "${pids[@]}"; do wait "$pid"; done
}In this repository101 other files it gives its agents.
- AGENTS.mdAGENTS.md
- autonomous/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- poc-validatorSkill
- workflow-orchestratorSkill
- research-orchestratorSkill
- tdd-agentSkill
- ai-delegationSkill
- browser-automationSkill
- devops-cicdSkill
- devops-dockerSkill
- module-api-scannerSkill
- module-auth-bypass-moduleSkill
- module-beyondtrust-exploitSkill
- module-cert-transparencySkill
- module-cloud-scannerSkill
- module-command-injection-moduleSkill
- module-cve-databaseSkill
- module-cve-updaterSkill
- module-deserialization-moduleSkill
- module-dns-enumSkill
- module-email-harvesterSkill
- module-enhanced-reconSkill
- module-exploit-assistSkill
- module-ivanti-epmm-exploitSkill
- module-metadata-extractorSkill
- module-metasploit-integrationSkill
- module-nuclei-integrationSkill
- module-osintSkill
- module-osint-superSkill
- module-path-traversal-moduleSkill
- module-reconSkill
- module-report-exportSkill
- module-report-generatorSkill
- module-risk-scoringSkill
- module-searchsploit-integrationSkill
- module-service-vulnerability-mapperSkill
- module-siem-integrationSkill
- module-sql-injection-dbSkill
- module-sql-injection-moduleSkill
- module-ssrf-moduleSkill
- module-subdomain-scanner-advancedSkill
- module-subdomain-scannerSkill
- module-super-scannerSkill
- module-vuln-scannerSkill
- module-web-scraperSkill
- module-whois-lookupSkill
- module-windows-shell-bypassSkill
- module-wordlist-generatorSkill
- module-xss-moduleSkill
- module-xxe-moduleSkill
- module-zap-automationSkill
- module-zap-orchestratorSkill
- multi-languageSkill
- rag-vectorSkill
- security-reviewSkill
- .skillsSkill
- tool-aircrackSkill
- tool-amassSkill
- tool-bloodhoundSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

