# Open draft PR

> Open draft PR is an open-source agent skill for developer tools. Pushes an agent's finished branch and opens a draft pull request for review. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/tonyghiani/ai-essentials/tree/main/skills/open-draft-pr
- **Repository:** https://github.com/tonyghiani/ai-essentials
- **GitHub stars:** 7
- **License:** MIT
- **Skill name:** open-draft-pr
- **Collection:** https://github.com/tonyghiani/ai-essentials
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill handles the final handoff of a finished change. It checks that the agent is working on its own recorded branch, runs the repository's verification command, builds the pull request body from a template, and audits the commits and body for any tool credit before pushing. The draft is opened with the user's own GitHub login and git identity, and the skill never force pushes or pushes to a default branch.

Before creating the pull request, it picks labels by looking at merged pull requests that touched the same paths and keeps only labels from the repository's existing set. If an open draft already exists for the branch, it updates that pull request instead of opening a second one. The run ends with a report containing the pull request URL, labels, audit result and verification output.

It expects the ai-work, ai-verify, ai-pr-body and ai-audit commands to be installed, along with the GitHub CLI and git. If those commands are missing, the skill stops and tells the user rather than substituting its own tooling. Guard hooks block marking a pull request ready or merging it.

## When your agent uses it

> Pushes the agent's own branch and opens a draft pull request attributed to the user alone, after auditing commits and body for tool credit and confirming checks pass. Never marks a PR ready and never merges. Use at the end of a delivery, or when the user says "open a draft PR", "push this as a draft".

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/tonyghiani/ai-essentials/tree/HEAD/skills/open-draft-pr)
- [Asks for: Bash(git status *), Bash(git log *), Bash(git diff *), Bash(ai-work *), Bash(ai-verify *), Bash(gh label list *), Bash(gh pr list *)](https://github.com/tonyghiani/ai-essentials/blob/HEAD/skills/open-draft-pr/SKILL.md)
- [License: MIT](https://github.com/tonyghiani/ai-essentials/tree/HEAD/skills/open-draft-pr)

## Features

- **Branch ownership check:** Confirms the branch was recorded as the agent's own before anything is pushed.
- **Verification gate:** Runs the verification contract and shows its output before the pull request is opened.
- **Templated PR body:** Builds the pull request body from a required summary template and rejects drafts that drift from it.
- **Tool credit audit:** Checks commits and the body for attribution to tools and stops the push if any is found.
- **Label selection from history:** Chooses labels that similar merged pull requests in the repository already use.
- **Draft only handling:** Creates the pull request as a draft and leaves marking it ready or merging to the user.

## Good for

- Open a draft pull request after finishing a feature branch
- Push the current branch as a draft for review
- Update the existing draft PR body after new commits
- Check that verification passes before opening a PR

## Install

### Claude Code

This skill ships in the `ai-essentials` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add tonyghiani/ai-essentials
/plugin install ai-essentials@ai-essentials
```

Or copy only this skill to `~/.claude/skills/open-draft-pr`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/open-draft-pr &&
cp -R "$tmp/skills/open-draft-pr" ~/.claude/skills/open-draft-pr &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/open-draft-pr` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/open-draft-pr` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/open-draft-pr &&
cp -R "$tmp/skills/open-draft-pr" ~/.agents/skills/open-draft-pr &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/open-draft-pr` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/open-draft-pr` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/open-draft-pr &&
cp -R "$tmp/skills/open-draft-pr" ~/.cursor/skills/open-draft-pr &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/open-draft-pr` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/tonyghiani/ai-essentials.git --path skills/open-draft-pr
```

Or copy the folder to `~/.gemini/skills/open-draft-pr` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/open-draft-pr`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/open-draft-pr &&
cp -R "$tmp/skills/open-draft-pr" ~/.copilot/skills/open-draft-pr &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/open-draft-pr` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git
```

Then copy `ai-essentials/skills/open-draft-pr` into your agent's skills folder as `open-draft-pr`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need installed?

The ai-work, ai-verify, ai-pr-body and ai-audit commands, plus git and the GitHub CLI. If a command is missing, the skill stops and reports that the setup is not installed.

### Can Open draft PR mark the pull request ready or merge it?

No. It only creates draft pull requests, and a guard hook blocks gh pr ready and gh pr merge. Marking the PR ready is left to the user.

### When does Open draft PR run?

It is meant for the end of a delivery, or when the user asks to open a draft PR or push a change as a draft.

### Does Open draft PR force push?

No. A rejected push is reported to the user, and the skill does not retry with force or push to a default branch.

### How do I install Open draft PR in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/open-draft-pr to use it in all your projects, or to .claude/skills/open-draft-pr in one project. Or install the ai-essentials plugin, which includes it: /plugin marketplace add tonyghiani/ai-essentials, then /plugin install ai-essentials@ai-essentials.

### Does Open draft PR run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Open draft PR?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Open draft PR?

The closest alternatives to Open draft PR are Make PR, Create PR, PR writer, PR summary and PR.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Make PR](https://ai-powered.com/skills/make-pr): Make PR is an open-source agent skill for developer tools.
- [Create PR](https://ai-powered.com/skills/create-pr): Create PR is an open-source agent skill for developer tools.
- [PR writer](https://ai-powered.com/skills/pr-writer): PR writer is an open-source agent skill for developer tools.
- [PR summary](https://ai-powered.com/skills/pr-summary-kzytateishi): PR summary is an open-source agent skill for developer tools.
- [PR](https://ai-powered.com/skills/pr): PR is an open-source agent skill for developer tools.
- [PR review](https://ai-powered.com/skills/pr-review-tjmonsi): PR review is an open-source agent skill for developer tools.
- [Git PR](https://ai-powered.com/skills/git-pr): Git PR is an open-source agent skill for developer tools.
- [Document](https://ai-powered.com/skills/document-awrshift): Document is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/open-draft-pr
