thebushidocollective/han/shell-scripting-fundamentals
Claude Code and agent skill by thebushidocollective/han
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Use when writing or modifying Bash/shell scripts. Covers script structure, variables, quoting, conditionals, and loops with modern best practices.
Install
npx vskill@latest install thebushidocollective/han/shell-scripting-fundamentalsSKILL.md
Shell Scripting Fundamentals
Core patterns and best practices for writing robust, maintainable shell scripts.
Script Structure
Always start scripts with a proper shebang and safety options:
Safety Options Explained
set -e: Exit on any command failureset -u: Error on undefined variablesset -o pipefail: Pipeline fails if any command fails
Variables
Declaration and Assignment
Always Quote Variables
Default Values
Conditionals
Test Syntax
Common Test Operators
| Operator | Description | |
|---|---|---|
-f | File exists and is regular file | |
-d | Directory exists | |
-e | Path exists | |
-r | Readable | |
-w | Writable | |
-x | Executable | |
-z | String is empty | |
-n | String is not empty |
Loops
For Loops
While Loops
Arrays
Command Substitution
Functions
Best Practices Summary
- Always use
#!/usr/bin/env bashfor portability - Enable strict mode:
set -euo pipefail - Quote all variable expansions
- Use
[[ ]]instead of[ ]for tests - Use
$(command)instead of backticks - Declare local variables in functions
- Use arrays for lists of items
- Check command existence before use:
command -v cmd >/dev/null
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/validation/shellcheck/skills/shell-scripting-fundamentals/SKILL.md
Popularity
- Repository stars
- 198
- Repository forks
- 21
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thebushidocollective/han/shell-scripting-fundamentals)