<aside> 💡 This page shows how a Claude Code plugin checks every commit and stops broken pull requests reaching GitHub, so you can build the same guardrail for your own workflow.

</aside>

The setup

How to set it up

  1. Write down the errors and bugs that keep showing up in your team's PRs, so you know what the plugin must catch.
  2. Create a Claude Code plugin that bundles the tools and rules needed to check for those problems.
  3. Add a rule that the plugin activates whenever someone commits code.
  4. Make the plugin verify that everything works as intended and as expected, using your tests, linting or build checks.
  5. Stop the pull request from being opened on GitHub until those checks pass.
  6. Install the plugin for everyone on the team, including yourself, so the checks are the same for every commit.
  7. Review the next batch of PRs to see whether fewer errors and bugs reach review.

<aside> ⚠️ Watch out: the plugin only helps if it runs on every commit for everyone on the team, so install it for the whole team rather than leaving it as a personal tool.

</aside>

Prompt to build your own

You are helping me build a Claude Code plugin that acts as a guardrail for my team's pull requests.
Goal: whenever anyone on the team commits code, the plugin activates, verifies that everything works as intended and as expected, and only then lets the pull request go to GitHub.
My setup:
- Language and framework: <your language and framework>
- How we run tests: <your test command>
- Other checks we use: <linting, type checking, build command>
- Common problems in our PRs: <the errors and bugs we keep seeing>
Constraints:
- The plugin must load automatically in every Claude Code session.
- It must run on every commit, for every team member, with no manual step.
- The pull request must not be created until all checks pass.
- If a check fails, show a short, plain-English explanation of what failed and how to fix it.
- Keep it simple and use only the tools I have listed.
Return:
1. The plugin's file structure and the contents of each file.
2. The rules and checks it applies, matched to my common problems.
3. Step-by-step instructions to install it for my whole team.
4. A short way to test that it blocks a deliberately broken commit.