This one's for anyone writing shell scripts that need proper testing. It covers Bats (Bash Automated Testing System) with patterns for unit testing your bash code, including how to test exit codes, output, and side effects. You get guidance on test structure, fixtures, setup and teardown hooks, and integrating tests into CI/CD. It's focused on TDD for shell utilities and catching edge cases before they hit production. The scope is narrow: if you're not testing shell scripts specifically, this isn't it. Includes an implementation playbook with detailed examples when you need to go deeper than the basics.

skills.sh installs
206
GitHub stars
39.4K
last updated
Jun 3, 2026

Install

$ npx -y skills add sickn33/antigravity-awesome-skills --skill bats-testing-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Bats Testing Patterns

Comprehensive guidance for writing comprehensive unit tests for shell scripts using Bats (Bash Automated Testing System), including test patterns, fixtures, and best practices for production-grade shell testing.

Use this skill when

  • Writing unit tests for shell scripts
  • Implementing TDD for scripts
  • Setting up automated testing in CI/CD pipelines
  • Testing edge cases and error conditions
  • Validating behavior across shell environments

Do not use this skill when

  • The project does not use shell scripts
  • You need integration tests beyond shell behavior
  • The goal is only linting or formatting

Instructions

  • Confirm shell dialects and supported environments.
  • Set up a test structure with helpers and fixtures.
  • Write tests for exit codes, output, and side effects.
  • Add setup/teardown and run tests in CI.
  • If detailed examples are required, open resources/implementation-playbook.md.

Resources

  • resources/implementation-playbook.md for detailed patterns and examples.

Sponsors

Details

Repository
github.com/sickn33/antigravity-awesome-skills
Category
Testing & QA
First seen
Jun 3, 2026

More from sickn33/antigravity-awesome-skills

All 708
1royrvd avatartesting-best-practicesroyrvd/golden-testing-rules-for-aitesting best practices204skills.sh installs
2vercel-labs avatarbenchmark-testingvercel-labs/vercel-pluginbenchmark testing193skills.sh installs
3davila7 avatarplaywrightdavila7/claude-code-templatesUse when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) vi185skills.sh installs
4steipete avataropenclaw-test-heap-leakssteipete/clawdisopenclaw test heap leaks182skills.sh installs
5leeovery avatarlaravel-testingleeovery/claude-laravellaravel testing177skills.sh installs
6absolutelyskilled avatartest-strategyabsolutelyskilled/absolutelyskilledtest strategy157skills.sh installs