Skip to main content

radius-create-pr

Automates GitHub pull request creation from the current branch

Source facts

Repository
radius-project/radius
Last source activity
October 21, 2026 at 19:27
Detected SKILL.md language
English
Stars
1,671
Forks
142

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
radius-create-pr
description
Automates GitHub pull request creation from the current branch
disable-model-invocation
true
# Create GitHub Pull Request Create a pull request from the current branch following the steps below. ## Determining the Default Branch When working with forks, the default branch must come from the correct remote: - If `upstream` exists in `git remote -v`: run `git remote show upstream` and parse the output to find the `HEAD branch` - Otherwise: run `git remote show origin` and parse the output to find the `HEAD branch` > [!TIP] > On Linux or macOS for precise output parsing, consider using: `git remote show <your-remote-name> | grep 'HEAD branch'` > On Windows with PowerShell, you can use: `git remote show <your-remote-name> | Select-String 'HEAD branch'` ## Steps ### Step 1: Validate Branch State Stop and inform the user if any of these conditions exist: - Current branch has no remote tracking branch (`git rev-parse --abbrev-ref --symbolic-full-name "@{u}"`) - Uncommitted changes exist (`git status --porcelain`) - Unpushed commits exist (`git rev-list --count "@{u}..HEAD"` returns > 0) ### Step 2: Load PR Template Check for a PR template at these locations (in order): - `.github/PULL_REQUEST_TEMPLATE.md` - `.github/pull_request_template.md` - `docs/PULL_REQUEST_TEMPLATE.md` - `PULL_REQUEST_TEMPLATE.md` Use the first template found to structure the PR description. ### Step 3: Generate PR Content Analyze the changes using `git diff` and `git log` against the default branch. **PR Title Requirements:** - Maximum 80 characters - Use `<type>[optional scope][!]: <description>` with a lowercase type - Read the [PR title guide](../../../docs/contributing/contributing-pull-requests/README.md#3-use-a-conventional-commit-pull-request-title) and use its allowed types - Use noun phrases in the description, for example `feat(api): authentication improvements` **PR Description:** - Follow the PR template structure if one exists - Preserve checkboxes from the template (do not convert to bullets) - If no template: summarize changes, list modified files, include relevant commit context ### Step 4: Create the Pull Request Create the PR using the GitHub MCP tool, falling back to `gh pr create` if unavailable. - **head**: current branch - **base**: default branch (from Step 1) ### Step 5: Report Result Display the PR URL: ```text ✅ Pull request created successfully! 🔗 URL: [PR_URL] ``` ## Error Handling Stop immediately on any failure with a clear error message. Common errors: - Branch not pushed to remote - Uncommitted or unpushed changes - PR already exists for this branch - Insufficient GitHub permissions
View on GitHub