50-pr-and-git

50-pr-and-git is a cursor rule for Cursor from Jott2121/agent-gate. It costs 20 tokens per session (336 once invoked), scanned A, original, MIT.

A set of Git and pull-request rules for branch names, commit titles, PR contents, command safeguards, and human-controlled merging. Git is the system used to track code history and collaborate on changes.

In plain words
What is it for?
Use it when creating branches, commits, pull requests, releases, or shell commands that affect Git history and repository workflows.
Why use it?
It reduces accidental history rewrites, force-pushes, releases, publishing, and incomplete review records. It also makes verification and known risks visible to reviewers.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when creating branches, commits, pull requests, releases, or shell commands that affect Git history and repository workflows.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/jott2121/agent-gate/50-pr-and-git
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Jott2121/agent-gate

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 50-pr-and-git

README.md
[![agentmods](https://agentmods.dev/badge/rules/jott2121/agent-gate/50-pr-and-git/github.svg)](https://agentmods.dev/rules/jott2121/agent-gate/50-pr-and-git)
Your own site
<a href="https://agentmods.dev/rules/jott2121/agent-gate/50-pr-and-git"><img src="https://agentmods.dev/badge/rules/jott2121/agent-gate/50-pr-and-git/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 50-pr-and-git

Your own site · 80×15
<a href="https://agentmods.dev/rules/jott2121/agent-gate/50-pr-and-git"><img src="https://agentmods.dev/badge/rules/jott2121/agent-gate/50-pr-and-git.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 336 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00336
Opus 5.5 $0.00008 $0.00134
Sonnet 5.5 $0.00004 $0.00067
Haiku 4.5 $0.00002 $0.00034

Measured 4d ago against content hash 08770c3bc859, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

50-pr-and-git scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- The hook matcher includes `git pull` and `rebase`, so `git pull --rebase` reaches `.cursor/hooks/guard-shell.sh` and is denied. A plain `git pull` is allowed. Force-push is denied when `--force` or `-f` appears anywher
.cursor/rules/50-pr-and-git.mdc · 14 lines

What it actually says

PRs and git

  • Branch per task: agent/<short-task>. Small PRs, one intent, < ~400 changed lines when possible.
  • Conventional titles: feat|fix|test|docs|refactor|chore|perf(scope): summary.
  • PR body sections (required): What · Why · How verified (exact commands + trimmed output) · Numbers changed (before → after + command) · Risks · Not done / follow-ups · Plan link (.cursor/plans/...) · Agent run link if any.
  • Attach artifacts for anything visual or behavioral (screenshot, short video, eval table).
  • Never force-push shared branches, rewrite history, tag, or publish. A human merges.
  • The hook matcher includes git pull and rebase, so git pull --rebase reaches .cursor/hooks/guard-shell.sh and is denied. A plain git pull is allowed. Force-push is denied when --force or -f appears anywhere on git push, including after the remote. git reset is denied when --hard appears anywhere, including after the ref. wget piped to bash is denied the same way as curl piped to bash. A missing, blank, or non-string command is denied; invalid JSON exits non-zero.
  • Address every Bugbot / Security Review finding: fix it or reply with a reason. Don't silently resolve.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 14 lines · 20 tokens per session scan A 08770c3bc859

Subscribe to this mod's changes

50-pr-and-git is a cursor rule published in the GitHub repository Jott2121/agent-gate (3 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 336 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-12.