create-gh-pr

Creates a GitHub pull request via the gh CLI from pre-resolved delegate inputs.

1|1|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/williamthorsen/codeassembly --skill create-gh-pr-williamthorsen
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: create-gh-pr
Source: https://github.com/williamthorsen/codeassembly/tree/main/packages/agents/content/skills/create-gh-pr
Command: npx skills add https://github.com/williamthorsen/codeassembly --skill create-gh-pr-williamthorsen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It handles the final step of an orchestrated pull-request workflow by creating a GitHub PR with the gh CLI, without re-resolving titles, labels, or branches that an upstream orchestrator already prepared. ## Core Features & Use Cases - Delegate-based PR creation: Receives fully prepared inputs (title, body, labels, base branch, ticket ID) from the create-pr orchestrator and runs gh pr create with a body file. - Label failure recovery: Detects invalid-label errors, removes failing labels, retries the creation, and records which labels were skipped. - Artifact persistence: Saves a pull-request artifact with the PR URL, label outcomes, and submitted body into the ticket directory. - Use Case: An agentic workflow finishes a code change and needs a draft PR opened on GitHub with resolved labels and a stored record of the result. ## Quick Start Invoke this delegate with a prepared title, body, labels, and base branch to create a draft GitHub pull request and save its artifact.

Frequently Asked Questions about create-gh-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a GitHub pull request with the gh CLI?▼

Run gh pr create with --title, --body-file pointing to a scratch file containing the PR body, --base for the target branch, and optional --label flags. The command prints the pull-request URL to stdout.

How to pass a multi-line PR body to gh pr create?▼

Write the body to a scratch file and pass it with --body-file instead of inlining it into the shell command. Verify the file exists and is non-empty before running the create command.

Why does gh pr create fail when adding labels?▼

The command fails when one or more label names do not exist in the repository. Identify the failing labels from the error message, remove them from the --label flags, and retry the creation while recording which labels were skipped.

Can I call this skill directly instead of through create-pr?▼

No, it is an internal delegate marked user-invocable: false. It expects fully prepared inputs from the create-pr orchestrator and does not resolve prefixes, labels, or scope/type on its own.

What are the limitations of this PR creation delegate?▼

It only creates draft pull requests on GitHub via the gh CLI and requires pre-resolved inputs. It does not handle branch creation, commit preparation, label resolution, or non-GitHub hosting platforms.