home / skills / first-fluke / fullstack-starter / create-pr

create-pr skill

/.agents/skills/create-pr

This skill automates pull request creation using GitHub CLI, generates conventional-commit-based titles and bodies for clear, high-quality PRs.

npx playbooks add skill first-fluke/fullstack-starter --skill create-pr

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.3 KB
---
name: create-pr
description: Automates the creation of detailed, well-formatted Pull Requests using the GitHub CLI. Parses conventional commits to generate titles and descriptions.
---

# Create PR

This skill streamlines the Pull Request process, ensuring consistent and high-quality PR descriptions.

## Prerequisites

- `gh` (GitHub CLI) must be installed and authenticated.
- The current branch must have commits that are not yet on the remote (or a corresponding remote branch).

## Workflow

1.  **Analyze Context**: Checks the git log to understand the changes (`feat`, `fix`, `chore`).
2.  **Generate Metadata**:
    - **Title**: Uses the conventional commit format (e.g., `feat: Implement user login`).
    - **Body**: Summarizes the changes, links to issues, and provides verification steps.
3.  **Execute**: Runs `gh pr create`.

## Usage

```bash
# Standard usage (interactive)
gh pr create

# Fully automated with flags
gh pr create --title "feat: Add user profile" --body "Implements user profile page..."
```

## Best Practices for PRs

- **Small & Focused**: Keep PRs limited to a single logical change.
- **Linked Issues**: Always link to the task/issue (e.g., `Closes #123`).
- **Self-Review**: Review your own diff before creating the PR.
- **Verification**: Explicitly state how you verified the change (screenshots, test output).

Overview

This skill automates creation of clear, consistent Pull Requests using the GitHub CLI. It parses conventional commits to produce concise titles and structured bodies that include summaries, issue links, and verification steps. It reduces manual formatting and helps maintain high-quality PRs across a monorepo with multiple services and languages.

How this skill works

The skill inspects the local git log and detects conventional commit tags like feat, fix, and chore to generate a meaningful PR title. It composes a detailed body that summarizes changes, references related issues, and adds suggested verification steps. Finally, it invokes the GitHub CLI (gh pr create) to open the PR interactively or with supplied flags for full automation.

When to use it

  • Creating a PR after finishing a focused change or feature branch.
  • Opening a PR in a large monorepo where consistent descriptions help reviewers.
  • Linking commits to issues or tasks automatically during PR creation.
  • Automating CI-driven PR creation in scripts or pipelines.
  • When you want standardized titles and verification instructions for every PR.

Best practices

  • Keep each PR small and focused on a single logical change to simplify review.
  • Use conventional commit messages so generated titles and summaries are accurate.
  • Always link related issues or tasks (e.g., "Closes #123") in the PR body.
  • Run a quick self-review of the diff before creating the PR, even when automating.
  • Include concrete verification steps and artifacts (screenshots, test output) in the generated body.

Example use cases

  • Developer finishes a feature branch; run gh pr create to generate a title from commit messages and open the PR.
  • Automated CI job creates a PR for dependency updates with a standardized body and linked issue.
  • Maintainer submits a hotfix branch; tool generates a concise "fix:" title and verification checklist.
  • Repo templates and multi-service changes in a monorepo get uniform PR descriptions for easier cross-team review.
  • Scripting full automation: pass --title and --body flags to skip interactive prompts for machine-generated changes.

FAQ

What prerequisites are required?

You must have the GitHub CLI (gh) installed and authenticated, and the local branch must contain commits not yet pushed to the target remote branch.

Can I override the generated title or body?

Yes. You can run gh pr create interactively or pass --title and --body flags to provide a custom title and description.