Precommit#
Pre-commit hook tool that automatically runs pre-commit checks after file saves.
This tool automatically runs pre-commit checks in two scenarios:
Per-file checks (FILE_SAVE_POST (file.save.post)): After each file is saved
Runs pre-commit on the specific saved file
Provides immediate feedback on formatting/linting issues
Full checks (TURN_POST (turn.post)): After message processing completes
Runs pre-commit on all modified files
Ensures all changes pass checks before auto-commit
Commands:
/pre-commit: Manually run pre-commit checks
Pre-commit checks include:
Code formatting (black, prettier, etc.)
Linting (ruff, eslint, etc.)
Type checking (mypy, etc.)
Other configured hooks
The tool will report any failures and suggest fixes.
Enable with: –tools precommit Or configure pre-commit checks via: GPTME_CHECK=true