Phoenix precommit alias automation - runs mix precommit before git commits if alias exists
- GitHub stars
- 176
Install
/plugin install precommit@elixirRun it inside Claude Code after adding the marketplace with /plugin marketplace add bradleygolden/claude-marketplace-elixir.
Contents
Discovered from sourceAgents 2
Changelog
All notable changes to this plugin will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[1.1.1] - 2025-01-08
Changelog tracking begins with this version. For prior history, see git log.
precommit
Runs mix precommit before git commits when the alias exists.
Overview
Phoenix 1.8+ projects ship with a standard precommit alias:
precommit: ["compile --warnings-as-errors", "deps.unlock --unused", "format", "test"]
This plugin detects and runs that alias before commits.
Installation
/plugin marketplace add github:bradleygolden/claude-marketplace-elixir
/plugin install precommit@elixir
How It Works
- Detects if
precommitalias exists viamix help precommit - If exists: runs
mix precommit, blocks commit on failure - If not exists: skips silently (other plugins handle validation)
Coordination: When this plugin runs, other plugins (core, credo, ex_unit, etc.) skip their precommit checks to avoid duplicate validation.
Customizing
Modify your mix.exs:
defp aliases do
[
precommit: [
"compile --warnings-as-errors",
"deps.unlock --unused",
"format",
"credo --strict",
"test --stale"
]
]
end
Changelog
See CHANGELOG.md for version history.
License
MIT
Hooks 1
Sponsors
Details
- Marketplace
- bradleygolden/claude-marketplace-elixir
- Source
- plugins/precommit
- Category
- Community
- License
- MIT
- Keywords
- elixir, phoenix, precommit, validation, testing
