create-pr
/create-pr
Use when the user asks to create, open, or submit a GitHub pull request, says "make a PR", "open a PR", or wants to commit, push, and turn the current branch into a PR. For mobile/CommCare repos with JIRA-prefixed tickets and RELEASES.md QA notes, prefer create-mobile-pr instead.
- Author
- dimagi ↗
- Repository
- dimagi-claude-workflows ↗
- Licence
- MIT
- Last repository change
- 06.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 06.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when the user asks to create, open, or submit a GitHub pull request, says "make a PR", "open a PR", or wants to commit, push, and turn the current branch into a PR. For mobile/CommCare repos with JIRA-prefixed tickets and RELEASES.md QA notes, prefer create-mobile-pr instead.
Triggers from the description
Original author description
Use when the user asks to create, open, or submit a GitHub pull request, says "make a PR", "open a PR", or wants to commit, push, and turn the current branch into a PR. For mobile/CommCare repos with JIRA-prefixed tickets and RELEASES.md QA notes, prefer create-mobile-pr instead.
How it works
- Context
- Task
- Committing changes
- PR description content
SKILL.md preview
---
name: create-pr
description: Use when the user asks to create, open, or submit a GitHub pull request, says "make a PR", "open a PR", or wants to commit, push, and turn the current branch into a PR. For mobile/CommCare repos with JIRA-prefixed tickets and RELEASES.md QA notes, prefer create-mobile-pr instead.
allowed-tools: Bash(git checkout:*), Bash(git switch:*), Bash(git add:*), Bash(git status:*), Bash(git diff:*), Bash(git push:*), Bash(git commit:*), Bash(gh pr create:*), Bash(gh pr edit:*), Bash(gh api:*)
---
# Create Pull Request
## Context
- Current branch: !`git branch --show-current`
- `git status`:
```!
git status
```
- `git diff HEAD`:
```!
git diff HEAD
```
- PR template (GitHub recognizes both casings in `.github/`, repo root, or `docs/`):
```!
for f in \
.github/PULL_REQUEST_TEMPLATE.md .github/pull_request_template.md \
PULL_REQUEST_TEMPLATE.md pull_request_template.md \
docs/PULL_REQUEST_TEMPLATE.md docs/pull_request_template.md; do
if [ -f "$f" ]; then echo "=== $f ==="; cat "$f"; exit 0; fi
done
echo "(no PR template found)"
```
## Task
Based on the changes above:
1. If on `main`/`master`, create a new branch first (short, kebab-case, derived from the change).
2. Commit the changes as a series of logical commits (see "Committing changes" below), not one catch-all commit.
3. Push the branch (`git push -u origin HEAD` if it has no upstream).
4. Write the PR description following the "PR description content" guidance below.
5. Create the PR as a draft with `gh pr create --draft`, passing the description via a heredoc. If editing the PR later and `gh pr edit` fails with a GraphQL error, fall back to `gh api -X PATCH repos/:owner/:repo/pulls/<n>` rather than retrying GraphQL.
6. Output the PR URL.
## Committing changes
Split the work into logical commits — each commit should be one coherent, self-explanatory unit of work. A reviewer reading the commit list should see the shape of the change: a refactor sits apart from the feature it enables, an unrelated bug fix apart from both, config or dependency bumps apart from code. This makes each commit reviewable (and revertable) on its own, and it's why `git log` exists as a narrative rather than a single "misc changes" blob.
To keep unrelated work apart, stage deliberately — `git add <specific files>`, or `git add -p` when one file holds changes belonging to different commits — rather than `git add -A`. Commit each group as you go.
Use judgment about granularity: don't shatter a single atomic change into artificial pieces. If the branch genuinely is one focused change, one commit is correct. Keep messages minimal (see the global commit-style guidance) — a concise subject line, and a body only when the *why* isn't obvious.
## PR description content
The diff is the primary source of truth. Your job in the description is to give the reviewer what the diff *can't* show, and nothing else. Reviewers are busy — a tight description is read, a long one is skimmed. Aim for a few sentences to a short paragraph for most PRs; reach for more length only when the change genuinely needs it.
### Include only what's load-bearing
- **Why the change exists** — the bug, motivation, goal, ticket link, or surrounding context. This is almost always worth a sentence.
- **Where to focus review attention** — risky areas, subtle decisions, places the diff doesn't make obvious on its own.
- **Choices that aren't visible in the diff** — tradeoffs made, alternatives considered and rejected, constraints from other systems.
- **Out-of-band info** — deploy ordering, dependencies on other PRs, follow-up work explicitly left out of scope, feature-flag state.
- **How to verify** — only when it isn't obvious from the change itself.
### Cut everything else
- Don't recap what the diff already shows or restate commit messages in prose — the reviewer can read both.
- Don't walk through the change file-by-file.
- Don't open with framing like "This PR introduces..." / "This PR refactors..." — say the thing directly, or skip the meta-sentence.
- Don't write generic test plans ("tests pass", "added unit tests"). Either describe what was actually tested in a way that helps a reviewer trust the change, or omit.
- Don't pad with hype words ("comprehensive", "robust", "elegant") or invent bullet points to round out a list.
- Don't leave the template's HTML comment placeholders in the final body, and don't write boilerplate just to occupy a section.
### Handling PR templates
When a template exists, treat each section as a *prompt* — "is there something load-bearing for this category?" — not a blank that must be filled.
- If yes → write the shortest version that conveys it.
- If no → omit the section entirely, or replace it with one short line (e.g. "N/A — pure refactor, no behavior change"). Don't invent content to fill it.
The point of the template is to remind you of categories the reviewer might care about, not to enforce a fixed shape.
### Example
For a PR that adds a retry around a flaky external API call:
> Bad (padded, recaps the diff):
> ```
> ## Summary
> This PR introduces a comprehensive retry mechanism for our external API calls. It robustly handles transient failures by wrapping the call in a retry loop.
>
> ## Changes
> - Added `retry_with_backoff` helper in `utils/retry.py`
> - Updated `client.py` to use the new helper
> - Added unit tests
>
> ## Test plan
> - [x] Tests pass
> ```
>
> Good (load-bearing only):
> ```
> Vendor's `/sync` endpoint started returning 502s a few times a day (see incident #482). Wrapping the call in 3 retries with exponential backoff; surfacing the final failure unchanged so existing alerting still fires.
>
> Worth a closer look: the backoff sleeps inside the request handler, so worst-case latency on a fully failed call is now ~7s. Acceptable for this path but flagging it.
> ```
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · dimagi/dimagi-claude-workflows | 100 | MIT |
| wanteddev/montage-web | 100 | MIT |
| niekcandaele/claude-helpers | 100 | MIT |
| yonatangross/orchestkit | 100 | MIT |
| microsoft/aspire | 100 | MIT |
| rolemodel/skills | 100 | MIT |
| moeru-ai/airi | 100 | MIT |
| sakuro/dotfiles | 100 | MIT |
| fcakyon/claude-codex-settings | 100 | Apache-2.0 |
Database snapshot: 13.11.2026 · package version d0b948b29eae (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100create-mobile-pr
Use when creating, opening, or submitting a pull request in a Dimagi mobile/CommCare repo — identified by JIRA-prefixed branches (e.g. CCCT-1929-...), a `RELEASES.md` with `### Release Notes` and `### QA Notes` sections, and the dimagi PR template (Safety story / Product… - 100pr
Use when the user runs /pr to commit the current work, push the branch, and open or update its pull request. - 90submit-pr-from-current-changes
Create a branch, commit existing local changes, push them, and open a pull request. Use when submitting current work as a PR. - 100commit-push-pr
Use when asked to commit and push a feature branch, with or without a pull request. Its no-PR mode publishes without a PR. Not for a PR body alone: use create-pull-request. - 100create-github-pr
Create GitHub pull requests using the gh CLI. Use when the user wants to create a new PR, submit code for review, or open a pull request. Trigger keywords - create PR, pull request, new PR, submit for review, code review. - 90commit-push-current
Use when a human asks to commit and push, not publish, the checked-out branch, including directly to the default branch, with no branch creation and no pull request. Not for a feature branch off the default: use commit-push-pr in its no-PR mode.