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 Go files and fixes their imports with goimports once per batch of tool calls and at git pre-commit. Rewrites run silently and skip generated files, with no repository config needed.
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
golang, goimports, formatter, gofmt, imports, pre-commit, auto-format, hook
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.
Rewrite Go after editsgo_format_enabled
After each batch of tool calls, run goimports -w over the Go files it wrote
booleandefault true
Check Go in uncommitted changes at turn endgo_format_end_of_turn
At the end of each turn, run goimports over the Go files changed since the last commit and hand back any file it cannot parse, so it is fixed before the turn ends, at most once per turn. Nothing is rewritten. Off by default.
booleandefault false
Act on files git ignoresgo_format_lint_gitignored
By default the hook leaves a file the repository gitignores alone: it is not rewritten, 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 Go files and manages their imports with
goimports in two places: once per batch of
tool calls in a Claude Code session, and again at git pre-commit for every author. Both run
goimports -w, which adds missing imports, removes unused ones, and applies gofmt-equivalent
formatting. goimports reports no lint findings; a file it cannot parse is the only failure, and
the pre-commit entry reports it.
PostToolBatch row runs after the tool calls of a turn
step resolve. It takes the .go files that Write, Edit or MultiEdit calls in the batch
named, and runs goimports -w once over all of them. 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,
and a file goimports cannot parse is left as it is.
if (neither applies to PostToolBatch). Its launcher skips the
script unless the payload mentions .go, so a batch without Go costs one node process.PostToolBatch row, fetch
hooks: PostToolBatch live.python-format,
spelling), this plugin needs no repository configuration to run on a .go file.
goimports' own docs describe it as "a replacement for your editor's gofmt-on-save hook" and it
has no meaningful config-divergence axis when left unconfigured. Running it does not impose a
style choice a repo hasn't made, the same reasoning that makes gofmt itself safe to run
unconditionally.// or /* */ block) precedes the marker, common for
addlicense/goheader output. The plugin applies this guard itself. For the marker's exact
form, see
go command: Generate Go files by processing source..go file the repository gitignores is not
rewritten in the session, since a rewrite of an ignored file has no git checkout to undo it. A
tracked file that matches an ignore pattern stays in scope. Set go_format_lint_gitignored=true
to act on gitignored files too. Files under .githooks/ (installed copies) are always skipped.go toolchain is on PATH, both
places resolve the file's own module path (go list -m) and pass it as goimports' -local
grouping prefix, so your package's own internal imports stay in their own group instead of being
collapsed into the third-party group, without adding any new consumer config. Falls back to
goimports' plain default grouping when go is absent or the file isn't in a resolvable module.go_format_end_of_turn set to true, a Stop row parses
the Go files changed since the last commit (untracked files included), rewrites nothing, and
hands back any file goimports cannot parse, so it is fixed before the turn ends. It blocks at
most once per turn. Off by default.The plugin ships one git-hook entry, goimports-format (git-hooks/entries.json), which
rewrites. At commit it refuses a partly staged Go file untouched, runs goimports -w over the
staged .go files, re-stages what changed, and blocks the commit only when goimports itself
fails, which it does for a file it cannot parse. Each failure prints as
<path>:<line>: <message>; a file that does not parse blocks wherever the error sits. It reaches
every author, not only Claude, once /go-format:setup apply install-git-hooks [scope=local|shared]
registers it with the repository's hook manager (lefthook, husky or plain git hooks). Local scope
stays in this clone; shared scope commits the copy under .githooks/go-format/.
/go-format:setup check reports drift, and the SessionStart probe prints one line when the entry
is missing, stale or edited.
When goimports is missing, the entry follows the check-placement convention: an agent commit
fails with the install command, a person gets a one-line notice, and
git -c checks.skipmissing=goimports commit ... skips it with a printed line.
7-day copy clicks
npx claudepluginhub melodic-software/claude-code-plugins --plugin go-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