standards-shell

Enforce safe, idiomatic Bash scripting standards across a codebase.

2|Updated Apr 10, 2024
One-click install
npx skills add https://github.com/gdurandvadas/dotfiles --skill standards-shell-gdurandvadas
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: standards-shell
Source: https://github.com/gdurandvadas/dotfiles/tree/main/config/opencode/skills/standards-shell
Command: npx skills add https://github.com/gdurandvadas/dotfiles --skill standards-shell-gdurandvadas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Shell scripts often suffer from inconsistency, readability issues, and potential security risks. standards-shell codifies best practices to ensure safe, maintainable Bash code and aligns teams with the Google Shell Style Guide.

Core Features & Use Cases

  • Idiomatic bash patterns and naming conventions based on the Google Shell Style Guide.
  • Safety practices including proper quoting, set -euo pipefail, and explicit error handling.
  • Code quality controls with ShellCheck guidance and consistent formatting.
  • Use cases include CI pipelines, code reviews, onboarding new contributors, and maintaining large Bash codebases.

Quick Start

Review a repository's Bash scripts against the standards and start applying the recommended patterns.

Frequently Asked Questions about standards-shell

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

FAQPage Schema
What are the best practices for safe and idiomatic Bash scripting?▼

Idiomatic Bash scripting standards enforce safe practices like set -euo pipefail, proper quoting, and explicit error handling to ensure scripts are reliable, readable, and maintainable.

How do I enforce Bash code quality standards in a CI pipeline?▼

Enforce Bash code quality in CI pipelines by integrating ShellCheck for linting, requiring set -euo pipefail, and validating shebangs and quoting against a standardized style guide.

Does ShellCheck work with Google Shell Style Guide conventions?▼

Yes, ShellCheck integrates with Google Shell Style Guide conventions to enforce idiomatic patterns, proper quoting, and naming rules, ensuring Bash scripts meet established code quality standards.

How do I review shell scripts for consistency and reliability?▼

Review shell scripts for consistency and reliability by checking shebang handling, quoting, set -euo pipefail usage, and naming conventions against codified standards to ensure maintainable code.

Why do I need set -euo pipefail in my shell scripts?▼

You need set -euo pipefail in shell scripts to enforce safety by exiting on errors, treating unset variables as errors, and failing pipelines when any command fails, preventing silent issues.