Skip to main content
command

create-pr — Claude Code command: what it does, how to install

This command creates a branch, formats changed files, organizes commits, and opens a pull request. Use it to finish a Git workflow from Claude Code.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --command git-workflow/create-pr
Open on GitHub

What create-pr does

create-pr starts from the current changes, creates a new branch, and formats modified files with Biome. It then reviews the diff and can separate the work into logical commits, keeping related files together and giving each commit a descriptive message.

The command pushes the branch to the remote repository and opens a pull request with a change summary and test plan. Review the commit split before submitting: refactoring is kept apart from feature work, while unrelated changes are placed in separate commits.

What it helps with

  • create a branch from the current changes
  • format modified files with Biome
  • split unrelated work into separate commits
  • write descriptive commit messages
  • push a branch and open a pull request with a test plan

Example prompts for the agent

  • Run /create-pr for the current changes and prepare a pull request.
  • Format the files with Biome, split the work into logical commits, and run /create-pr.
  • Create the branch, push it to the remote repository, and open a pull request with /create-pr.

How to install create-pr

1claude-code-templates

npx claude-code-templates@latest --command git-workflow/create-pr

2Manually: put the files in place

.claude/commands/create-pr.md

Call it with /create-pr. For all projects use ~/.claude/commands/

Questions about create-pr

How do I install create-pr in Claude Code?

Run npx claude-code-templates@latest --command git-workflow/create-pr, then add the file .claude/commands/create-pr.md.

What does the create-pr command do?

It creates a branch, formats changed files with Biome, organizes the work into commits, pushes the branch to the remote repository, and opens a pull request with a summary and test plan.

How does create-pr split the commits?

It keeps related file changes together and separates features, components, refactoring, and unrelated work into independent commits. Each commit receives a descriptive message.

Source text

create-pr.md · MIT
---
description: "Create a new branch, commit changes, and submit a pull request."
---

# Create Pull Request Command

Create a new branch, commit changes, and submit a pull request.

## Behavior
- Creates a new branch based on current changes
- Formats modified files using Biome
- Analyzes changes and automatically splits into logical commits when appropriate
- Each commit focuses on a single logical change or feature
- Creates descriptive commit messages for each logical unit
- Pushes branch to remote
- Creates pull request with proper summary and test plan

## Guidelines for Automatic Commit Splitting
- Split commits by feature, component, or concern
- Keep related file changes together in the same commit
- Separate refactoring from feature additions
- Ensure each commit can be understood independently
- Multiple unrelated changes should be split into separate commits

© davila7 · MIT · davila7/claude-code-templates

Similar slash commands

All slash commands for Git and GitHub →

From the same set224

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor