skills/bash-quality-gate/SKILL.md
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.
npx skillsauth add philoserf/claude-code-setup skills/bash-quality-gateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run a standardized set of shell script quality checks. Auto-fix what's fixable, report the rest with specific locations.
Verify these tools are available before running checks. Both are installed via Homebrew.
shfmt — shell formatter (brew install shfmt)shellcheck — static analysis (brew install shellcheck)Run checks in this order. Formatting first so shellcheck analyzes clean code.
Run shfmt -w -i 2 -ci -bn . on all .sh files — report which files were modified. If no files changed, report "formatting clean."
Flags:
-i 2 — 2-space indent-ci — indent switch cases-bn — binary ops start of lineIf a project has an .editorconfig, shfmt picks it up automatically — skip the explicit flags.
Run shellcheck -x *.sh **/*.sh — report issues with file, line, rule code, and severity. The -x flag follows source directives.
If scripts lack a shebang, shellcheck defaults to sh. Note any scripts missing shebangs and suggest adding them.
Run shellcheck --shell=sh *.sh **/*.sh — check POSIX compliance. Report bash-specific constructs that would break on sh/dash. Skip this step if all scripts explicitly declare #!/bin/bash or #!/usr/bin/env bash — they've opted into bash.
After all checks complete, present a summary table:
| Check | Status | Details |
|-------------|--------|----------------------|
| shfmt | FIXED | 2 files formatted |
| shellcheck | WARN | 3 issues (1 error) |
| portability | SKIP | All scripts use bash |
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.
The gate passes when all of these are true:
shfmt reports no formatting differences (or auto-fixed successfully)shellcheck reports zero errors (severity: error)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 |
*.sh#!/bin/bash, #!/bin/sh, #!/usr/bin/env bashnode_modules/, .git/, and vendor/ directoriesgo-quality-gate, python-quality-gate, or typescript-quality-gaterefactor-cleandiff-reviewtesting
Audits ~/.claude/skills/ for unused entries, duplicate names, missing descriptions, and the longest descriptions. Use when trimming the user-level skill set, asking which skills are unused, finding duplicates, or auditing skill hygiene.
tools
Publishes and manages Flowershow sites with the `fl` CLI (the Go-based successor to the deprecated `@flowershow/publish` npm package). Use when publishing a note or folder to Flowershow, syncing updates to an existing site, managing auth, listing or deleting sites, or installing/upgrading the CLI.
tools
Copy edits prose while preserving voice and register. Use when asked to edit, copy edit, line edit, proofread, revise, polish, tighten, rewrite, or clean up essays, articles, drafts, or fiction. Flags wordiness, passive voice, clichés, hedging, and nominalizations with bracket markup or clean rewrites.
tools
Improves CLAUDE.md by analyzing conversation patterns. Use when Claude keeps repeating a mistake, when teaching a new preference, or when consolidating guidance from repeated instructions. Captures recurring corrections and style preferences into project instructions.