git-pr-rules

git-pr-rules is a skill for Claude Code, Codex from avizmarlon/agent-skills. It costs 77 tokens per session (1,607 once invoked), scanned A, original, MIT.

A Git workflow rule requiring work to reach the main code branch through a pull request. A pull request is a reviewable proposal to merge changes, usually on a service such as GitHub or GitLab.

In plain words
What is it for?
Use it before Git feature or bug work, when checking open pull requests, and when handling merges, pushes, branch protection, or squash merging.
Why use it?
It prevents direct local merges into the main branch and keeps review, automated checks, decisions, and later reversals recorded.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before Git feature or bug work, when checking open pull…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/avizmarlon/agent-skills/git-pr-rules
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.

Any agent
npx skills add avizmarlon/agent-skills --skill git-pr-rules
Clone the repo
git clone --depth 1 https://github.com/avizmarlon/agent-skills

Made for: Claude Code, Codex.

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 git-pr-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/avizmarlon/agent-skills/git-pr-rules.svg)](https://agentmods.dev/skills/avizmarlon/agent-skills/git-pr-rules)
Your own site
<a href="https://agentmods.dev/skills/avizmarlon/agent-skills/git-pr-rules"><img src="https://agentmods.dev/badge/skills/avizmarlon/agent-skills/git-pr-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,607 The whole file, excluding the scripts and references it only reads on demand.
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.00077 $0.01607
Opus 5 $0.00039 $0.00804
Sonnet 5 $0.00015 $0.00321
Haiku 4.5 $0.00008 $0.00161

Measured 6d ago against content hash f12696eb9eaa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

git-pr-rules 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 6d 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.

skills/git-pr-rules/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pull Requests Always — Never Merge Locally into Main — HARD BLOCK

Principle: All work targeting main (or production-equivalent branch) must go through Pull Request on GitHub/GitLab/Gitea/etc. — never git merge locally followed by git push origin main. No exceptions across any Git-based project using collaborative workflows.

Why

  1. Permanent paper trail. PRs remain indexed and shareable forever — a link for documentation, retrospectives, and future debugging ("when did this change land? what was the context?"). git log alone cannot answer "what was tried, rejected, or decided?"

  2. Squash-merge consolidates. PR allows squashing 5–10 local commits into 1 clean commit per feature. Main remains auditable (1 line per logical change, not 50 noisy commits).

  3. Revert is trivial. GitHub's "Revert" button creates a reverse PR; manual git revert <sha> is error-prone in squashed histories and causes merge conflicts.

  4. CI/CD gates. Pipelines configured to run on PR catch regressions that local pre-commit hooks miss (E2E tests, security scans, integration tests, etc.).

  5. Branch protection enforcement. Production branches should be protected; direct push is blocked anyway. PR is the only path.

  6. Discoverability. PR list shows what's in flight to other team members and future sessions — git log local context does not.

Mandatory Workflow

1. Work on feature/fix/* branch (never directly on main)
2. Make local commits with clear messages (Conventional Commits preferred)
3. git push -u origin <branch>
4. gh pr create --title "..." --body "..."  (or web UI if preferred)
5. Wait for CI to pass (if configured)
6. Merge via UI (squash-merge for features, merge-commit for complex hotfixes)
7. Branch auto-deleted post-merge

AI responsibility: Execute gh pr create programmatically — do not ask the human to open UI. Return the PR URL for visibility.

Prohibited Anti-patterns — HARD BLOCK

  • git checkout main && git merge feature/x && git pushforbidden, even as solo maintainer
  • "It's just a typo, merging straight to main" → forbidden — open branch + PR (squash-merge resolves in 30 seconds)
  • "Branch protection is not enabled on this repo" → irrelevant — this is a process rule, not an enforcement-dependent rule
  • Push the branch and "open PR later" → there is no later — PR is opened in the same session
  • AI merging locally "to save the human time" → humans explicitly prefer the +30-second PR cost for permanent audit trail. Do not optimize against their stated trade-off.

Read the full file on GitHub · 108 lines

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. 6d ago First seen · 108 lines · 77 tokens per session scan A f12696eb9eaa

Subscribe to this mod's changes

git-pr-rules is a skill published in the GitHub repository avizmarlon/agent-skills (2 stars, last pushed 2mo ago), licensed MIT. It adds 77 tokens to every session and 1,607 once invoked, about $0.0004 per session on Opus 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-08-31.

Related

Other skills, from other repositories

deployment-patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

affaan-m/ECC · 41 tokens

contextual-commit

Write contextual commits that capture intent, decisions, and constraints alongside code changes. Use when committing code, finishing a task, or when the user asks to commit. Extends Conventional Commits with structured action lines in the commit body that preserve WHY code was written, not just WHAT changed.

yamadashy/repomix · 62 tokens

fanout

Run independent subtasks in parallel — one git worktree and one implementation sub-agent per task, each opening its own PR — then cross-review every PR. polly never merges; the human does.

omnigent-ai/omnigent · 43 tokens

changelog

Turn a range of commits or merged PRs into a changelog entry grouped by change type. Use when the user asks for release notes, a changelog, or "what changed" between two points.

omnigent-ai/omnigent · 44 tokens

taiyi-integration

A project workflow skill for closing a TaiyiForge change and recording it in a CHANGELOG.md file. It checks review results, tests, and the state of the working tree before archiving the change.

Dong90/oh-my-taiyiforge · 27 tokens

openclaw-github-dedupe

Investigate a cluster of GitHub issues and PRs, determine canonical candidates, post duplicate/related status, preserve contributor credit, and execute cleanup actions. Supports autonomous mode for provided-link-only closeout, merge/fix follow-through, changelog, and post-merge issue/PR cleanup.

vincentkoc/dotskills · 68 tokens