# 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/skills/wshobson/agents/bats-testing-patterns/
- GitHub: https://github.com/wshobson/agents
- Author: [@wshobson](https://omgskills.com/library/wshobson/index.md)

## More from this repo

- [python-packaging](https://omgskills.com/skills/wshobson/agents/plugins/python-development/skills/python-packaging/index.md) — Used to create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to...
   - [@wshobson](https://omgskills.com/library/wshobson/index.md) · 39k stars
- [ai-debt-detector](https://omgskills.com/skills/wshobson/agents/plugins/skill-forge-essentials/skills/ai-debt-detector/index.md) — Use after generating code, after accepting AI suggestions, or when reviewing AI-written modules.
   - [@wshobson](https://omgskills.com/library/wshobson/index.md) · 39k stars
- [market-sizing-analysis](https://omgskills.com/skills/wshobson/agents/plugins/startup-business-analyst/skills/market-sizing-analysis/index.md) — Calculate TAM/SAM/SOM for market opportunities using top-down, bottom-up, and value theory methodologies.
   - [@wshobson](https://omgskills.com/library/wshobson/index.md) · 39k stars
