Get the FREE Ultimate OpenClaw Setup Guide →

creating-pull-requests

Scanned
npx machina-cli add skill aiskillstore/marketplace/creating-pull-requests --openclaw
Files (1)
SKILL.md
960 B

Pre-check

git branch --show-current
git status
git log --oneline <main-branch>..HEAD  # Check CLAUDE.md for main branch name

Push to Remote

git push -u origin <branch-name>

PR Description Format

## Summary

- [Change 1]
- [Change 2]

## Test plan

- [ ] [Test item 1]
- [ ] [Test item 2]

Create PR

gh pr create \
  --title "<title>" \
  --body "$(cat <<'EOF'
## Summary

- Changes...

## Test plan

- [ ] Test items...
EOF
)"

Options

OptionUsage
--draftDraft PR
--base <branch>Target branch
--assignee @meSelf-assign
--label <label>Add label

Completion Report

  • PR URL
  • Title
  • Target branch

Source

git clone https://github.com/aiskillstore/marketplace/blob/main/skills/1gy/creating-pull-requests/SKILL.mdView on GitHub

Overview

This skill streamlines PR workflows by generating a structured, descriptive PR body and creating the pull request for you. It triggers on PR creation events and code-review preparation, ensuring every PR has a consistent Summary and Test plan. You use it to push changes, open a PR with a high-quality description, and optionally annotate the PR with draft status, a target base branch, assignees, or labels.

How This Skill Works

The skill analyzes your current branch and changes, composes a PR description with a Summary and a Test plan, and then invokes gh pr create with a tailored title and body. It leverages Git for branch and push operations and the GitHub CLI for PR creation, returning a completion report that includes the PR URL, title, and target branch.

When to Use It

  • When you finish work on a feature branch and want to open a PR quickly.
  • During code-review preparation to provide reviewers with a clear, machine-generated Summary and Test plan.
  • When you aim to standardize PR descriptions across a team for consistency.
  • Before handing off to CI, ensuring there is a concrete Test plan in the PR body.
  • When you need to specify a non-default base branch or assign/label the PR automatically.

Quick Start

  1. 1) Ensure you are on the feature branch: git branch --show-current and verify your changes with git status. Check the main branch name as per CLAUDE.md and compare with your local main.
  2. 2) Push your branch to origin: git push -u origin <branch-name>.
  3. 3) Trigger PR creation which generates a PR body using the PR Description Format (Summary and Test plan) and creates the PR via gh pr create. Provide a title and let the body be generated automatically, or customize as needed.
  4. 4) Review the generated PR, make any edits to the title or body if desired, and note the Completion Report fields: PR URL, Title, Target branch.

Best Practices

  • Keep the generated Summary concise and focused on the most impactful changes.
  • Verify that the Test plan items cover key scenarios (unit, integration, and manual checks) relevant to your changes.
  • Use a consistent PR body format with a clear Summary and Test plan to improve readability for reviewers.
  • If applicable, make use of --draft, --base, --assignee, and --label options to align with project conventions.
  • Ensure the main/target branch is correct to avoid PRs against unintended bases.

Example Use Cases

  • Add a new authentication flow: The generated PR includes Summary bullets like added OAuth login, session handling updates, and permissions checks, plus a Test plan covering unit tests and end-to-end login tests.
  • Refactor payment processing: The PR body describes architectural changes, updated API usage, and migration notes, with a Test plan spanning unit tests and integration tests for the payment gateway.
  • Bug fix: Resolve a race condition in data loading. The PR Summary highlights the fix and performance considerations; the Test plan includes regression tests and race-condition repro steps.
  • Feature enhancement: Improve UI component accessibility. Summary lists ARIA improvements and keyboard navigation updates; Test plan includes accessibility audits and manual checks.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers