Skill

professional-pr-workflow

Automates pull request creation with branch management, code formatting, and integration with professional-commit-workflow. Supports GitHub CLI, automated PR descriptions, and project-specific formatters (Biome, Black, Prettier).

From git-workflow
Install
1
Run in your terminal
$
npx claudepluginhub talent-factory/claude-plugins --plugin git-workflow
Tool Access

This skill uses the workspace's default tool permissions.

Supporting Assets
View in Repository
README.md
config/pr_config.json
docs/code-formatting.md
docs/commit-workflow.md
docs/pr-template.md
docs/troubleshooting.md
requirements.txt
scripts/formatters/__init__.py
scripts/formatters/code_formatter.py
scripts/git/__init__.py
scripts/git/branch_manager.py
scripts/git/pr_creator.py
scripts/main.py
Skill Content

Professional PR Workflow

Overview

Automates the complete pull request workflow: branch creation, code formatting, commit integration, and PR creation via GitHub CLI.

Features:

  • Intelligent branch management - detects protected branches
  • Integration with professional-commit-workflow - no commit duplication
  • Automatic code formatting (Biome, Black, Prettier, etc.)
  • GitHub CLI integration - PR creation, labels, issue linking
  • Meaningful PR descriptions with test plan
  • Draft PR support - mark WIP PRs

Prerequisites

Required:

  • Git (2.0+)
  • Python 3.8+
  • GitHub CLI (gh) - installed and authenticated

Optional (for code formatting):

  • JavaScript/TypeScript: Biome or Prettier
  • Python: Black, isort, Ruff
  • Java: Google Java Format
  • Markdown: markdownlint

Usage Workflow

  1. Check branch status:

    • Protected branch (main/master/develop)? -> Create new branch
    • Feature branch? -> Use current branch
  2. Commit changes:

    • Uncommitted changes? -> Invoke professional-commit-workflow
    • Already committed? -> Use existing commits
  3. Format code (optional, skip with --no-format)

  4. Create PR:

    • Push branch to remote
    • Generate PR title and description
    • Create PR via gh pr create

Main Script Usage

# Standard PR workflow
python scripts/main.py

# Draft PR
python scripts/main.py --draft

# Without formatting
python scripts/main.py --no-format

# Single commit (all changes in one)
python scripts/main.py --single-commit

# Change target branch
python scripts/main.py --target develop

Supported Formatters

JavaScript/TypeScript

  • Biome (preferred): biome format --write .
  • Prettier: prettier --write .
  • ESLint: eslint --fix .

Python

  • Black: black .
  • isort: isort .
  • Ruff: ruff format .

Java

  • Google Java Format: Via Maven/Gradle plugin

Markdown

  • markdownlint: markdownlint --fix **/*.md
  • mdformat: mdformat .

Output Example

============================================================
  Professional PR Workflow
============================================================

Branch status: main (protected)
New branch created: feature/user-dashboard-2024-12-21

Code formatting:
  Biome: 5 files formatted
  ESLint: 0 errors

Branch pushed: origin/feature/user-dashboard-2024-12-21

PR created: #42
  https://github.com/user/repo/pull/42

PR workflow completed successfully

Configuration

pr_config.json

{
  "protected_branches": ["main", "master", "develop"],
  "default_target": "main",
  "auto_delete_branch": false,
  "formatters": {
    "javascript": "biome",
    "python": "black",
    "java": "google-java-format"
  }
}

Error Handling

Branch errors: Checks existing branches, offers alternative names Format errors: Shows details, enables --no-format fallback GitHub CLI errors: Checks authentication, shows gh setup instructions Push errors: Retry logic, manual push commands

References

Stats
Parent Repo Stars3
Parent Repo Forks0
Last CommitFeb 27, 2026