Pr all in one

From JeremyDev87/codingbuddy · View interactive version

Pr all in one is an AI agent skill from the GitHub repository JeremyDev87/codingbuddy. Unified commit and PR workflow. Auto-commits changes, creates/updates PRs with smart issue linking and multi-language support.

How to use this skill

Skill file

PR All-in-One

Overview

Streamlines commit-to-PR workflow with auto-commit, smart issue linking, and multi-language support. Handles the complete flow from uncommitted changes to published PR with intelligent branch management, logical commit grouping, and context-aware PR descriptions.

When to Use

Usage

/pr-all-in-one [target-branch] [issue-id]

Examples:

Argument Parsing:

Configuration

Location: .claude/pr-config.json

First-time run: Interactive setup flow guides you through configuration.

See configuration-guide.md for:

Workflow (9 Steps)

┌─────────────────────────────────────────────────┐
│              Workflow Execution                 │
└─────────────────────────────────────────────────┘

Step 1: Parse arguments
├── Issue pattern → issue ID
├── Branch name → target branch
└── Defaults from config

Step 2: Check git status & branch
├── git status (uncommitted changes)
└── git branch --show-current

Step 3: Handle main branch case
├── If on target branch with changes
│   ├── Analyze changes for branch name
│   ├── Create new branch: git checkout -b <type>/<description>
│   └── Proceed to Step 4
└── If on target branch without changes → Exit

Step 4: Auto-commit changes
├── Analyze with git diff
├── Group by feature/purpose
└── For each group:
    ├── git add <related-files>
    ├── Conventional commit message (English)
    └── NO AI signature/Co-Authored-By

Step 5: Push to remote
└── git push -u origin <branch> (if needed)

Step 6: Check existing PR
└── gh pr view --json url,title,body

Step 7: Update existing PR (if exists)
├── Analyze all commits: git log <target>..HEAD
├── Read prLanguage from .claude/pr-config.json
├── Select template based on prLanguage:
│   ├── "en" → English Template
│   ├── "ko" → Korean Template
│   └── "bilingual" → Bilingual Template
├── Generate title:
│   ├── "en"/"bilingual" → English title
│   └── "ko" → Korean title
├── Generate body with selected template
├── Merge with .github/pull_request_template.md (if exists)
├── NO AI signature
└── gh pr edit --title --body

Step 8: Create new PR (if not exists)
├── Analyze all commits
├── Read prLanguage from .claude/pr-config.json
├── Select template based on prLanguage:
│   ├── "en" → English Template
│   ├── "ko" → Korean Template
│   └── "bilingual" → Bilingual Template
├── Generate title:
│   ├── "en"/"bilingual" → English (e.g., "feat: add auth")
│   └── "ko" → Korean (e.g., "feat: add authentication")
├── Generate body with selected template + commit analysis
├── Merge with project template if exists
├── NO AI signature
└── gh pr create --draft --base <target>

Step 9: Return PR URL
└── If UI changes detected → suggest screenshots

Workflow Diagram

                    ┌─────────────────┐
                    │  Check Config   │
                    │ pr-config.json  │
                    └────────┬────────┘
                             │
              ┌──────────────┴──────────────┐
              │                             │
              ▼                             ▼
     ┌────────────────┐           ┌─────────────────┐
     │  Config Exists │           │  No Config      │
     └───────┬────────┘           └────────┬────────┘
             │                             │
             │                             ▼
             │                    ┌─────────────────┐
             │                    │ Interactive     │
             │                    │ Setup (1st run) │
             │                    └────────┬────────┘
             │                             │
             └──────────────┬──────────────┘
                            │
                            ▼
                   ┌────────────────┐
                   │ Check Git      │
                   │ - branch       │
                   │ - uncommitted  │
                   └───────┬────────┘
                           │
         ┌─────────────────┼─────────────────┐
         │                 │                 │
         ▼                 ▼                 ▼
   ┌──────────┐     ┌───────────┐     ┌───────────┐
   │ On main  │     │ Has       │     │ No        │
   │ branch   │     │ Changes   │     │ Changes   │
   └────┬─────┘     └─────┬─────┘     └─────┬─────┘
        │                 │                 │
        ▼                 ▼                 │
   ┌──────────┐     ┌───────────┐           │
   │ Create   │     │ Logical   │           │
   │ Branch   │     │ Group &   │           │
   └────┬─────┘     │ Commit    │           │
        │           └─────┬─────┘           │
        │                 │                 │
        └─────────────────┼─────────────────┘
                          │
                          ▼
                 ┌────────────────┐
                 │  Remote Push   │
                 │  (if needed)   │
                 └───────┬────────┘
                         │
                         ▼
                ┌─────────────────┐
                │ Check PR        │
                │ gh pr view      │
                └────────┬────────┘
                         │
           ┌─────────────┴─────────────┐
           │                           │
           ▼                           ▼
    ┌─────────────┐            ┌─────────────┐
    │  PR Exists  │            │  No PR      │
    │  → Update   │            │  → Create   │
    └──────┬──────┘            └──────┬──────┘
           │                          │
           └────────────┬─────────────┘
                        │
                        ▼
               ┌────────────────┐
               │  Return URL    │
               │  + Screenshot  │
               │  suggestion    │
               └────────────────┘

Auto-Commit Logic

Changes are automatically grouped and committed with semantic messages:

Grouping Strategy:

Commit Message Format:

<type>(<scope>): <description>

[optional body]

Types: feat, fix, chore, docs, refactor, test, style, perf

Important:

PR Description Format

PR descriptions are generated in the configured language and follow project templates when available.

Output Examples by Language

When `prLanguage: "en"`

Title: feat: add user authentication

Body:

## Context

**Related Links:**
- Issue: [AUTH-123](https://jira.example.com/browse/AUTH-123)

**Description Details:**

Added JWT-based authentication with refresh token support.

## Screenshots or Videos

N/A (no UI changes)
When `prLanguage: "ko"`

Title: feat: add user authentication

Body:

## Context

**Related Links:**
- Issue: [AUTH-123](https://jira.example.com/browse/AUTH-123)

**Description Details:**

Added JWT-based authentication with refresh token support.

## Screenshots or Videos

N/A (no UI changes)
When `prLanguage: "bilingual"`

Title: feat: add user authentication

Body:

## Context

**Related Links:**
- Issue: [AUTH-123](https://jira.example.com/browse/AUTH-123)

**Description Details:**

Added JWT-based authentication with refresh token support.

---

**Description Details (Korean):**

Added JWT-based authentication with refresh token support. (Korean translation here)

## Screenshots or Videos

N/A (no UI changes)

Template Definitions

For detailed template definitions, see pr-templates.md.

Project Template Integration

If .github/pull_request_template.md exists:

Issue ID Resolution

Issue ID is resolved with the following priority:

  1. Explicit argument - /pr-all-in-one ISSUE-123
  2. Branch name extraction - feat/ISSUE-123-description → ISSUE-123
  3. Not available - No issue linking in PR

Branch Name Patterns:

See issue-patterns.md for comprehensive pattern reference.

Screenshot Guidance

When UI changes are detected in the diff:

UI Change Detection:

Notes

AI Signature Exclusion:

Conventional Commits:

Draft PR by Default:

Branch Naming:

Related Documentation

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.