bash

Enforce consistent Bash scripting conventions with shellcheck-guided templates.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/pascalandy/dotfiles --skill bash-pascalandy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bash
Source: https://github.com/pascalandy/dotfiles/tree/main/dot_config/opencode/skill/std-bash
Command: npx skills add https://github.com/pascalandy/dotfiles --skill bash-pascalandy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mktemp, date, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enforces consistent Bash scripting conventions to reduce errors and improve maintainability.

Core Features & Use Cases

  • Code conventions: Enforces function naming with fct_, quoting, strict mode, and safe patterns in new or refactored scripts.
  • Lint and structure: Provides guidelines and a wrapper workflow for shellcheck integration and consistent file layouts (templates, headers, and metadata).
  • Use Case: When starting a new project, use the Bash skill to scaffold compliant scripts and audit existing ones for consistency.

Quick Start

Create a new script using the provided template in scripts/pref_bash_script_template.sh, then adapt the header and conventions for your project.

Frequently Asked Questions about bash

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

FAQPage Schema
How do I enforce consistent Bash scripting conventions to reduce errors?

To enforce consistent Bash scripting conventions, apply strict mode, use fct_ prefixed functions, and ensure quote-safe variable handling. These safe patterns reduce errors and improve maintainability in new or refactored shell scripts.

What is the best way to scaffold a new shell script with safe patterns?

The best way to scaffold safe shell scripts is using a lint-ready template that includes strict mode and consistent file layouts. Adapt the provided template header to start new projects with compliant, shellcheck-guided code.

How does shellcheck integration work with Bash script linting?

Shellcheck integration works through a wrapper workflow that provides guidelines for quality checks and consistent file layouts. This linting process audits existing scripts for consistency and enforces coding standards during refactoring.

Can I use this approach to audit existing shell scripts for consistency?

Yes, you can audit existing shell scripts for consistency by refactoring them against enforced coding standards. Check for strict mode usage, fct_ prefixed functions, and quote-safe variable handling to improve maintainability.

What are the limitations of using strict mode in Bash automation scripts?

Strict mode in Bash automation scripts requires careful quote-safe variable handling and fct_ prefixed function naming to avoid errors. Limitations arise when refactoring non-compliant scripts, as existing logic must be adapted to these rigid coding standards.