Auto-format Python files with ruff after Claude Code edits them.
This PostToolUse hook runs uvx ruff format on any Python file after it's written or edited.
/plugin install python-formatuvmust be installed and available in PATH- No other configuration needed - ruff is run via uvx
After any Write or Edit operation on a .py file:
- Runs
uvx ruff format <file> - Reports success or any formatting warnings
- Always allows the operation to proceed (non-blocking)