# Shell Script

> Use when creating editing reviewing or running shell scripts, Bash scripts, sh files, repository scripts, automation wrappers, validation scripts, install scripts, CI helper scripts, or command-line glue code. Requires strict shell mode.

- Skill: `pasunboneleve/shell-script` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add pasunboneleve/shell-script`
- Raw SKILL.md: https://api.skillmd.com/api/skills/pasunboneleve/shell-script/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: pasunboneleve (https://skillmd.com/u/pasunboneleve)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/pasunboneleve/shell-script

---


Shell scripts must enable strict mode immediately after the shebang:

```bash
set -euo pipefail
```

For generated scripts, include a Bash shebang unless the user requires another shell.

When asked for complete script contents, return a fenced `bash` code block containing the script. Put `set -euo pipefail` immediately after the shebang and before any executable command.

Preserve every requested command in generated scripts. If the user asks for `git status --short`, include `git status --short` exactly inside the script; do not replace it with a summary or a different status command.

For a requested `scripts/check-release.sh` that prints the current branch and then runs `git status --short`, use this shape:

```bash
#!/usr/bin/env bash
set -euo pipefail

git branch --show-current
git status --short
```

Reject shell script changes that omit `set -euo pipefail` or place it late in the file.

This requirement applies to short scripts too. Treat strict mode as required, not optional. When a proposed script omits strict mode because it is short, say that short scripts still need `set -euo pipefail`.

