Zum Inhalt springen
Skillpedia
Allgemeines Programmieren48k · #5392

os-scripting

Was er macht

Das ist ein Werkzeugkasten, der dir hilft, Probleme mit Systemskripten zu beheben. Systemskripte sind Befehle, die dein Computer automatisch ausführt. Außerdem unterstützt dich der Werkzeugkasten bei der Verwaltung deines Betriebssystems. Er hilft dir beim Finden von Fehlern, beim Erstellen besserer Skripte und beim Automatisieren von Aufgaben.

Wann du ihn nutzt

  • ✓Wenn ein Systemskript nicht wie erwartet funktioniert.
  • ✓Wenn du Skripte erstellen willst, die wiederkehrende Aufgaben automatisieren.
  • ✓Wenn du herausfinden willst, warum das System langsam ist oder Fehler anzeigt.

Link zum Skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/os-scripting/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/os-scripting/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Hilf mir, den Fehler in diesem Backup-Skript zu finden.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Das Tool führt dich Schritt für Schritt durch die Analyse deines Systems und deiner Skripte. Es hilft dir, Fehler zu finden, und sogar, neue Skripte zu schreiben. Für die Details nutzt es andere Tools.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

OS/Shell Scripting Troubleshooting Workflow Bundle

Overview

Comprehensive workflow for operating system troubleshooting, shell scripting, and system administration across Linux, macOS, and Windows. This bundle orchestrates skills for debugging system issues, creating robust scripts, and automating administrative tasks.

When to Use This Workflow

Use this workflow when:

  • Debugging shell script errors
  • Creating production-ready bash scripts
  • Troubleshooting system issues
  • Automating system administration tasks
  • Managing processes and services
  • Configuring system resources

Workflow Phases

Phase 1: Environment Assessment

Skills to Invoke

  • bash-linux - Linux bash patterns
  • bash-pro - Professional bash scripting
  • bash-defensive-patterns - Defensive scripting

Actions

  1. Identify operating system and version
  2. Check available tools and commands
  3. Verify permissions and access
  4. Assess system resources
  5. Review logs and error messages

Diagnostic Commands

# System information
uname -a
cat /etc/os-release
hostnamectl

# Resource usage
top
htop
df -h
free -m

# Process information
ps aux
pgrep -f pattern
lsof -i :port

# Network status
netstat -tulpn
ss -tulpn
ip addr show

Copy-Paste Prompts

Use @bash-linux to diagnose system performance issues

Phase 2: Script Analysis

Skills to Invoke

  • bash-defensive-patterns - Defensive scripting
  • shellcheck-configuration - ShellCheck linting
  • bats-testing-patterns - Bats testing

Actions

  1. Run ShellCheck for linting
  2. Analyze script structure
  3. Identify potential issues
  4. Check error handling
  5. Verify variable usage

ShellCheck Usage

# Install ShellCheck
sudo apt install shellcheck  # Debian/Ubuntu
brew install shellcheck      # macOS

# Run ShellCheck
shellcheck script.sh
shellcheck -f gcc script.sh

# Fix common issues
# - Use quotes around variables
# - Check exit codes
# - Handle errors properly

Copy-Paste Prompts

Use @shellcheck-configuration to lint and fix shell scripts

Phase 3: Debugging

Skills to Invoke

  • systematic-debugging - Systematic debugging
  • debugger - Debugging specialist
  • error-detective - Error pattern detection

Actions

  1. Enable debug mode
  2. Add logging statements
  3. Trace execution flow
  4. Isolate failing sections
  5. Test components individually

Debug Techniques

# Enable debug mode
set -x  # Print commands
set -e  # Exit on error
set -u  # Exit on undefined variable
set -o pipefail  # Pipeline failure detection

# Add logging
log() {
    echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" >> /var/log/script.log
}

# Trap errors
trap 'echo "Error on line $LINENO"' ERR

# Test sections
bash -n script.sh  # Syntax check
bash -x script.sh  # Trace execution

Copy-Paste Prompts

Use @systematic-debugging to trace and fix shell script errors

Phase 4: Script Development

Skills to Invoke

  • bash-pro - Professional scripting
  • bash-defensive-patterns - Defensive patterns
  • linux-shell-scripting - Shell scripting

Actions

  1. Design script structure
  2. Implement functions
  3. Add error handling
  4. Include input validation
  5. Add help documentation

Script Template

#!/usr/bin/env bash
set -euo pipefail

# Constants
readonly SCRIPT_NAME=$(basename "$0")
readonly SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)

# Logging
log() {
    local level="$1"
    shift
    echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$level] $*" >&2
}

info() { log "INFO" "$@"; }
warn() { log "WARN" "$@"; }
error() { log "ERROR" "$@"; exit 1; }

# Usage
usage() {
    cat <<EOF
Usage: $SCRIPT_NAME [OPTIONS]

Options:
    -h, --help      Show this help message
    -v, --verbose   Enable verbose output
    -d, --debug     Enable debug mode

Examples:
    $SCRIPT_NAME --verbose
    $SCRIPT_NAME -d
EOF
}

# Main function
main() {
    local verbose=false
    local debug=false

    while [[ $# -gt 0 ]]; do
        case "$1" in
            -h|--help)
                usage
                exit 0
                ;;
            -v|--verbose)
                verbose=true
                shift
                ;;
            -d|--debug)
                debug=true
                set -x
                shift
                ;;
            *)
                error "Unknown option: $1"
                ;;
        esac
    done

    info "Script started"
    # Your code here
    info "Script completed"
}

main "$@"

…

Häufige Fragen

Was ist ein Systemskript?

Ein Systemskript ist eine Datei mit einer Liste von Befehlen, die dein Computer nacheinander ausführt, um eine Aufgabe zu erledigen. Ein Beispiel ist das Sichern von Dateien oder das Installieren eines Programms.

Was bedeutet „debuggen“ bei einem Skript?

Debuggen heißt, Fehler in einem Skript zu finden und zu beheben, damit es korrekt funktioniert.

Welche Betriebssysteme werden unterstützt?

Das Tool funktioniert unter Linux, macOS und Windows.

Details

Originalbeschreibung des Autors

Operating system and shell scripting troubleshooting workflow for Linux, macOS, and Windows. Covers bash scripting, system administration, debugging, and automation.

repo: sickn33/agentic-awesome-skills

Beliebtheit

GitHub-Sterne
48k
Platz im Ranking
#5392
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills