meta-shell-scripting

Automate bash and zsh scripting standards for error handling and naming conventions.

1|Updated Sep 12, 2025
One-click install
npx skills add https://github.com/JimmyTranDev/dotfiles --skill meta-shell-scripting
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: meta-shell-scripting
Source: https://github.com/JimmyTranDev/dotfiles/tree/main/src/opencode/skills/meta-shell-scripting
Command: npx skills add https://github.com/JimmyTranDev/dotfiles --skill meta-shell-scripting

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Establishes consistent, robust shell scripting practices across bash and zsh, reducing errors and onboarding time for new scripts.

Core Features & Use Cases

  • Shebang selection guidelines for portable vs interactive scripts.
  • Error handling patterns (set -e, set -eo pipefail) and inline error checks.
  • Naming conventions (variable naming, function naming, module structure) and color output helpers.
  • Modular architecture with worktree-style sourcing for reusable libraries.

Quick Start

Integrate these conventions by auditing your repository and applying the standard patterns to new and existing scripts.

Frequently Asked Questions about meta-shell-scripting

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

FAQPage Schema
How do I standardize shell scripting conventions across bash and zsh?

Standardize shell scripting conventions by applying consistent shebang selection, strict error handling patterns, and modular sourcing to ensure scripts are portable and maintainable across bash and zsh environments.

What is the best way to handle errors in bash and zsh scripts?

Handle errors in bash and zsh scripts by applying strict error handling patterns like set -e and set -eo pipefail, alongside inline error checks, to automatically halt execution and prevent silent failures.

How do I structure modular shell scripts for reusable libraries?

Structure modular shell scripts by applying worktree-style sourcing patterns to separate reusable libraries, establishing consistent function naming and module structures for easier auditing across teams.

Does this shell scripting convention approach work for both interactive and portable scripts?

Yes, this shell scripting convention approach provides specific shebang selection guidelines to properly distinguish and configure scripts for both portable execution and interactive shell environments.

Why do my shell scripts fail silently in CI/CD pipelines?

Shell scripts fail silently in pipelines when strict error handling is missing. Applying set -eo pipefail and inline error checks standardizes execution to catch failures immediately rather than allowing them to pass unnoticed.

Can I use these shell scripting patterns to audit existing repository code?

Yes, you can audit existing repository code by reviewing current scripts against standard naming conventions, shebang selections, and modular sourcing patterns, then applying these safe conventions to new and existing scripts.