<aside> 💡 This page gives you the plugin setup that checks every commit and keeps broken pull requests off GitHub, so reviewers read working code first.

</aside>

The setup

The prompt at the end of this page builds this setup.

How to set it up

  1. Decide what "works as intended" means for your project, such as the tests passing, the build succeeding and the linter running clean.
  2. Create a Claude Code plugin and put those checks and rules in it as its tools and instructions.
  3. Make the plugin run on every commit, so that it wakes up when anyone commits and nobody has to remember to run it.
  4. Have it run the checks and report what failed, so the author fixes it before anyone else sees it.
  5. Stop the pull request from being opened on GitHub until every check passes.
  6. Share the plugin with your team so Claude loads it in every session on every machine.
  7. Keep your normal code review, so reviewers read working code instead of catching mistakes the author should have caught.

<aside> ⚠️ Watch out: do not add a new process for people to follow. The plugin should run on its own at commit time, because a check someone has to remember to run will get skipped.

</aside>

Prompt to build your own

You are helping me build a Claude Code plugin that stops broken pull requests reaching GitHub.
My project: <language and framework>
My repository host: GitHub
My team size: <number of developers>
What "works as intended" means for us: <for example tests pass, build succeeds, linter is clean>
Build a plugin that Claude loads whenever a session is active. When anyone commits, the plugin must run the checks above automatically, so nobody has to remember. The pull request must only be opened on GitHub once every check passes. If a check fails, show the author which one and why, so they can fix it first.
Constraints:
- No new process for the team to follow; it runs on its own at commit time.
- Reviewers still review the pull request as normal.
- Use only tools I already have: <list, e.g. Claude Code, git, GitHub CLI>.
Return: the plugin's file layout, the full contents of each file, the steps to install it for the whole team, and one test I can run to prove a failing commit is blocked from reaching GitHub.