single-commit-pr

single-commit-pr is a cursor rule for Cursor from RashadAnsari/myagents. It costs 254 tokens per session, scanned A, original, MIT.

A Git rule requiring every pull request to contain exactly one commit. Git is the version-control system that records code changes, and a pull request is a proposed change for review.

In plain words
What is it for?
Use it when creating or updating pull requests that must be squashed, amended, rebased, and force-pushed safely.
Why use it?
It keeps a pull request's history compact by combining the branch's changes before review and folding later fixes into the same commit.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when creating or updating pull requests that must be squashed, amended, rebased, and force-pushed safely.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/rashadansari/myagents/single-commit-pr
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/RashadAnsari/myagents

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 single-commit-pr

README.md
[![agentmods](https://agentmods.dev/badge/rules/rashadansari/myagents/single-commit-pr/github.svg)](https://agentmods.dev/rules/rashadansari/myagents/single-commit-pr)
Your own site
<a href="https://agentmods.dev/rules/rashadansari/myagents/single-commit-pr"><img src="https://agentmods.dev/badge/rules/rashadansari/myagents/single-commit-pr/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 single-commit-pr

Your own site · 80×15
<a href="https://agentmods.dev/rules/rashadansari/myagents/single-commit-pr"><img src="https://agentmods.dev/badge/rules/rashadansari/myagents/single-commit-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 254 This file is loaded in full into every session.
When invoked 254 The same file — it is already loaded in full.
Security scan A 0 findings. 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.00254 $0.00254
Opus 5.5 $0.00102 $0.00102
Sonnet 5.5 $0.00051 $0.00051
Haiku 4.5 $0.00025 $0.00025

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

Security

Grade A, and why

single-commit-pr scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/albino/rules/single-commit-pr.mdc · 15 lines

What it actually says

Single-commit pull requests

Every pull request you open has exactly one commit on top of its base branch.

  • Before opening a pull request, squash every commit on the branch into one, with a message that describes the whole change: git fetch origin <base>, git reset --soft "$(git merge-base HEAD origin/<base>)", then git commit.
  • After the pull request is open, fold each follow-up change (review fixes, CI fixes) into that commit with git commit --amend, then push with git push --force-with-lease.
  • To bring in the base branch, rebase onto it (git rebase origin/<base>) instead of merging it, so no merge commit is added.
  • Rewrite only branches you created for the pull request. Never force-push the base branch or a branch someone else has pushed to. On those, add a normal commit and tell the user why the pull request has more than one.
  • This rule takes precedence over any instruction to add follow-up commits or merge the base branch into a pull request branch you created.
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. 2d ago First seen · 15 lines · 254 tokens per session scan A 1aee0acf29e1

Subscribe to this mod's changes

single-commit-pr is a cursor rule published in the GitHub repository RashadAnsari/myagents (6 stars, last pushed 3d ago), licensed MIT. It adds 254 tokens to every session, about $0.0010 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-21.