create-pr

create-pr is a command for Claude Code from edutrul/drupal-ai. It costs 35 tokens per session (755 once invoked), scanned B, original, MIT.

A command for creating a GitHub Pull Request, which asks others to review changes before they are merged into a shared codebase.

In plain words
What is it for?
Use it to turn the current branch into a Pull Request targeting the develop branch, using recent commits to help prepare the title and description.
Why use it?
It reduces the manual work of finding the Jira ticket, preparing the required title and link, pushing an unpublished branch, and choosing whether the request starts as a draft.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to turn the current branch into a Pull Request targeting the develop branch, using recent commits to help prepare the title and description.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/edutrul/drupal-ai/create-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/edutrul/drupal-ai

Made for: Claude Code.

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 create-pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/edutrul/drupal-ai/create-pr/github.svg)](https://agentmods.dev/commands/edutrul/drupal-ai/create-pr)
Your own site
<a href="https://agentmods.dev/commands/edutrul/drupal-ai/create-pr"><img src="https://agentmods.dev/badge/commands/edutrul/drupal-ai/create-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 create-pr

Your own site · 80×15
<a href="https://agentmods.dev/commands/edutrul/drupal-ai/create-pr"><img src="https://agentmods.dev/badge/commands/edutrul/drupal-ai/create-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 755 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00035 $0.00755
Opus 5.5 $0.00014 $0.00302
Sonnet 5.5 $0.00007 $0.00151
Haiku 4.5 $0.00003 $0.00076

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

Security

Grade B, and why

create-pr scanned grade B 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 1mo 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

allowed-tools: Bash(git branch --show-current:), Bash(git log *:), Bash(git push *:), Bash(gh pr create:), Bash(gh pr view:), Bash(acli jira auth status:), Bash(acli jira workitem view:), Bash(acli jira workitem transiti
.claude/commands/create-pr.md · 146 lines

How it starts

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

Create PR

Create a Pull Request from the current branch targeting develop, following project conventions.

Input

No arguments required. Operates on the current branch.


Workflow

1. Get current branch

git branch --show-current

Detect the Jira ticket from the branch name (e.g. PRJ-356-lucidworks-indexing-endpoints → PRJ-356).

If no ticket detected → ask the user for the ticket ID before continuing.


2. Get recent commits for context

git log origin/develop..HEAD --oneline

Use commit messages to understand the scope of the PR.


3. Push branch if needed

Check if the branch has a remote tracking branch. If not:

git push -u origin <branch>

4. Single ask — PR details

Display detected info and ask once:

Branch: Jira ticket:

PR title: (pre-filled as PRJ-XXX: <description inferred from commits>) PR description: (leave blank to auto-generate from commits, or type your own) Create as draft? (Y/n)

  • If user accepts the pre-filled title → use it
  • If user edits → use their version
  • Default is draft (Y)

5. Create the PR

gh pr create \
  --base develop \
  --title "<title>" \
  --body "<body>" \
  --draft

PR body template:

## Summary

<bullet points from commit messages>

## Jira

<ticket-url>

## Test plan

- [ ]

If user chose not to draft → omit --draft.


6. Jira auth check

acli jira auth status

If fails → skip Jira steps silently, list as manual action in summary.


7. Move Jira ticket to In Progress (if not already)

acli jira workitem view <ticket>

If current status is not In Progress → transition it:

acli jira workitem transition --key <ticket> --status "In Progress"

If already In Progress → skip silently.


8. Final summary

Action Result
Branch pushed ✓ / already up to date
PR created # —
Draft yes / no
Jira ticket
Jira status In Progress / skipped (reason)

Read the full file on GitHub · 146 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. 1mo ago First seen · 146 lines · 35 tokens per session scan B 94065d121a38

Subscribe to this mod's changes

create-pr is a command published in the GitHub repository edutrul/drupal-ai (72 stars, last pushed 4mo ago), licensed MIT. It adds 35 tokens to every session and 755 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.