# bats-testing-patterns

> Claude/Codex skill by [@wshobson](https://omgskills.com/library/wshobson/index.md) · 38k stars · Updated 2026-07-22

Master Bash Automated Testing System (Bats) for comprehensive shell script testing. Use when writing tests for shell scripts, CI/CD pipelines, or requiring test-driven development of shell utilities.

Tags: agent-skills, agentic-ai, agents, ai-agents, anthropic, automation, claude-code, claude-code-plugins, codex-cli, copilot, cursor, cursor-rules, developer-tools, gemini-cli, mcp, multi-agent, opencode, orchestration, prompt-engineering, workflows

## Install

```sh
git clone https://github.com/wshobson/agents /tmp/agents && ln -s /tmp/agents/plugins/shell-scripting/skills/bats-testing-patterns ~/.claude/skills/bats-testing-patterns
```

## From README

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. When to Use This Skill Writing unit tests for shell scripts Implementing test-driven development (TDD) for scripts Setting up automated testing in CI/CD pipelines Testing edge cases and error conditions Validating behavior across different shell environments Building maintainable test suites for scripts Creating fixtures for complex test scenarios Testing multiple shell dialects (bash, sh, dash) Detailed patterns and worked examples Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

## Links

- HTML page: https://omgskills.com/library/wshobson/agents/bats-testing-patterns/
- GitHub: https://github.com/wshobson/agents
- Author: [@wshobson](https://omgskills.com/library/wshobson/index.md)

## More from this repo

- [api-design-principles](https://omgskills.com/library/wshobson/agents/plugins/backend-development/skills/api-design-principles/index.md) — Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight...
   - [@wshobson](https://omgskills.com/library/wshobson/index.md) · 42k stars
- [angular-migration](https://omgskills.com/library/wshobson/agents/plugins/framework-migration/skills/angular-migration/index.md) — Migrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates.
   - [@wshobson](https://omgskills.com/library/wshobson/index.md) · 42k stars
- [architecture-decision-records](https://omgskills.com/library/wshobson/agents/architecture-decision-records/index.md) — Used to write and maintain Architecture Decision Records (ADRs) following best practices for technical decision...
   - [@wshobson](https://omgskills.com/library/wshobson/index.md) · 42k stars
