Skip to content
Skillpedia
General coding48k · #3778

os-scripting

Helps solve problems with operating system scripts (Linux, Windows, macOS). Covers automation, administration, and script debugging.

What it does

This is a toolkit to help fix problems with system scripts (commands your computer runs automatically) and manage your operating system. It assists in finding errors, creating better scripts, and automating tasks.

When to use it

  • ✓When a system script isn't working as expected.
  • ✓To create scripts that automate repetitive tasks.
  • ✓When trying to understand why the system is slow or showing errors.

Example of what to ask your AI

“Help me find the error in this backup script.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

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

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/os-scripting/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It works by guiding you through steps to assess your system, analyze your scripts, find errors, and even help write new ones. It uses other tools to check the details.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill os-scripting

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/os-scripting/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from 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 "$@"

…

FAQ

What is a system script?

It's a file with a list of commands that your computer runs in sequence to perform a task, like backing up files or installing a program.

What does it mean to 'debug' a script?

Debugging means finding and fixing errors in a script so it works correctly.

What operating systems are supported?

It works on Linux, macOS, and Windows systems.

Details

Original description by the author

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

Popularity

GitHub stars
48k
Ranking position
#3778
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills