merge-gate (yash-gadodia)

Reviewed at commit d1db6fe

Checks merge permission for recognized Bash merge commands and selected pushes from feature branches to trunk.

Made by
Yash Gadodia
What we checked

Blocks Bash commands that merge (gh pr merge, git merge on main or master, a push of a feature branch onto main) unless your latest message contains the word merge; ship, push and deploy do not count. It reads your prompts to check this, runs a few read-only git commands, and stores only whether it is switched on. /merge-gate turns it on or off.

Review details

Static review of the source at the pinned commit; not run. Registers session.start (registers /merge-gate, reads the on/off flag from $.store), command.run for merge-gate (on, off, status), prompt.submit (remembers the latest human message, and standing grants such as 'merge x3' or 'merge after each'), and tool.call on Bash, which denies a matching merge command with a message unless the remembered message says merge and does not negate it. Runtime calls: $.process.run for git rev-parse --abbrev-ref HEAD and git remote get-url origin (read-only), $.session.messages to recover the last user message after a resume, $.store.get/set for the enabled flag, $.env.get for CLAUDE_MODS_DISABLE, $.ui.log. If the check itself throws before reaching the tool, the call is denied (fail closed) until you use /merge-gate off or CLAUDE_MODS_DISABLE. Detection is regex based, so merges hidden in quoted or indirect commands may be missed.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: no
  • Runs programs on your machine: yes
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: no
Hooked events
Screenshot of merge-gate (yash-gadodia)

Denies a Bash merge (gh pr merge, git merge on main, push onto main) unless the latest human message says the word merge; ship, push and deploy do not count.

Made this mod? Add a badge to your README

modsforClaude badge for merge-gate (yash-gadodia)

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/merge-gate-yash-gadodia.svg)](https://modsforclaude.com/mods/merge-gate-yash-gadodia/)

← All mods