Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions skills/bash-quality-gate/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Runs shell script quality checks. Use when checking shell script quality, linting bash code, or validating scripts. Covers formatting with shfmt, static analysis with shellcheck, and portability checks.
argument-hint: "[directory or file path]"
---

# Bash Quality Gate
Expand Down Expand Up @@ -53,6 +54,25 @@ After all checks complete, present a summary table:

Then list specific issues grouped by file, with line numbers and ShellCheck codes (e.g., SC2086). Offer to fix reported issues if the user wants.

## Gate Criteria

The gate **passes** when all of these are true:

- `shfmt` reports no formatting differences (or auto-fixed successfully)
- `shellcheck` reports zero errors (severity: error)
- All scripts have a shebang line

The gate **fails** if any `shellcheck` error-severity issues remain after the run.

**Advisory (non-blocking)**: warnings and info-level shellcheck findings. Report them but don't fail the gate.

| Severity | ShellCheck Flag | Gate Impact |
| -------- | --------------- | ----------- |
| error | (default) | **Blocks** |
| warning | `-S warning` | Advisory |
| info | `-S info` | Advisory |
| style | `-S style` | Advisory |

## File Discovery

- Find scripts by extension: `*.sh`
Expand Down
Loading