# Add executable smoke tests for shell scripts and CLIs before refactors ship

> Use Bats-core when an agent needs to turn fragile shell scripts or command-line workflows into something it can verify repeatedly after edits. The agent writes focused Bash tests for success paths, failure paths, and output contracts, then runs them locally or in CI before a refactor, release, or incident fix goes out.

- Skill: `agentskillexchange/add-executable-smoke-tests-for-shell-scripts-and-clis-before` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/add-executable-smoke-tests-for-shell-scripts-and-clis-before`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/add-executable-smoke-tests-for-shell-scripts-and-clis-before/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/add-executable-smoke-tests-for-shell-scripts-and-clis-before

---


# Add executable smoke tests for shell scripts and CLIs before refactors ship

Use Bats-core when an agent needs to turn fragile shell scripts or command-line workflows into something it can verify repeatedly after edits. The agent writes focused Bash tests for success paths, failure paths, and output contracts, then runs them locally or in CI before a refactor, release, or incident fix goes out.

## Prerequisites

Bash plus Bats-core and the shell scripts or CLI commands under test

## Installation

No source-backed install or usage instructions could be extracted automatically. Review the upstream project before running this skill in a sensitive workflow.

- Source: https://github.com/bats-core/bats-core

## Documentation

- https://bats-core.readthedocs.io/en/stable/

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/add-shell-and-cli-smoke-tests-before-refactors-ship/)

