Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By melodic-software Verified Orgv1.1.10MITIn 1 marketplace
Formats shell scripts with shfmt and lints them with ShellCheck at commit using your repo's own config. Rewrites .sh and .bash files after each batch of Claude's edits; needs shfmt, ShellCheck, jq and Node on PATH.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
shell-scripting, shfmt, shellcheck, bash-formatter, shell-linter, pre-commit-hook, code-formatting, shell ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Claude Code asks for these when you enable the plugin. Sensitive values are stored in your system keychain.
Format shell scripts after editsbash_format_enabled
After each batch of tool calls, run shfmt over the shell scripts it wrote, where the repository's .editorconfig opts in
booleandefault true
Check shell scripts in uncommitted changes at turn endbash_format_end_of_turn
At the end of each turn, run the pre-commit ShellCheck pass over the lines changed since the last commit and hand any findings back so they are fixed before the turn ends, at most once per turn. Nothing is rewritten. Off by default.
booleandefault false
Act on files git ignoresbash_format_lint_gitignored
By default the hook leaves a file the repository gitignores alone: it is not rewritten or linted, since a rewrite of an ignored file has no git checkout to undo it. Set true to act on gitignored files too. A tracked file that matches an ignore pattern is always in scope.
booleandefault false
A Claude Code plugin that formats shell scripts with shfmt and checks them with ShellCheck in two places: shfmt once per batch of tool calls in a Claude Code session, and shfmt plus ShellCheck again at git pre-commit for every author. ShellCheck findings are reported by the pre-commit entry, on the lines the commit adds; they no longer reach Claude on each edit.
It uses your repository's own configuration, .shellcheckrc for linting and .editorconfig
for formatting. It ships no rules of its own.
PostToolBatch row runs after the tool calls of a turn
step resolve. It takes the .sh and .bash files that Write, Edit or MultiEdit calls in
the batch named, and runs shfmt once over each. It prints nothing and exits 0: no finding and no
notice goes to Claude or the user. A file that Read named is never rewritten.
if (neither applies to PostToolBatch). Its launcher skips the
script unless the payload holds a string ending in sh (which both extensions do), so a batch
without a shell file costs one node process.PostToolBatch row, fetch
hooks: PostToolBatch live..editorconfig section names shell files: a
shell glob such as [*.sh], [*.bash], or [*.{sh,bash}] (including path-prefixed forms like
[**/*.sh]), found by walking up from the file to the repository root. A bare [*] catch-all is
not an opt-in: most repos only set line-ending / charset properties there, and treating that
as a format gate would rewrite shell files to shfmt's built-in defaults. A repo whose
.editorconfig only configures other languages (or has none) likewise leaves shell files
untouched. Path-only sections like [scripts/**] are also excluded; use an explicit shell glob.
shfmt runs with no parser/printer flags and with --apply-ignore, so your .editorconfig
sets the style and an ignore = true section (e.g. for generated or vendored scripts) excludes
a file. For what each does, see the DESCRIPTION section and the --apply-ignore entry of the
shfmt manual page, which the
mvdan/sh README: shfmt section links.${m[a-b]} would become the different key ${m[a - b]} (see the Caveats section of the
mvdan/sh README and
mvdan/sh#956; checked 2026-10-04 against shfmt
v3.14.1; recheck when a shfmt release changes how it reads subscripts). When shfmt rewrites the
file, both passes compare every subscript's source text before and after, including the blanks
inside the brackets, since ${m[ key ]} is a different key from the ${m[key]} shfmt prints. If
any differs, the file is restored byte for byte. The pre-commit entry names each changed
subscript and its line on stderr; the batch row stays silent. Quote the key (${m["a-b"]}) if
the array is associative; if it is indexed, write it as shfmt prints it, which depends on the
release: v3.13.0 printed ${a[i+1]} where the releases around it print ${a[i + 1]} (reverted
in v3.13.1, per the mvdan/sh changelog).
To keep a file's keys unquoted, give it an ignore = true section in .editorconfig. The tree is
read with --to-json, or with -tojson on a shfmt older than 3.8, since 3.4 and 3.5 have no
--to-json. When the tree cannot be read, the rewrite is put back, because an unchecked rewrite
may have changed a key. A file shfmt leaves unchanged reads no tree and costs no extra process..shellcheckrc for ShellCheck and .editorconfig for shfmt. For how each file is found, see
ShellCheck manual: RC FILES
and the shfmt manual page linked above. Files under .githooks/ (installed copies) are skipped.bash_format_lint_gitignored to true to act on them too. A tracked file that7-day copy clicks
npx claudepluginhub melodic-software/claude-code-plugins --plugin bash-formatBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground