pr

Instructions for generating a pull-request description from the changes on the current Git branch. A pull request is a proposed code change submitted for review before merging.

In plain words
What is it for?
Inspecting commits and differences from the base branch, grouping changes by type, and producing a structured pull-request summary.
Why use it?
They help summarize what changed, why it changed, and what kind of change it is without manually reconstructing the branch history and diff.

Command

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.

agentmods
npx agentmods add commands/thedecipherist/claude-code-mastery/pr
Clone the repo
git clone --depth 1 https://github.com/TheDecipherist/claude-code-mastery
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 631 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00008 $0.00631
Opus 5 $0.00004 $0.00316
Sonnet 5 $0.00002 $0.00126
Haiku 4.5 $0.00001 $0.00063

Measured 2d ago against content hash 381002bcbed4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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.

commands/pr.md · 118 lines

How it starts

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

Generate PR Description

Create a comprehensive pull request description based on the branch diff.

Process

1. Gather Context

# Get current branch name
git branch --show-current

# Find base branch (usually main or master)
git remote show origin | grep 'HEAD branch'

# Get all commits on this branch
git log main..HEAD --oneline

# Get the full diff
git diff main...HEAD --stat
git diff main...HEAD

2. Analyze Changes

Categorize the changes:

  • Features: New functionality
  • Fixes: Bug fixes
  • Refactors: Code improvements without behavior change
  • Docs: Documentation updates
  • Tests: Test additions/changes
  • Chores: Dependencies, configs, tooling

3. Generate PR Description

Use this format:

## Summary

[2-3 sentences describing what this PR does and why]

## Changes

- [Bullet point for each logical change]
- [Group related file changes together]
- [Focus on what changed, not how]

## Type of Change

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that causes existing functionality to change)
- [ ] Refactor (no functional changes)
- [ ] Documentation update

## Testing

[How was this tested? What should reviewers verify?]

- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed

## Screenshots (if applicable)

[Add screenshots for UI changes]

## Checklist

- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review
- [ ] I have added tests that prove my fix/feature works
- [ ] New and existing unit tests pass locally
- [ ] Any dependent changes have been merged

---

Generated with Claude Code

4. Determine Title

PR title format: type(scope): description

Examples:

  • feat(auth): add OAuth2 login support
  • fix(api): handle null response from payment service
  • refactor(db): extract query builder into separate module

5. Output

Read the full file on GitHub · 118 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. 2d ago First seen · 118 lines · 8 tokens per session scan A 381002bcbed4

Subscribe to this mod's changes

pr is a command published in the GitHub repository TheDecipherist/claude-code-mastery (545 stars, last pushed 3mo ago), licensed MIT. It adds 8 tokens to every session and 631 once invoked, about $0.0000 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-30.

Related

Other commands, from other repositories