bash-scripting
Skill266 starsChanged 10 months agoApache-2.0View on GitHub
Bash scripting guidelines covering security, portability, error handling, and automation best practices for DevOps.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- bmcszk/agent-skillstheir own version, first seen Sep 23, 2026
- ebal/AI-Skillstheir own version, first seen Jul 15, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- bmcszk/agent-skills★ 1same name
- ebal/AI-Skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository264 other files it gives its agents.
- accessibility-a11ySkill
- alpine-jsSkill
- analytics-data-analysisSkill
- android-developmentSkill
- angular-developmentSkill
- angularSkill
- anime-jsSkill
- anthropic-claude-developmentSkill
- api-developmentSkill
- apollo-graphqlSkill
- aspnet-coreSkill
- astroSkill
- auth0-authenticationSkill
- autogen-developmentSkill
- automl-hyperparameter-optimizationSkill
- aws-developmentSkill
- azureSkill
- backend-developmentSkill
- beautifulsoup-parsingSkill
- bitbucket-workflowSkill
- blazorSkill
- blender-python-addonSkill
- blockchainSkill
- bootstrapSkill
- business-central-developmentSkill
- cheerio-parsingSkill
- chrome-extension-developmentSkill
- ci-cd-best-practicesSkill
- clean-architectureSkill
- clean-codeSkill
- clerk-authenticationSkill
- cloudflare-developmentSkill
- computer-vision-opencvSkill
- convexSkill
- cppSkill
- c-sharpSkill
- cssSkill
- cypressSkill
- data-analysis-jupyterSkill
- data-analystSkill
- data-jupyter-pythonSkill
- deep-learning-pythonSkill
- deep-learning-pytorchSkill
- deep-learningSkill
- deno-typescriptSkill
- design-systemsSkill
- devopsSkill
- django-pythonSkill
- django-rest-api-developmentSkill
- dockerSkill
- dotnetSkill
- drizzle-ormSkill
- drupal-developmentSkill
- elasticsearch-best-practicesSkill
- electron-developmentSkill
- elixirSkill
- embedded-stm32Skill
- esbuild-bundlerSkill
- ethereumSkill
- expo-react-native-javascript-best-practicesSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Write portable, maintainable scripts
- Distinctive: line 14
Use proper error handling throughout
- Distinctive: line 15
Follow consistent naming and formatting
- Very specific: line 19
Use descriptive names for scripts and variables (e.g., backup_files.sh, log_rotation)
- Distinctive: line 22
Use lowercase with underscores for variable names
- Distinctive: line 27
Avoid hardcoding; use environment variables or parameterized inputs
- Distinctive: line 34
Ensure portability by using POSIX-compliant syntax
- Very specific: line 35
Use shellcheck to lint scripts and improve quality
- Distinctive: line 37
Use meaningful exit codes
- Very specific: line 41
Use trap for error handling and cleaning up temporary files
- Distinctive: line 43
Check command return codes explicitly when needed
- Distinctive: line 76
Use SCP/SFTP for remote transfers with key-based authentication
- Distinctive: line 78
Use lock files to prevent concurrent execution
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bash Scripting
You are an expert in Bash scripting with deep knowledge of shell programming, automation, and DevOps practices.
Core Principles
- Write portable, maintainable scripts
- Prioritize security and input validation
- Use proper error handling throughout
- Follow consistent naming and formatting
Naming & Structure
- Use descriptive names for scripts and variables (e.g.,
backup_files.sh,log_rotation) - Employ modular scripts with functions to enhance readability and facilitate reuse
- Include comments for each major section or function
- Use lowercase with underscores for variable names
Input Validation & Security
- Validate all inputs using
getoptsor manual validation logic - Avoid hardcoding; use environment variables or parameterized inputs
- Apply the principle of least privilege in access and permissions
- Quote all variable expansions to prevent word splitting
- Sanitize user input before use
Code Quality
- Ensure portability by using POSIX-compliant syntax
- Use
shellcheckto lint scripts and improve quality - Redirect output to log files where appropriate, separating stdout and stderr
- Use meaningful exit codes
Error Handling & Cleanup
- Use
trapfor error handling and cleaning up temporary files - Implement
set -euo pipefailfor strict error handling - Check command return codes explicitly when needed
- Provide informative error messages
Best Practices
#!/usr/bin/env bash
set -euo pipefail
# Trap for cleanup
trap cleanup EXIT
cleanup() {
# Clean up temporary files
rm -f "${TEMP_FILE:-}"
}
# Use functions for modularity
main() {
validate_input "$@"
process_data
}
validate_input() {
[[ $# -lt 1 ]] && { echo "Usage: $0 <arg>"; exit 1; }
}
main "$@"Automation Best Practices
- Automate cron jobs securely with proper authentication
- Use SCP/SFTP for remote transfers with key-based authentication
- Implement proper logging for auditing
- Use lock files to prevent concurrent execution
Specific Use Cases
- Automate VM or container provisioning
- Bootstrap servers and configure environments
- Manage backups with reliable, auditable processes
- Implement deployment scripts with rollback capability
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.

