Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

pr-create

FreeNo executable scriptsNot checked

Generate a PR description and create the pull request on the repository's git host — a GitHub PR, a GitLab merge request, or, where the host has no CLI, a…

kanopiby kanopi★ 18 GitHub stars

About this skill

PR Create

Generate a terse PR description and create the pull request on whichever host the repository uses — GitHub, GitLab, Bitbucket, or other. The main session runs this skill directly — no orchestrator agent is involved.

⚠️ Side Effect Warning

This skill creates a pull request (a merge request on GitLab) — a publicly visible, permanent action that:

  • Pushes your branch to the remote repository
  • Creates a PR visible to all repository members
  • Triggers CI/CD pipelines and notifications

No approval step. The PR is the fastest route to CI, preview environments, and the test suites that run against them, so this skill creates it as soon as the description is ready and shows the result afterwards. The description can be changed on the host (gh pr edit, glab mr update) once it exists. Review happens on the PR, not before it.

Usage

  • "Create a PR for my current branch"
  • "Create a pull request with ticket PROJ-123"
  • /pr-create [ticket-number]

Prerequisites

  • Changes committed to a feature branch (not main/master)
  • The host's CLI installed and authenticated — gh for GitHub, glab for GitLab. Bitbucket and other hosts have none; the skill hands over the description and a new-PR link instead
  • Remote repository accessible

Workflow

1. Parse arguments

  • Look for a ticket reference (e.g., PROJ-123) in the arguments, current branch name, or recent commit messages.
  • --concise is still accepted for muscle memory, but changes nothing: every description is terse (step 6), and the step 5 checks always run.

2. Verify prerequisites

First, git remote get-url origin — identify the git host (GitHub, GitLab, Bitbucket, other) per references/git-hosts.md. Never assume GitHub. Every gh command in this skill means "this command on the detected host"; that reference has the GitLab equivalents and the no-CLI path.

Then, in parallel:

  • git status — confirm working tree is clean (or staged changes are intended for the PR)
  • git branch --show-current — confirm we're not on the default branch
  • The default branch, with the host's command from references/git-hosts.md; never assume main (many Kanopi repos use master). Without a host CLI: git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
  • gh auth status or glab auth status — confirm the host CLI is authenticated

If on the default branch, stop and tell the user to switch to a feature branch first.

If the host CLI is unavailable — not installed, not authenticated, the call errors, or permission for it is denied — or the host has no CLI at all (Bitbucket, other), do not stop to ask about authentication. A missing CLI never blocks steps 3–6: switch to the Environment fallback (below) and continue the analysis; only the final creation step becomes a manual command for the user. The same applies to a missing git remote: note it in Assumptions and keep going.

3. Analyze changes

Run in parallel:

  • git log --oneline <base>..HEAD — full commit history on this branch
  • git diff <base>...HEAD — full diff
  • git diff --stat <base>...HEAD — files changed summary

Where <base> is typically main or 1.x (whichever the repo uses as the default branch — resolved in step 2).

4. Detect CMS context

Scan the diff for platform-specific changes:

Drupal indicators:

  • Files under config/sync/ → flag config import needed
  • hook_update_N definitions in .module or .install → flag database update
  • Changes to services, render arrays, or cache tags → flag cache clear
  • New module dependencies in *.info.yml or composer.json

WordPress indicators:

  • ACF JSON files in acf-json/ → flag field re-sync
  • register_post_type, register_taxonomy, or rewrite rule changes → flag permalink flush
  • Theme template changes or new plugin activations → flag cache clear / plugin activation
  • Block changes (block.json, src/blocks/) → flag editor cache

Any platform:

  • New environment variables or secrets read by the code → list them
  • Lockfile or manifest changes → flag a dependency install
  • Build-config, bundler, or asset-pipeline changes → flag an asset rebuild
  • Job, worker, queue, or scheduler definitions → flag a restart
  • Flag-gated code paths → name the flag to flip
  • Anything the deploy pipeline cannot reach → spell out the manual admin step

Name the exact command wherever the project has one — check its deploy scripts, CI config, and README. Omit Deploy Notes only when the diff needs nothing beyond a routine deploy.

5. Run inline quality checks

Use Read, Grep, and Bash directly — no Task() spawns required:

  • Tests — Grep for new functions/classes and check if matching tests exist in the project's test directory. Note untested code in the PR description.
  • Security — Grep the diff for risky patterns: raw SQL concatenation, eval, unserialize, missing nonce/CSRF checks (WP wp_verify_nonce, Drupal Form API),
Full SKILL.md on GitHub

Install pr-create in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

agents/openai.yamlreferences/git-hosts.mdreferences/template-resolution.mdreferences/testing-environment.mdreferences/validation-steps.md

FAQ

What does the pr-create skill do?

Generate a PR description and create the pull request on the repository's git host — a GitHub PR, a GitLab merge request, or, where the host has no CLI, a ready-to-paste description and new-PR link. Invoke when user wants to create a pull request, says "create a PR", "submit a PR", "open a pull request", or uses /pr-create. Creates the PR as soon as the description is ready, with no approval step, then shows the description and URL so CI and preview environments can start testing. Writes terse descriptions and supports ticket numbers.

How do I install the pr-create skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the pr-create skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare pr-create with