Linux Production-Grade Shell Scripts
Paste the following prompt into your AI chat to install this skill:
Install @org-02qudk26/linux-production-shell-scripts into your AI assistant using https://skillhub.cn/install/skillhub.md.
About this skill
Problem
In Linux operations and automation workflows, many recurring tasks are still written as ad hoc scripts: rsync backups without rotation, disk or CPU checks without useful context, password handling by one-off commands, and error extraction from logs by manual grep. Such scripts often miss permission checks, path quoting, exit codes, and repeatable flow, making production use risky.
How It Works
This skill organizes common system administration tasks into a set of production-ready shell script templates that can serve as building blocks for safe operations or penetration testing environments. Core capabilities include:
- Backups: directory backup, remote server backup, backup rotation, and database backup
- Monitoring: CPU usage, disk space, system health checks, and resource logging
- Users and security: account creation, password expiry checks, password generation, and file encryption
- Logs and network: error log extraction, web server log analysis, connectivity checks, and site status checks
- Automation:
cronscheduling, package installation, service restart, directory sync, and data cleanup
A typical flow starts by selecting the relevant stage template, checking the bash environment, required tools such as rsync or openssl, and execution permissions. Scripts should use absolute paths, quoted variables, and other defensive patterns, and can be debugged with bash -x script.sh.
Boundaries
The templates are focused on Linux/Unix bash administration tasks and do not replace monitoring platforms, configuration management, or complete backup policies. Many scripts require root or sudo; for password, encryption, and user-management changes, validate in a non-production environment first and confirm audit, recovery, and compliance requirements.
Use Cases
- Set up scheduled backups on a test server to keep recent application and database archives.
- Extract error lines from Nginx logs during web service troubleshooting and summarize them.
- Create user accounts in a new environment, set password expiry policy, and audit existing accounts.
- Sync deployment directories, remove old files, and confirm target site availability during releases.
Best For
- Operations engineers maintaining Linux production hosts who need reviewable backup, monitoring, and troubleshooting scripts.
- Security engineers testing policies who need password generation, file encryption, and user expiry check scripts.
- Backend engineers operating internal web services who need log error extraction, status checks, and directory sync.
- System administrators initializing server fleets who need user creation, package install, and cron templates.
Related Skills
Automatically indexes Gradle-cached AAR/JAR dependency classes and returns library coordinates, versions, and public APIs by fully qualified name, using only the Python standard library.
Codifies AMT and YourMT3 training conventions, script patterns, hyperparameters, precision, checkpoints, and NaN safeguards.
Retrieve relevant chunks from a customer-managed PKM dataset by dataset_id and return concise, source-annotated answers.
Convert PRDs, user stories, or functional specs into prioritized test-point checklists covering functional, business-rule, boundary, exception, and non-functional dimensions.