Pre-Commit Guard
Hook that runs tests before git commit commands to block commits when the suite is red.
This loop is republished with attribution. Full credit and the original content belong to the source linked above.
AI Skill Market Insights
Real data. Real impact.
Emerging
Developers
Kickoff Prompt
Copy this prompt and run it with your agent to start the loop.
Install and run the "Pre-Commit Guard" loop.
Goal: block git commits when tests are failing.
Between iterations run: npm test
Exit when: tests exit 0 before each commit.
Step 1: Before any git commit, run tests. Fix failures before committing.