If you're writing shell scripts for production, you need tests, and this skill shows you how to build them with Bats. It covers the essentials like setup/teardown patterns, output assertions, and mocking external commands. The examples are practical: testing exit codes, validating file operations, stubbing curl calls, and managing test fixtures. Bats integrates cleanly with CI/CD pipelines and outputs TAP format, so your shell script tests work alongside the rest of your test suite. The fixture management and mocking patterns alone will save you hours of debugging flaky tests.
npx skills add https://github.com/wshobson/agents --skill bats-testing-patterns