본문으로 건너뛰기
cccskills
무료GitHub에 공개

create-pull-request

Create a GitHub pull request that follows the project's template. Review commits and changed files, gather issue and testing details, check branch readiness, and use the GitHub CLI to submit a regular or draft request.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Create a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles commit analysis, branch management, PR template usage, and PR creation using the gh CLI tool.

연동 도구GitHub
설치 방법 보기

이럴 때 유용합니다

  • Submitting completed changes for review
  • Writing a PR description from commits
  • Creating a draft pull request
  • Checking branches and authentication before submission

포함된 파일(1)

  • SKILL.md6.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Create Pull Request

This skill guides you through creating a well-structured GitHub pull request that follows project conventions and best practices.

Prerequisites Check

Before proceeding, verify the following:

1. Check if gh CLI is installed

gh --version

If not installed, inform the user:

The GitHub CLI (gh) is required but not installed. Please install it:

2. Check if authenticated with GitHub

gh auth status

If not authenticated, guide the user to run gh auth login.

3. Verify clean working directory

git status

If there are uncommitted changes, ask the user whether to:

  • Commit them as part of this PR
  • Stash them temporarily
  • Discard them (with caution)

Gather Context

1. Identify the current branch

git branch --show-current

Ensure you're not on main or master. If so, ask the user to create or switch to a feature branch.

2. Find the base branch

git remote show origin | grep "HEAD branch"

This is typically main or master.

3. Analyze recent commits relevant to this PR

git log origin/main..HEAD --oneline --no-decorate

Review these commits to understand:

  • What changes are being introduced
  • The scope of the PR (single feature/fix or multiple changes)
  • Whether commits should be squashed or reorganized

4. Review the diff

git diff origin/main..HEAD --stat

This shows which files changed and helps identify the type of change.

Information Gathering

Before creating the PR, you need the following information. Check if it can be inferred from:

  • Commit messages
  • Branch name (e.g., fix/issue-123, feature/new-login)
  • Changed files and their content

If any critical information is missing, use ask_followup_question to ask the user:

Required Information

  1. Related Issue Number: Look for patterns like #123, fixes #123, or closes #123 in commit messages
  2. Description: What problem does this solve? Why were these changes made?
  3. Type of Change: Bug fix, new feature, breaking change, refactor, cosmetic, documentation, or workflow
  4. Test Procedure: How was this tested? What could break?

Example clarifying question

If the issue number is not found:

I couldn't find a related issue number in the commit messages or branch name. What GitHub issue does this PR address? (Enter the issue number, e.g., "123" or "N/A" for small fixes)

Git Best Practices

Before creating the PR, consider these best practices:

Commit Hygiene

  1. Atomic commits: Each commit should represent a single logical change
  2. Clear commit messages: Follow conventional commit format when possible
  3. No merge commits: Prefer rebasing over merging to keep history clean

Branch Management

  1. Rebase on latest main (if needed):

    git fetch origin
    git rebase origin/main
    
  2. Squash if appropriate: If there are many small "WIP" commits, consider interactive rebase:

    git rebase -i origin/main
    

    Only suggest this if commits appear messy and the user is comfortable with rebasing.

Push Changes

Ensure all commits are pushed:

git push origin HEAD

If the branch was rebased, you may need:

git push origin HEAD --force-with-lease

Create the Pull Request

IMPORTANT: Read and use the PR template at .github/pull_request_template.md. The PR body format must strictly match the template structure. Do not deviate from the template format.

When filling out the template:

  • Replace #XXXX with the actual issue number, or keep as #XXXX if no issue exists (for small fixes)
  • Fill in all sections with relevant information gathered from commits and context
  • Mark the appropriate "Type of Change" checkbox(es)
  • Complete the "Pre-flight Checklist" items that apply

Create PR with gh CLI

Use a temporary file for the PR body to avoid shell escaping issues, newline problems, and other command-line flakiness:

  1. Write the PR body to a temporary file:

    /tmp/pr-body.md
    
  2. Create the PR using the file:

    gh pr create --title "PR_TITLE" --body-file /tmp/pr-body.md --base main
    
  3. Clean up the temporary file:

    rm /tmp/pr-body.md
    

For draft PRs:

gh pr create --title "PR_TITLE" --body-file /tmp/pr-body.md --base main --draft

Why use a file? Passing complex markdown with newlines, special characters, and checkboxes directly via --body is error-prone. The --body-file flag handles all content reliably.

Post-Creation

After creating the PR:

  1. Display the PR URL so the user can review it
  2. Remind about CI checks: Tests and linting will run automatically
  3. Suggest next steps:
    • Add reviewers if needed: gh pr edit --add-reviewer USERNAME
    • Add labels if needed: gh pr edit --add-label "bug"

Error Handling

Common Issues

  1. No commits ahead of main: The branch has no changes to submit

    • Ask if the user meant to work on a different branch
  2. Branch not pushed: Remote doesn't have the branch

    • Push the branch first: git push -u origin HEAD
  3. PR already exists: A PR for this branch already exists

    • Show the existing PR: gh pr view
    • Ask if they want to update it instead
  4. Merge conflicts: Branch conflicts with base

    • Guide user through resolving conflicts or rebasing

Summary Checklist

Before finalizing, ensure:

  • gh CLI is installed and authenticated
  • Working directory is clean
  • All commits are pushed
  • Branch is up-to-date with base branch
  • Related issue number is identified, or placeholder is used
  • PR description follows the template exactly
  • Appropriate type of change is selected
  • Pre-flight checklist items are addressed

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

cline-sdk

무료

Build AI agents with Cline SDK using guidance on choosing APIs, adding custom tools, saving sessions, and handling live events. References also cover model providers, scheduled runs, multi-agent coordination, and production deployment.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Build an AI agent with custom tools
  • Choose an API for persistent sessions
  • Configure model providers and live event handling
cline/cline7.1만2026년 10월 19일 업데이트

Prepare a one-time What's new dialog for the desktop app when several meaningful features have accumulated. The skill selects changelog highlights, drafts concise copy, updates the content file, and guides testing and in-app previews.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Decide whether accumulated features warrant an announcement
  • Draft concise copy for three or four feature highlights
  • Add a new What's new content entry
cline/cline7.1만2026년 10월 19일 업데이트

opentui

무료

Build interactive terminal screens with OpenTUI using its core API, React, or Solid. Guides framework selection, components, layout, keyboard input, animations, and testing, with references for project setup and troubleshooting.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Starting an OpenTUI project with React or Solid
  • Building terminal forms and selection menus
  • Adapting layouts to terminal dimensions
cline/cline7.1만2026년 10월 19일 업데이트

Prepare Cline CLI releases for npm, the package registry, by reviewing SDK changes, drafting release notes, updating versions and changelogs, and creating release tags. Guides checks and publication through GitHub Actions or an authenticated local machine.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Drafting CLI release notes from relevant changes
  • Updating the CLI version and changelog
  • Publishing a tagged release through GitHub Actions
cline/cline7.1만2026년 10월 19일 업데이트

Prepare Cline desktop releases for stable, beta, or nightly testing. Coordinate release notes, matching version files, tags, and a GitHub Actions workflow that builds signed installers and manages automatic update feeds for release channels.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Preparing a stable desktop release
  • Publishing a beta alongside the stable app
  • Creating signed nightly test installers
cline/cline7.1만2026년 10월 19일 업데이트

Prepare and publish releases of the Cline VS Code extension. Follow separate paths for stable, nightly, and emergency legacy releases, covering version selection, release notes, approval steps, packaged builds, and checks after publication.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Preparing a stable extension release
  • Creating a manual nightly build
  • Publishing an emergency legacy hotfix
cline/cline7.1만2026년 10월 19일 업데이트

cline의 스킬 모두 보기

이 스킬의 문제 신고