Use when opening a PR, submitting for review, pushing a branch, or creating a pull request. Pushes and creates GitHub PRs with auto-assignment and description.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Create Pr?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tartinerlabs-create-pr)
---
name: create-pr
description: Use when opening a PR, submitting for review, pushing a branch, or creating a pull request. Pushes and creates GitHub PRs with auto-assignment and description.
license: MIT
allowed-tools: Read Skill Bash(git status *) Bash(git diff *) Bash(git log *) Bash(git remote get-url *) Bash(git branch --show-current) Bash(git rev-parse *) Bash(git symbolic-ref *) Bash(git push -u origin *) Bash(gh pr list *) Bash(gh pr view *) Bash(gh pr create *) Bash(gh pr edit *) Bash(gh stack *) Bash(gh extension list *) Bash(gh api user *) Bash(glab mr list *) Bash(glab mr view *) Bash(glab mr create *) Bash(glab api user *)
model: haiku
effort: medium
compatibility: Requires git and a GitHub (gh) or GitLab (glab) remote
metadata:
short-description: Push a branch and open a pull request.
title: Open a pull request
goal: ship-code-safely
audience: developers, team-leads
---
You push branches and create pull/merge requests.
## Rules Overview
| Rule | Impact | File |
|------|--------|------|
| PR title | HIGH | [rules/pr-title.md](rules/pr-title.md) |
| Migration drift | HIGH | [rules/migration-drift.md](rules/migration-drift.md) |
| PR description | MEDIUM | [rules/pr-description.md](rules/pr-description.md) |
## Workflow
1. Check `git status` and the current branch, and determine the base: the one the user names (e.g. a release branch for a hotfix), otherwise the default branch
2. **Get off the base branch before anything else.** A PR needs a head branch that differs from its base, so never push the base branch or open a PR from it. If the current branch is the base, create a branch now with the `create-branch` skill — in Claude Code invoke it through the Skill tool as `workflow:create-branch`; on hosts without skills, follow its branch-naming and prefix-detection rules directly (a prefixed kebab-case name such as `feature/order-search`). Derive the name from the changes or commits. Then:
- Uncommitted changes carry over to the new branch on checkout
- Commits already on the local base branch (ahead of `origin/<base>`) are on the new branch too, since it starts at the same HEAD. Tell the user their local base is still ahead of the remote; do not reset or rewrite it
3. If there are uncommitted changes, commit them via the `commit` skill (`workflow:commit` in Claude Code) — never with a raw `git commit` here. Ask first only if some changes look unrelated to the rest
4. Run the migration drift pre-flight per [rules/migration-drift.md](rules/migration-drift.md). If a schema changed without a migration, stop and ask before pushing
5. Push the current branch to remote (with `-u` flag if needed)
6. Analyse recent commits to generate PR title and description
7. Detect the forge from the remote (`git remote get-url origin`) and create the PR/MR with its CLI, following **only** the matching guide: [references/github.md](references/github.md) for a `github.com` remote (the default), [references/gitlab.md](references/gitlab.md) for GitLab. Target the base from step 1 and assign the PR/MR to the current user. The body is concise bullet points only (no `## Summary`, `## Test Plan`, checklists, or other heading sections)
If assignment fails (user not a collaborator/member), the PR/MR is still created without assignment.