Bats Shell Testing Patterns
wshobson/agents
Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.
Run complete TDD red-green-refactor cycle for a test. An agent skill from TypedDevs/bashunit.
$ npx skills add TypedDevs/bashunit --skill tdd-cycle -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install TypedDevs/bashunit tdd-cycle --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/TypedDevs/bashunit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/tdd-cycle .claude/skills/tdd-cycle && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "tdd-cycle" agent skill from https://github.com/TypedDevs/bashunit/tree/main/.claude/skills/tdd-cycle into .claude/skills/tdd-cycle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tdd-cycle", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/TypedDevs/bashunit/tree/main/.claude/skills/tdd-cycleType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add TypedDevs/bashunit --skill tdd-cycle -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install TypedDevs/bashunit tdd-cycle --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TypedDevs/bashunit.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/tdd-cycle .agents/skills/tdd-cycle && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "tdd-cycle" agent skill from https://github.com/TypedDevs/bashunit/tree/main/.claude/skills/tdd-cycle into .agents/skills/tdd-cycle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tdd-cycle", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add TypedDevs/bashunit --skill tdd-cycle -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install TypedDevs/bashunit tdd-cycle --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TypedDevs/bashunit.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/tdd-cycle .cursor/skills/tdd-cycle && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "tdd-cycle" agent skill from https://github.com/TypedDevs/bashunit/tree/main/.claude/skills/tdd-cycle into .cursor/skills/tdd-cycle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tdd-cycle", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/TypedDevs/bashunit.git --path .claude/skills/tdd-cycle--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add TypedDevs/bashunit --skill tdd-cycle -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install TypedDevs/bashunit tdd-cycle --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TypedDevs/bashunit.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/tdd-cycle .gemini/skills/tdd-cycle && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "tdd-cycle" agent skill from https://github.com/TypedDevs/bashunit/tree/main/.claude/skills/tdd-cycle into .gemini/skills/tdd-cycle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tdd-cycle", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install TypedDevs/bashunit tdd-cycleInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add TypedDevs/bashunit --skill tdd-cycle -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/TypedDevs/bashunit.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/tdd-cycle .github/skills/tdd-cycle && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "tdd-cycle" agent skill from https://github.com/TypedDevs/bashunit/tree/main/.claude/skills/tdd-cycle into .github/skills/tdd-cycle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tdd-cycle", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add TypedDevs/bashunit --skill tdd-cycle -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install TypedDevs/bashunit tdd-cycle --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TypedDevs/bashunit.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/tdd-cycle .opencode/skills/tdd-cycle && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "tdd-cycle" agent skill from https://github.com/TypedDevs/bashunit/tree/main/.claude/skills/tdd-cycle into .opencode/skills/tdd-cycle/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tdd-cycle", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
tdd-cycleRun complete TDD red-green-refactor cycle for a test. An agent skill from TypedDevs/bashunit.
TDD Cycle is an agent skill from TypedDevs/bashunit. Run complete TDD red-green-refactor cycle for a test
Its SKILL.md is about 380 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Test-driven development. It works with Bash. The repository describes itself as: A simple yet powerfull testing library for bash scripts. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 8f297fb. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadEditWriteBashGrepGlobFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
makeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
TDD Cycle loads about 378 tokens when it runs. Until then it costs about 16 tokens; SKILL.md has 198 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Edit, Write, Bash, Grep, GlobAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from TypedDevs/bashunit at commit 8f297fb, republished under its MIT licence (© TypedDevs). 198 words, ~378 tokens.
.claude/skills/tdd-cycle/SKILL.md (or your agent's skills folder).Execute a complete Red -> Green -> Refactor cycle.
Check for .tasks/YYYY-MM-DD-*.md. If missing, create one before proceeding.
assert_test.sh, doubles -> doubles_test.sh)./bashunit path/to/test.sh — must failsrc/ — only enough for THIS test./bashunit path/to/test.sh — must passmake sa && make lint./bashunit tests/Show updated test inventory. Ask if continuing or done.
© TypedDevs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/tdd-cycle of TypedDevs/bashunit.
Open the folder on GitHubat commit 8f297fb
TDD Cycle next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| TDD Cycle this skillTypedDevs/bashunit | 434 | — | ~378 | Automated safety check: Notes | MIT | |
| Bats Shell Testing Patternswshobson/agents | 40k | 11 repos | ~1.3k | Automated safety check: Pass | MIT | |
| TDDFastLED/FastLED | 7.5k | — | ~848 | Automated safety check: Pass | MIT | |
| TDD ImplementFastLED/FastLED | 7.5k | — | ~1k | Automated safety check: Pass | MIT | |
| Opsmill Dev Test Driving Bugsopsmill/infrahub | 529 | — | ~4k | Automated safety check: Pass | Apache-2.0 | |
| TDD Repairruvnet/ruflo | 74k | — | ~1.6k | Automated safety check: Notes | MIT |
wshobson/agents
Writes unit tests for shell scripts with Bats: error-condition tests, fixtures and mocks, cross-shell checks, parallel runs, helper files and CI integration.
FastLED/FastLED
Guide Test-Driven Development workflow for FastLED. An agent skill from FastLED/FastLED.
FastLED/FastLED
Implement a feature or fix a bug using strict TDD. An agent skill from FastLED/FastLED.
opsmill/infrahub
Writes a single failing test that reproduces a bug after its root-cause analysis is complete, before any fix is written.
ruvnet/ruflo
Test-Driven Repair — given a failing test, spawn a bounded headless claude -p (Read/Edit/Bash only) that makes the test pass without modifying it.
ChrisWiles/claude-code-showcase
Jest patterns for React Native style tests: TDD discipline, mock factory functions, module and GraphQL hook mocking, custom render helpers and anti-patterns to avoid.
TypedDevs/bashunit
Stage and commit changes using conventional commits format. An agent skill from TypedDevs/bashunit.
TypedDevs/bashunit
Fetch GitHub issue, create branch, plan and implement with TDD, then open PR
TypedDevs/bashunit
Walk over all open GitHub issues that are unassigned or assigned to the current user, and process each one via the /gh-issue skill, sequentially.
TypedDevs/bashunit
Push branch and create a GitHub PR with concise, issue-linked description
TypedDevs/bashunit
Run comprehensive pre-release validation checklist. An agent skill from TypedDevs/bashunit.
TypedDevs/bashunit
Run pre-release validation and execute the release process. An agent skill from TypedDevs/bashunit.
Works with
Categories
Run complete TDD red-green-refactor cycle for a test. An agent skill from TypedDevs/bashunit. TDD Cycle is an agent skill from TypedDevs/bashunit.
TDD Cycle fits situations like: tasks that involve Test-driven development.
Run `npx skills add TypedDevs/bashunit --skill tdd-cycle -a claude-code`. Or copy the skill folder (.claude/skills/tdd-cycle in TypedDevs/bashunit) into .claude/skills/tdd-cycle in your project. Claude Code loads it when a task matches its description.
Run `npx skills add TypedDevs/bashunit --skill tdd-cycle -a codex`. Or copy the skill folder (.claude/skills/tdd-cycle in TypedDevs/bashunit) into .agents/skills/tdd-cycle in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TypedDevs/bashunit --skill tdd-cycle -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tdd-cycle, .gemini/skills/tdd-cycle, .github/skills/tdd-cycle and .opencode/skills/tdd-cycle in your project.
Going by SKILL.md and its folder, TDD Cycle needs the command-line tools its instructions call (make). Its frontmatter pre-approves these tools: Read, Edit, Write, Bash, Grep, Glob.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
TDD Cycle is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 378 tokens (SKILL.md is roughly 1.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with TDD Cycle: Bats Shell Testing Patterns (wshobson/agents, 40k stars), TDD (FastLED/FastLED, 7.5k stars), TDD Implement (FastLED/FastLED, 7.5k stars) and Opsmill Dev Test Driving Bugs (opsmill/infrahub, 529 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
TypedDevs (a GitHub organization) maintains it in TypedDevs/bashunit, which has 434 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 6, 2026.
Source: TypedDevs/bashunit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.