shell-programming

Create and verify Bash scripts against the Google Shell Style Guide.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/rayshan/agent-plugins --skill shell-programming
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shell-programming
Source: https://github.com/rayshan/agent-plugins/tree/main/ray-agent-plugins/skills/shell-programming
Command: npx skills add https://github.com/rayshan/agent-plugins --skill shell-programming

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers write clean, maintainable Bash scripts by adhering to the Google Shell Style Guide, reducing errors and improving readability.

Core Features & Use Cases

  • Enforces Google Shell Style Guide conventions across new and existing shell scripts.
  • Provides health checks with shellcheck and automated tests with bats to validate behavior.
  • Use Case: When asked to "write a shell script" or "review shell code," generate well-structured scripts that follow best practices.

Quick Start

Create a new Bash script that prints a greeting, then run shellcheck and bats tests to verify formatting and behavior.

Frequently Asked Questions about shell-programming

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

FAQPage Schema
How do I write a Bash script that follows Google Shell Style Guide best practices?

To write a Bash script following Google Shell Style Guide best practices, use a tool that enforces formatting, naming, and structural conventions automatically. This ensures clean, maintainable code by validating scripts against the style guide during creation.

How do I check my shell script for errors and style violations?

You can check your shell script for errors and style violations by running shellcheck as a health check. This automated verification identifies syntax errors and enforces best-practice formatting before execution.

What's the best way to test Bash script behavior automatically?

The best way to test Bash script behavior automatically is by using bats, which runs automated tests to validate script functionality. This ensures your script behaves correctly and complies with required standards.

Can I review existing shell code for compliance with best practices?

Yes, you can review existing shell code for compliance with best practices by applying automated checks. The process assesses your current scripts against the Google Shell Style Guide and runs shellcheck to verify formatting and behavior.

When do I need to use shellcheck and bats for my shell scripts?

You need to use shellcheck and bats when writing new scripts or reviewing existing shell code to ensure robustness. These tools enforce health checks and automated tests, reducing errors and improving readability.

Why does my Bash script fail style and formatting checks?

Your Bash script fails style and formatting checks when it deviates from the Google Shell Style Guide conventions. Common issues include improper naming, structural inconsistencies, and syntax errors detected during the shellcheck health verification.