An agent “simplified” a VAT sum in a demo till: a R100 item came out at R1,600, two tests failed, and nothing in Claude Code stopped it pushing anyway. So I had Claude write a small mod for it: push-guard . About 80 lines. Before Claude runs git push , it runs npm test . If a test fails, the push is blocked and Claude is told which tests failed. Projects with no npm tests are let through, so it doesn’t break pushes on other repos. The last result shows above the prompt in red or green. Install: claude plugin install push-guard --marketplace seanjohnson-dev/push-guard Team tip: add it to the project’s .claude/settings.json ( extraKnownMarketplaces + enabledPlugins ), and teammates get it when they trust the project folder. No one has to remember to install it. Things I learned publishing it:
- The marketplace file is 5 lines. - claude plugin validate --profile directory runs the plugin directory’s first checks: it wants a README and a licence. - claude plugin tag --push checks the versions agree, then makes and pushes the release tag. Mods aren’t sandboxed: they run with your access. Read the code before you install it (it’s short): https://github.com/seanjohnson-dev/push-guard I also made a short video series on building and publishing it (presented by my AI avatar, AI voice): https://www.youtube.com/playlist?list=PLJp6Yy9RWr0w Free and MIT. Feedback welcome. submitted by /u/Its_about-tech
Originally posted by u/Its_about-tech on r/ClaudeCode
