bats-setup

Scaffold bats-core tests, helper libraries, and CI configuration in a repository.

3|Updated Mar 1, 2010
One-click install
npx skills add https://github.com/harleypig/dotfiles --skill bats-setup
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bats-setup
Source: https://github.com/harleypig/dotfiles/tree/main/config/claude/skills/bats-setup
Command: npx skills add https://github.com/harleypig/dotfiles --skill bats-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill scaffolds a bats-core testing setup into a repository that has little or no tests, creating the tests/ layout (suite/helpers/scaffold), wiring helper libraries via bats_load_library, installing the meta-test generator, adding a starter test, and configuring CI to validate the setup. Use when a repo has no tests yet or an outdated test setup: "set up bats", "add tests to this repo", "scaffold bats testing", "get bats working here", "stand up a test suite", "add a test harness", or when porting another repo to this repo's bats conventions. Follows rules/bats.md.

Core Features & Use Cases

  • Automated layout creation: establishes tests/, suite/, helpers/ scaffolding following bats conventions.
  • Library wiring: wires helper libraries via bats_load_library for deterministic tests.
  • Starter test & CI readiness: adds a starter test, installs meta-test generator, and sets up CI hooks to run tests.

Quick Start

Run bats-setup in your repository to initialize a bats testing suite.

Frequently Asked Questions about bats-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up bats-core testing in a repository with no existing tests?▼

To set up bats-core testing, this scaffolding process creates the tests/ layout, wires helper libraries via bats_load_library, adds a starter test, and configures CI integration for automated validation.

What's the best way to scaffold a bats test suite for CI?▼

Scaffolding a bats test suite for CI involves establishing the tests/ directory structure, installing helper libraries, adding a starter test, and wiring CI hooks to run the tests automatically.

Do I need bats and helper libraries installed before scaffolding a test workflow?▼

Yes, bats and helper libraries are prerequisites before scaffolding the test workflow, as the process relies on these existing tools to wire libraries and generate the starter test layout.

Can I use bats-setup to port test conventions from another repository?▼

Yes, you can use this scaffolding process to port another repository's bats conventions, aligning the new test setup with rules/bats.md for consistency across projects.

What directory structure does a bats testing scaffold create?▼

A bats testing scaffold creates a structured directory layout including tests/, suite/, and helpers/ folders, establishing a standardized workflow that follows bats conventions for deterministic testing.