bats-testing-patterns
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.
Third-Party Agent Skill: Review the code before installing. Agent skills execute in your AI assistant's environment and can access your files. Learn more about security
Installation for Agentic Skill
View all platforms →skilz install wshobson/agents/bats-testing-patterns skilz install wshobson/agents/bats-testing-patterns --agent opencode skilz install wshobson/agents/bats-testing-patterns --agent codex skilz install wshobson/agents/bats-testing-patterns --agent gemini
First time? Install Skilz: pip install skilz
Works with 14 AI coding assistants
Cursor, Aider, Copilot, Windsurf, Qwen, Kimi, and more...
Extract and copy to ~/.claude/skills/ then restart Claude Desktop
git clone https://github.com/wshobson/agents cp -r agents/plugins/shell-scripting/skills/bats-testing-patterns ~/.claude/skills/ Need detailed installation help? Check our platform-specific guides:
Related Agentic Skills
command-development
by anthropicsThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use ...
bash-defensive-patterns
by wshobsonMaster defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities...
debug-cli
by antinomyhqUse when users need to debug, modify, or extend the code-forge application's CLI commands, argument parsing, or CLI behavior. This includes adding new...
scanning-for-xss-vulnerabilities
by jeremylongshoreThis skill enables AI assistant to automatically scan for xss (cross-site scripting) vulnerabilities in code. it is triggered when the user requests t...
Agentic Skill Details
- Repository
- agents
- Type
- Technical
- Meta-Domain
- cloud infrastructure
- Primary Domain
- linux
- Market Score
- 54.2
Agent Skill Grade
D
Score: 60/100
Click to see breakdown
Score Breakdown
Areas to Improve
- 631 lines in single file violates token economy; no reference files exist
- File exceeds 100 lines significantly but has no explicit table of contents
- When to Use lists scenarios but no step-by-step workflow for getting started
Recommendations
- Focus on improving Pda (currently 12/30)
- Address 1 high-severity issues first
- Add trigger phrases to description for discoverability
Graded: 1/5/2026
Developer Feedback
I took a look at your bats-testing-patterns skill and wanted to share some thoughts.
Links:
The TL;DR
You're at 60/100, which puts you in D territory (needs work). This is based on Anthropic's best practices for skill design. Your strongest area is Spec Compliance (12/15) – the metadata and structure are solid. The real drag is Progressive Disclosure Architecture (12/30) – that's where you're leaving the most points on the table.
What's Working Well
- Solid triggers – "unit tests," "shell scripts," "TDD," and "CI/CD" clearly signal when to use this. That's good discoverability.
- Comprehensive pattern coverage – You're addressing a real gap here. Assertions, mocking, fixtures, and CI integration all deserve their place.
- Useful test_helper.sh template – That helper pattern is production-ready and shows someone actually built this, not just theorized about it.
- Good spec compliance – Your frontmatter is clean, hyphen-case naming is correct, and the structure follows the rules.
The Big One: Monolithic File Structure
Here's the thing: 631 lines in a single SKILL.md is killing your PDA score (and that's -10 points you're leaving on the table). When a file gets that long, it becomes a reference manual, not a skill guide. Developers have to scroll through installation details, basic patterns, and advanced CI integration all at once.
The fix is straightforward: Split this into a primary guide + reference files:
SKILL.md (100-150 lines) - Overview, quick start, when to use
references/
├── installation.md
├── assertion-patterns.md
├── mocking-and-stubs.md
├── fixtures.md
└── ci-integration.md
This keeps your main file focused on getting someone started, while letting them dive into references when they need depth. That restructure alone gets you +10 points.
Other Things Worth Fixing
Add an explicit table of contents – For files over 100 lines, link to your sections at the top. Makes navigation way better, costs almost nothing.
Add a quick-start workflow – Right now you list "when to use" scenarios but no numbered steps. Something like: "1. Install Bats, 2. Create first test file, 3. Write an assertion, 4. Run
bats test.bats" gets people moving immediately. That's +3 points in Ease of Use.Surface that test_helper.sh earlier – It's buried 500 lines down. Move it to a references file or mention it in your quick start. Makes it discoverable.
Trim marketing language – "Comprehensive guidance for writing comprehensive unit tests" and "production-grade" read a bit salesy. Stick with "Guidance for writing unit tests using Bats, including test patterns, fixtures, and CI/CD integration."
Quick Wins
- Biggest impact: Restructure into SKILL.md + references/ (+10 points)
- Second: Add quick-start workflow with numbered steps (+3 points)
- Third: Add TOC with anchor links at the top (+2 points)
- Quick polish: Remove marketing language, surface test_helper earlier (+2 points total)
That's realistically +17 points if you nail these – gets you to 77/100, which is solid C territory.
Checkout your skill here: SkillzWave.ai | SpillWave We have an agentic skill installer that install skills in 14+ coding agent platforms. Check out this guide on how to improve your agentic skills.
Browse Category
More cloud infrastructure Agentic SkillsReport Security Issue
Found a security vulnerability in this agent skill?