Skip to main content
skill CX Codex

make-pr — Claude Code skill: what it does, how to install

Publishes committed changes and creates or updates a pull request. It fits workflows that need branch checks and a post-operation state check.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add prathamdby/skills --skill make-pr -a claude-code
Open on GitHub

What make-pr does

The skill inspects the current branch, target branch, upstream, status, and any open pull request. It fetches before comparing, reads only git diff <target>...HEAD, records the diff hash, and stops on a dirty tree, detached HEAD, a bad base relationship, or multiple open PRs. An empty diff returns NO_CHANGES.

It then drafts the title and body from the locked diff, pushes the branch, and creates or updates the pull request. Existing draft state, reviewers, labels, assignees, and projects are preserved. A read-back check compares the URL, base/head, title, body, and other fields with the operation ledger. Conventional title handling depends on ../commit/REFERENCE.md; themed views use references/views.md.

This skill does not create commits, force-push, run builds, or run tests. Uncommitted or untracked files block publication, so the work must be committed first.

What it helps with

  • publish committed changes to the remote branch
  • open a pull request against a selected base branch
  • update an existing PR while keeping its draft state
  • verify pull request fields after an API mutation
  • add an authorized Closes #N footer

Example prompts for the agent

  • Publish the committed changes and open a pull request against main.
  • Inspect the diff, update the existing pull request, and keep its draft state.
  • Create the PR with Ticket 42, then verify its URL and body.

How to install make-pr

1Skills CLI (Vercel)

npx skills add prathamdby/skills --skill make-pr -a claude-code

2Manually: put the files in place

~/.claude/skills/make-pr/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/make-pr/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about make-pr

How do I install make-pr in Claude Code?

Run npx skills add prathamdby/skills --skill make-pr -a claude-code, then check ~/.claude/skills/make-pr/SKILL.md.

What does make-pr do?

It runs preflight checks, publishes the current branch, and creates or updates a pull request. It then compares the remote result with its operation ledger.

What is required for a conventional title?

The skill checks for ../commit/REFERENCE.md first, since that file supplies the conventional title and formatting rules.

Source text

SKILL.md · MIT
---
name: make-pr
description: >
  make-pr to publish committed changes and create or update their pull request.
---

# Make PR

## Options

Default: base main, no ticket/issue, imperative sentence-case title, non-draft
creation. "Target <branch>" selects base; "draft PR" selects draft creation.
Updates preserve existing draft state unless the user explicitly requests
conversion. "Ticket <id>" / "prefix [<id>]" supplies only that exact prefix.
"Issue N" / "fixes #N" / "closes #N" authorizes one `Closes #N` per issue.
Issue URLs yield N only from `/issues/N`; pull URLs do not. Bare #N, missing
values, or conflicting options block. Infer no ticket/issue from other context.
"Conventional title" loads formatting and rejection rules in
`../commit/REFERENCE.md`; verify that dependency exists first.

## 1. Preflight

Resolve branch, target, status, upstream, and open PR. Use configured push
remote or origin; fetch before comparison. Block on detached HEAD, target
equal to current branch, missing target, fetch failure, behind/diverged
upstream, dirty/untracked files, several open PRs, or a different existing base.
Ignore closed PRs. Record
`branch/base | remote | diff hash | PR | draft | title/body/depth | mutation | terminal`.
Done when clean branch, fixed base, and create/update are known.

## 2. Draft from the locked diff

Read and hash only `git diff <target>...HEAD`; empty → `NO_CHANGES`.
Default title is imperative sentence case, at most 60 characters, no type or
period. Conventional keeps commit's 50-character limit. An explicit ticket
prefix is exempt from length and ticket rejection, not proof of ticket claims.

For a nonempty diff, apply body, depth, and style rules in `REFERENCE.md`.
Use `references/views.md` only for a theme needing a fenced view.
Trace every title phrase, body line, caption, and visual label to hunks;
only explicitly authorized Closes footers are exempt.
Done when format, depth, exact issue set, and clean-room trace pass.

## 3. Publish

Recheck status and diff hash; movement returns to Preflight. Push missing/ahead
upstream normally, never force; fetch and require upstream equals local HEAD.
Create with explicit base/head and requested draft state, or update copy
while preserving draft, reviewers, labels, assignees, and projects. Only an
explicit draft conversion authorizes changing that state.
Record each successful mutation; on interruption re-preflight instead of
repeating a successful push/create. Register the URL with the host's PR-link
tool when available, including existing PRs when work starts.
Done when a PR URL or captured mutation error exists.

## 4. Read back

Verify URL, base/head, title/body, draft, and preserved fields against the
ledger. A partial API result or non-body mismatch permits one mutation retry
after read-back, then `BLOCKED` with field differences. For an appended body
or footer, apply `references/body-hygiene.md`.
Confirm the three body headings, one-sentence Why, Special bounds, and exact
Closes set. Auth/rate-limit/fetch/push/platform errors block.
Report create/update, push, URL, depth, body strip, and trace only after match.
Done when remote state and ledger agree.

Terminals: `SUCCESS`, `NO_CHANGES`, `BLOCKED`. No commits, force pushes,
reopening closed PRs, builds, or tests in this leaf.

© prathamdby · MIT · prathamdby/skills

Similar skills

All skills for Git and GitHub →

From the same set7

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