bash-script

Enforce Bash script development standards with a reusable template and conventions.

1|Updated Sep 1, 2025
One-click install
npx skills add https://github.com/LandonSchropp/agent-toolkit --skill bash-script-landonschropp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bash-script
Source: https://github.com/LandonSchropp/agent-toolkit/tree/main/skills/bash-script
Command: npx skills add https://github.com/LandonSchropp/agent-toolkit --skill bash-script-landonschropp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Standardizes Bash script development by providing a reusable template, defined conventions, and patterns to reduce errors and improve consistency across projects.

Core Features & Use Cases

  • Template-driven scaffolding: Start with a standardized template (assets/template.sh) to ensure consistent structure.
  • Enforced conventions: Naming rules for scripts, executable permissions, and kebab-case flags for predictable usage.
  • Error handling & validation: Includes set -euo pipefail, a print_help function, and clear error messages for invalid options and failures.
  • References: See references/colored-echo.md for colored output techniques applicable in scripts.

Quick Start

Copy assets/template.sh to your new script and replace the placeholder logic with your own.

Frequently Asked Questions about bash-script

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Bash script with proper error handling and conventions?

Bash script error handling requires using set -euo pipefail and a standardized template to enforce strict error reporting and consistent structure. This approach ensures scripts fail safely on errors, undefined variables, and pipe failures, reducing runtime surprises.

What conventions should I follow for Bash command-line flags?

Bash command-line flags should use kebab-case naming conventions for predictable usage and explicit parsing logic. Scripts must also follow defined naming rules and have executable permissions set, ensuring clear maintainability and standardized execution across projects.

Why does my Bash script keep failing silently on errors?

Bash scripts fail silently when strict error handling is not enabled. Applying set -euo pipefail via a reusable template enforces immediate failure on errors, undefined variables, and pipe breaks, providing clear error messages instead of silent issues.

What's the best way to standardize Bash scripts across multiple projects?

Standardizing Bash scripts requires a reusable template and enforced conventions for structure, naming, and error handling. Template-driven scaffolding ensures every utility starts with consistent structure and robust error reporting, reducing errors and improving maintainability across projects.

Do I need to write a help function for every Bash utility script?

Every Bash utility script should include a print_help function to display usage instructions for explicit flag parsing. Using a standardized template automatically provides this structure, ensuring clear error messages for invalid options and predictable user experiences.