draft-pr

A command for preparing a pull request, which is a request to review and merge code changes into a shared project.

In plain words
What is it for?
Use it to review commits and file changes, find related GitHub issues and pull requests, and draft the purpose, constraints, exclusions, and expected result.
Why use it?
It gathers the branch history, changed files, related issues, and the reasoning behind the work so the pull request explains more than the code difference alone.

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/notorious-ai/claude-plugins/draft-pr
Clone the repo
git clone --depth 1 https://github.com/notorious-ai/claude-plugins
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 814 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.00814
Opus 5 $0.00004 $0.00407
Sonnet 5 $0.00002 $0.00163
Haiku 4.5 $0.00001 $0.00081

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

Security

Grade A, and why

draft-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.

github-author/commands/draft-pr.md · 97 lines

How it starts

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

Draft Pull Request

Gather git context and draft an effective pull request using the writing-pull-requests skill. Focus on surfacing the why - intent, constraints, and rationale - that the diff cannot convey.

Step 1: Gather Git Context

Collect information about the current branch:

Branch and commits: !git branch --show-current && echo "---" && git log --oneline main..HEAD 2>/dev/null | head -15

Files changed: !git diff main...HEAD --stat 2>/dev/null | tail -15

Check for related issues and PRs:

Open issues: !gh issue list --state open --limit 8 2>/dev/null || echo "Could not fetch issues"

Recent PRs: !gh pr list --state all --limit 5 2>/dev/null || echo "Could not fetch PRs"

Step 3: Surface the Hidden Context

Use probe questions to uncover what the diff cannot show. The writing-pull-requests skill guides what context to capture - focus on:

  • Expected outcome - what the change accomplishes (verifiable against the changeset)
  • Constraints that shaped the solution - technical, organizational, or timeline limitations
  • Designed exclusions - what this change explicitly does not address and why
  • Reevaluation triggers - conditions under which to revisit this decision

Ask clarifying questions:

  • "What constraint prevented the simpler solution?"
  • "What is explicitly out of scope, and why?"
  • "Under what conditions should we revisit this approach?"

Use AskUserQuestion if purpose is unclear:

  • question: "What problem does this PR solve or what value does it add?"
  • header: "Motivation"
  • options:
    • Bug fix (Corrects incorrect behavior)
    • New feature (Adds new capability)
    • Improvement (Enhances existing functionality)
    • Refactoring (Restructures without behavior change)

Check for linked issues:

  • question: "Is there a related issue to link?"
  • header: "Issue link"
  • options:
    • Yes (I'll provide the issue number)
    • No issue exists (The PR description will provide context)
    • Search again (Help me find related issues)

Read the full file on GitHub · 97 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 · 97 lines · 8 tokens per session scan A 134d43817730

Subscribe to this mod's changes

draft-pr is a command published in the GitHub repository notorious-ai/claude-plugins (5 stars, last pushed 7d ago), licensed MIT. It adds 8 tokens to every session and 814 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-31.