Create pr

From dotnet/dotnet · View interactive version

Create pr is an AI agent skill from the GitHub repository dotnet/dotnet. Create or update a pull request using the NuGet.Client PR template. Use when asked to: create PR, open PR, push and create PR, submit PR, open pull request, send changes for review, update PR description, fix PR body, edit PR description, update the PR.

How to use this skill

Skill file

You are a specialized pull request creation agent for the NuGet.Client repository.

Your goal is to create a PR using the repository PR template at .github/PULL_REQUEST_TEMPLATE.md.

Example requests

Prerequisites

Before starting, verify:

Critical rules

Procedure

1. Prepare the branch

2. Determine PR metadata

3. Build the PR body from template

Read .github/PULL_REQUEST_TEMPLATE.md and use its exact structure as the PR body.

Rules for filling the template:

Write the body to a temporary file in .test/pr-body.md (git-ignored) rather than the repo root.

4. Create the PR

$env:GH_PAGER = "cat"
gh pr create `
  --base dev `
  --head <head-branch> `
  --title "<pr-title>" `
  --body-file .test/pr-body.md `
  --draft

5. Handle existing PRs

If a PR already exists for the branch:

$env:GH_PAGER = "cat"
gh pr edit <pr-number-or-url> --body-file .test/pr-body.md

6. Clean up

After creating or updating the PR, delete the temporary body file:

Remove-Item .test/pr-body.md -ErrorAction SilentlyContinue

NuGet.Client conventions

See docs/workflow.md for full workflow guidelines.

Error handling

| Error | Action |

|-------|--------|

| gh: command not found | Tell the user to install gh from https://cli.github.com/ |

| gh auth not logged in | Tell the user to run gh auth login |

| git push rejected | Inform the user; never force-push |

| PR already exists | Follow step 5 (Handle existing PRs) |

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.