shell-script-quality

Enforce ShellCheck linting and BATS test coverage for shell scripts.

4|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/d-o-hub/chaotic_semantic_memory --skill shell-script-quality-d-o-hub
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shell-script-quality
Source: https://github.com/d-o-hub/chaotic_semantic_memory/tree/main/.agents/skills/shell-script-quality
Command: npx skills add https://github.com/d-o-hub/chaotic_semantic_memory --skill shell-script-quality-d-o-hub

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures shell scripts pass ShellCheck linting and have BATS tests for complex logic, reducing runtime errors and increasing maintainability.

Core Features & Use Cases

  • Linting: Enforce ShellCheck compliance for all scripts in scripts/ and for new or modified files.
  • Testing: Ensure BATS tests cover complex logic, with templates and examples in tests/bats/.
  • CI Integration: Gate pull requests on lint and test results to maintain quality.

Quick Start

Run the quality workflow to lint scripts/ with ShellCheck and validate behavior with BATS tests.

Frequently Asked Questions about shell-script-quality

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

FAQPage Schema
How do I enforce ShellCheck compliance for bash scripts in a project?

To enforce ShellCheck compliance for bash scripts, this Skill lints all files in the scripts/ directory, including new and modified code. It requires scripts to use set -euo pipefail to ensure safety and prevent runtime errors.

How do I set up BATS test coverage for shell scripts?

Setting up BATS test coverage for shell scripts involves placing test templates and examples in the tests/bact/ directory. This Skill ensures BATS tests validate complex logic behavior to increase overall script maintainability.

Can I gate pull requests on shell script linting and test results?

Yes, you can gate pull requests on shell script linting and test results by integrating this Skill into your CI pipeline. It blocks merges unless scripts pass ShellCheck linting and BATS behavioral tests successfully.

What is the best way to reduce runtime errors in bash scripts using static analysis?

The best way to reduce runtime errors in bash scripts using static analysis is applying ShellCheck compatibility alongside strict error handling. This Skill enforces set -euo pipefail to catch failures early and validate behavior with BATS tests.

Do I need to use set -euo pipefail to pass shell script quality checks?

Yes, you need to use set -euo pipefail to pass shell script quality checks enforced by this Skill. This strict mode is required for ShellCheck compatibility, ensuring scripts exit on errors and fail safely on unset variables.