bats-testing-patterns – Coding skill for AI agents
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.
Install the bats-testing-patterns skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/bats-testing-patterns-1f43c.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /bats-testing-patterns – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/bats-testing-patterns-1f43c.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $bats-testing-patterns – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/bats-testing-patterns-1f43c.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /bats-testing-patterns – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/bats-testing-patterns-1f43c.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /bats-testing-patterns – then describe the task you want done.
SKILL.md content
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.mdfor detailed patterns and examples.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Related skills
- hunt-ssti – Hunt server-side template injection (SSTI) across Jinja2 (Flask/Django), Twig (Symfony)…
- bdistill-behavioral-xray – X-ray any AI model's behavioral patterns — refusal boundaries, hallucination tendencies…
- bdistill-knowledge-extraction – Extract structured domain knowledge from AI models in-session or from local open-source…
- before-you-build – Review product risk before coding by checking demand, alternatives, channels, switching…
- behavioral-modes – AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate)…
- experiment-designer – Use when planning product experiments, writing testable hypotheses, estimating sample…
- memento-flashcards – Spaced-repetition flashcards: create, review, quiz, export.
- bevy-ecs-expert – Master Bevy's Entity Component System (ECS) in Rust, covering Systems, Queries…