/skills:create-prfrom skills
Creates GitHub pull requests from local changes or named branches with validation, commit, code review, push, and PR readiness verification. Stops at reviewed PR by default.
Ships in skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
For $create-pr --help or $create-pr -h (including native Claude forms), return concise help and stop before
any workflow step. State the purpose and invocation policy. Show exact usage
for every public action. Describe each public action, positional
argument, and flag in one concise line, including -h, --help; say "No
additional public flags" when there are no others. Use only the documented
public interface. For internal or coordinator-only skills, state that boundary
and that no standalone public workflow action exists. After the selected
SKILL.md is loaded, help is report-only: do not call any additional tools,
inspect project state, or modify files, private state, Git, or external systems.
Never expose private helper actions or flags or treat help as workflow
authorization.
Use $create-pr in Codex, /create-pr in Claude Code, or
/skills:create-pr in the Claude plugin. Dollar-prefixed skill examples
refer to the same named skill on either host; use the native invocation syntax.
Preserve the declared invocation policy, approvals and workflow ownership.
Use available native tools; an unavailable required capability is a blocker,
never permission to bypass a guard or claim unobserved behavior.
Use this skill to turn local repository work or named branches into GitHub pull requests with a safe default-branch workflow. It can prepare a single PR or one PR per branch, resolve straightforward merge conflicts against the default branch, run code-review before publication and review-pr until safe repairs pass. Stop at the reviewed PR by default. Explicit user intent to merge routes through merge-pr.
git add -A
when committing changes for a PR.git add -A, commit on that branch, push it, and open or reuse the
PR without creating another branch.origin/<base> into each target branch before PR creation
so the branch includes the current base without rewriting branch history.main, before returning the PR.sdlc-uat-tests passes for the clean exact SHA promoted by sdlc-commit.Use commit-push for publication without a PR and review-pr for PR review. Managed children must finish their owning integration workflow first.
Public usage: $create-pr [<branch> ...]. -h, --help shows help only.
No additional public flags. Default completion creates/reuses and reviews the
PR without merging. A request such as "create a PR and merge it" additionally
authorizes delegation to merge-pr, including an action request phrased as
"Can you create a PR and merge it?" Interpret intent semantically; negation,
informational questions about skill behavior, quoted examples, discussion and
merging the base into a branch do not authorize merging the GitHub PR. Active Agentic SDLC
retains publication-only behavior regardless of the ordinary default.
origin remote.gh) authenticated for the target repository.Before staging, committing, fetching for publication, pushing, or creating a
PR, resolve the installed worktree skill and invoke its Python manager's
publication-guard --publication-action create-pr action from the current
checkout.
If it reports any managed child, integration candidate, nested worker, or
inconsistent ownership claim, stop and route to its owning local workflow.
Only a genuinely unmanaged manual worktree may pass as unmanaged. This guard
also overrides active SDLC publication mode: managed children integrate
locally, while only an unmanaged final source branch may use the PR workflow
below.
When the current project has a matching active Agentic SDLC run, this mode
overrides the generic branch-preparation, repair, and base-merge steps below.
This is publication-only mode: create-pr is a handoff, not another
implementation gate.
Before any push or PR creation/reuse:
create-pr, have no managed outer-integration
state, have passed UAT, and have a clean current named non-default branch.leased, pending, or integrated, do not publish the
child. Route leased back through the active SDLC run. For pending, stop
and tell the user to switch to the recorded primary checkout and invoke the
exact $worktree integrate handoff; for integrated, stop and publish only
from the separately selected final source branch. Never invoke the
explicit-only worktree skill from create-pr.promoted_head from execution and commit evidence.
Require current HEAD, the recorded promoted HEAD, and any existing remote
PR head to equal that exact SHA.PR_HEAD_DRIFT.In this mode, do not stage, format, edit, commit, amend, merge the base, resolve
conflicts, switch or create branches, repair checks, or otherwise change the
promoted commit. Fetching refs and reading PR/check state are allowed. If the
base moved, the PR conflicts, a branch-owned check fails, or any code/docs/test
change is needed, record the blocker and route it through
sdlc-classify-failure and sdlc-start. The responsible validation,
evaluation, documentation, alignment, commit, and UAT gates must produce and
promote a new exact SHA before publication is retried.
Immediately before each authorized push or GitHub PR creation call, write a
short-lived permissions/pr-authorization.json containing at least
allowed: true, phase: "create-pr", the exact branch,
expected_head: <promoted_head>, the dynamically resolved
base_branch: <origin-default>, base_head: <recorded-default-head>,
uat_status: "passed", and expires_at. Re-resolve the symbolic remote
default immediately before authorization and reject either branch or HEAD
drift.
Publish with one direct git push origin HEAD:<branch> action, and create a PR
with one direct gh pr create --base <origin-default> --head <branch> ...
action or a PR-creation MCP call whose base and head are those exact
branches. Do not use a shell wrapper, prepend or append another command, or
omit either explicit branch. Reuse an existing remote branch or PR only when
its head is the exact promoted SHA and its base is the recorded remote default;
any mismatch is a blocker, not permission to update or overwrite it. Remove or
expire the authorization when publication completes or stops.
Explicit complete publish-release, publish-helm and publish-image requests
delegate necessary PR/commit work to this owner. Authorized review-pr repairs
and merge-pr review delegation use the same preparation handoff; see
references/commit-continuation.md.
An explicit PR task authorizes the necessary validated staging, commits and
pushes throughout its branch-owned repair loop. Do not request a new user turn
for each repair. Before committing, read references/commit-continuation.md
and call the canonical installed shared commit helper in create-pr mode.
Each commit gets a fresh exact-tree claim; only the helper runs repo-root
git add -A and normal-hook git commit. Staging commands below describe those
helper-owned effects, not permission for raw Git fallback. Ordinary commit
and commit-push permit one actual commit plus safe no-commit retries. Active SDLC remains publication-only.
For issue-linked delivery, read ../worktree/references/issue-resolution.md.
Require recorded user closure intent and current per-issue acceptance evidence.
Read current repository instructions, the affected checks, and
references/commit-continuation.md before any PR commit. Read
ordinary completion before local review,
repair delegation, or merge. Private preparation handoffs never recurse into
review-pr or merge-pr.
May repair authorized branch-owned files, create exact local commit claims, push the selected branch and update its PR. Keep private grants outside Git.
Reuse the same branch, PR and active continuation grant. Review each fresh tree; repeated execution of one claim returns its existing commit. Close the grant when the PR task completes or is abandoned; a closed receipt cannot reopen it.
Retry safe no-commit failures within the same grant after correcting their cause. Preserve uncertain commits for explicit review. Scope or ownership drift blocks continuation; never reset claims, fabricate receipts or bypass hooks.
Ordinary default completion ends at the reviewed pushed PR head, passing local validation and terminal checks, with review-pr's current-head/base attestation when eligible. Explicit merge intent additionally requires merge-pr's confirmed merge, remote destination proof and separately reported result CI. A queued PR is pending. Close the continuation grant only at the selected boundary; an internal preparation or review handoff keeps it open. Active Agentic SDLC ends at its exact promoted PR head and does not use this loop.
Read branch preparation for local check order, branch selection and base synchronization before the process below.
Inspect repository state first. Determine:
HEAD is detachedorigin/<base>Freeze task scope, then handle the current feature branch.
references/commit-continuation.md. Resolve
all targets, base, dependencies and a new scratch validation ref if needed.
Call the canonical helper's private begin with the original receipt before
any branch switch or HEAD movement, including a clean start.HEAD is detached, stop and explain the problem.Local Check Order in references/branch-preparation.md: run and repair
safe pre-test hygiene, wait for local
tests to finish, stage the complete repository diff from the repository
root with git add -A, run git diff --cached --check, inspect the
staged diff, and commit it on the current branch with a concise message
before merging the base branch, switching branches, pushing, or
opening the PR.create-pr is configured for repo-wide git add -A commits.Refresh base-branch context.
Fetch origin/<base> and the target branch refs before resolving
conflicts, validating branch diffs, or opening PRs. From the default branch,
create the planned feature at the receipt HEAD, then synchronize that feature
with the refreshed base through the helper. Do not move default-branch HEAD
between receipt capture and task intake.
Resolve the remaining target branches.
origin. Stop for unknown branches instead of guessing.prep/<project-tag> or fix/<topic>. Ensure the branch name does not
collide with an unrelated existing local or remote branch.Make each branch reviewable. A PR must come from committed changes, not only a dirty worktree.
Local Check Order in
references/branch-preparation.md: run
and repair safe formatting, whitespace, lint, build, and test issues
first, wait for local tests to finish, then stage the complete repository
diff from the repository root with git add -A, including modified,
deleted, and untracked files across monorepo projects. Then run
git diff --cached --check, inspect the staged diff, and commit it with
a concise message.create-pr is configured for repo-wide git add -A commits.Confirm there is something to review for every target.
Compare each target branch with origin/<base>. If a branch has no diff and
no unpublished commits, do not open an empty PR for that branch.
Make target branches conflict-free when possible.
origin/<base> without changing it,
for example with
git merge-tree --write-tree origin/<base> <branch-or-origin/branch>.Base Merge Policy
in references/branch-preparation.md:
refresh refs, invoke private sync, review its actual result, run affected
checks and acknowledge its exact tree before pushing. The helper owns the
normal-hook merge and recorded no-op/fast-forward/two-parent proof.ours or theirs conflict resolution. Keep both sides
when they are additive, preserve the branch behavior when the base only
moved nearby code, and stop when the conflict needs product or business
judgment.validate-order on the frozen temporary ref. Require
a clean checkout; the helper records sources, runs the merges, switches
back to the exact original checkout and performs exact-SHA cleanup. Never push
that branch or create an unmanaged throwaway worktree.sync --dependency <earlier-branch>
for the dependency frozen at intake, so the ordered path is conflict-free, or
report that the later PR should be refreshed after the earlier PR lands.
Choose the non-destructive update only when the dependency is evident from
current branch history or the user asked for an ordered multi-branch PR
flow.Validate after conflict resolution. Run focused checks based on touched files after any merge, conflict resolution, or validation repair. At minimum, scan for conflict markers and whitespace errors before pushing. Run formatting/lint checks before tests when they can change files, then run the relevant local tests and wait for them to finish. If relevant sibling skills apply to the touched surfaces, use them after the branch edits and keep the scope limited to the PR branches. If validation fails and the failures are plausibly caused by the branch, continue repairing the branch before treating PR creation as complete. Do not stop at opening a PR link when the branch has fixable local test, lint, build, or CI failures. Validate and commit the repair, then repeat the final candidate review before pushing.
Publish each branch.
For ordinary work, after final base synchronization and validation, freeze
the exact base/head and invoke nested read-only code-review on the complete
proposed PR diff, including affected callers and tests. The parent owns
safe repairs; changed head/base requires fresh validation and full review
before push or PR creation. An unresolved blocking finding stops publication.
Carry this analysis into review-pr within the same root operation; it may
reuse only the unchanged exact head/base, never stale prior-session evidence.
This also applies to private preparation handoffs without calling review-pr
or merge-pr recursively.
In an Agentic SDLC run, write
permissions/pr-authorization.json in the active run directory immediately
before pushing or opening/reusing the PR. Follow the stricter active-run
publication contract above; missing or failed UAT cannot authorize an
Agentic SDLC PR.
Ordinary publication uses the owner's private publish-target operation;
follow PR publication, including bound fork
intake and independent readback. Upstream tracking is not required. Active
SDLC retains its separately authorized direct explicit-ref push.
Avoid duplicate PRs. Reuse the bound base-repository/PR number and exact head-repository/ref identity for existing PRs. For new work, search that full identity before creation; branch names alone are not unique across forks.
Open each PR with the right readiness state.
Treat any explicit user-provided PR title as authoritative. Use it verbatim
unless the user explicitly asks for refinement. Do not substitute a generic
title such as "Preparation" and do not derive the PR title from a branch
prefix such as prep/<topic>.
gh pr create --fill when the commit history is clean enough to support
it.Prefer a draft PR when the branch is intentionally incomplete, validation
has not run yet, or a non-fixable blocker remains. If GitHub checks fail
after the PR is opened and the failures are available and branch-caused,
keep working on the same branch until the failures are resolved or clearly
blocked by external state.
When GitHub checks are expected and available, watch or poll them until
they reach a terminal pass, fail, skip, or cancel state within the fixed
86,400-second (24-hour) PR-readiness budget before reporting the PR as ready. Ordinary
completion preserves the same deadline through repairs and reruns; use the
publication caller's checkpoint when present, even when shorter. An explicit
user continuation may start a new ordinary observation attempt with the same
transaction. Only explicit release resume
renews release budgets. If checks remain pending because external CI is delayed or
unavailable, report the PR as pending instead of ready and include the last
observed check state.
In an Agentic SDLC run, include requirements covered, feature list,
validation, tests, evaluation, and UAT evidence summary in the PR body when
that local evidence exists. If UAT failed or is missing, stop and route
through the coordinator instead of creating an early Agentic SDLC PR.
Record the PR URL and readiness summary in the active SDLC run evidence
when local run state is available; if local state cannot be updated, report
the missing write explicitly.
Remove or expire permissions/pr-authorization.json after publishing and
PR creation/reuse completes.
12. Finalize issue-plan delivery under the shared contract after current-head readiness.
For ordinary work, execute references/ordinary-completion.md: local
review-pr, safe fixes through the preparation handoff, fresh validation and
review, then stop at the reviewed PR unless explicit merge intent authorizes
merge-pr. For multiple PRs, respect declared dependencies without assuming
earlier PRs merged; only an authorized merge sequence refreshes each next PR
against the newly advanced base.
Active Agentic SDLC skips this step.
13. Return the result.
Report:
- head branch name for each PR
- base branch name
- PR number and URL for each PR
- whether conflicts were found and how they were resolved
- validation performed
- actual completion order or pending dependencies
- final checkout and each local branch update or preserved-history skip
- merge outcome, exact-result CI/Pages and any blockers separately
Read checkout completion before intake and
outer return. Use owner-only checkout and completion operations, then close with
finish completed at the selected boundary, including zero-commit tasks. Keep it open across delegated
review repairs and internal preparation handoffs. Use finish cancelled when
abandoning it; preserve uncertain effects. Never bypass GitHub protection.
Read references/command-reference.md when exact Git or GitHub CLI commands
are needed for branch detection, validation, base merges, ordered merge
simulation, PR lookup, checks, or PR creation.
Every nested review preserves the caller checkout, index, files and local refs. Read private review execution before checkout-dependent review or repair. Carry the original grant and returned execution manifest through repair/publication handoffs; never require local adoption of a repaired PR head. Parent effects retain their separate authority.
When using this skill, capture durable, reusable, public-safe learnings in the narrowest appropriate surface only when the task contract allows source edits. For read-only/report-only work, or when a learning is not public-safe, evidence-backed, in scope, or free of unverified/vendor-specific claims, do not edit skill sources; report that it was skipped. Do not capture secrets, private URLs, customer data, raw logs, or one-off local state.
sdlc-classify-failure and the coordinator so all invalidated gates rerun.git add -A
so monorepo-wide related changes stay together. Do not path-limit staging; if
repo-wide staging would include work that should not be in the PR, stop and
ask the user to split or clean the worktree first.sync with uncommitted work. Validate and commit dirty
work first, then synchronize the frozen base through the helper.publish-target operation for ordinary PR pushes; read
PR publication. It binds the destination,
journals the update and independently verifies branch and PR readback.origin/<base> first.prep/<topic> determine the PR
title when the user supplied a title explicitly.When using this skill:
HEAD, missing gh auth, unknown
branch names, unresolved conflicts, failing checks, or no diff against the
base branch.README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)evals/evals.json (opens in a new tab)evals/trigger-prompts.csv (opens in a new tab)references/branch-preparation.md (opens in a new tab)references/checkout-completion.md (opens in a new tab)references/command-reference.md (opens in a new tab)references/commit-continuation.md (opens in a new tab)references/ordinary-completion.md (opens in a new tab)references/pr-publication.md (opens in a new tab)references/private-review.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub nebius/nebius-ps-services --plugin skills75 skills in this plugin
/agent-nebius-auth-diagnoseRead-only diagnosis for current-session Nebius project discovery, agent authentication, quota reads, profiles, selectors, or auth-hook failures. Use when auth is missing/blocked; never mutate auth or IAM./agent-nebius-auth-setupUse only when explicitly invoked to bootstrap or repair current-project Codex Agent Nebius auth: account/tenant access, credentials/profile, repair lease, or separately requested auth hooks./ai-agent-designDesign provider-neutral production AI agent subsystems: behavior and topology, contracts, tools, context, memory, authority, durability, security, evals, and operations. Use ai-stack when AI technology selection remains, design/app-stack for whole products, and implementation skills for code./ai-stackSelect or review undecided AI components across models, runtimes, training/inference, interoperability, retrieval, evals, safety, and operations. Consume ai-agent-design's frozen agent-subsystem contract; use app-stack for non-AI layers, research for one technology, and design for whole solutions./alignAlign a project after changes across code, wiring, tests, CI, CLI/help, config, docs, workflows, and skills, with focused quality gates. Use align-skill for skill-folder-only work./align-skillAlign existing/scaffolded skills for Agent Skills, Codex, Claude Code, and npx skills installation while preserving functionality, native controls, resources, and evals. Accept local or report-only GitHub sources; use skill-creator for new scaffolds and align for projects.