create-pr

hotyanovicha's avatarfrom hotyanovicha

Create a pull request from the current branch with an auto-generated summary. Use when user asks to create a PR, make a pull request, or submit changes.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 8, 2026⬇️1downloads

When & Why to Use This Skill

The 'create-pr' Claude skill automates the end-to-end process of creating pull requests by analyzing branch history and generating professional documentation. It leverages Git and GitHub CLI to push changes, draft concise titles, and produce structured summaries with test plans, significantly reducing manual overhead in the software development lifecycle.

Use Cases

  • Streamlining Feature Submissions: Automatically transition from local coding to a formal pull request with a single command, ensuring all commits are summarized without manual writing.
  • Standardizing PR Documentation: Maintain high-quality repository standards by generating consistent, AI-powered summaries and checklists that help reviewers understand the scope and impact of changes.
  • Automated Workflow Integration: Reduce context switching by handling git pushes and PR creation directly within the chat interface, ideal for developers working in fast-paced CI/CD environments.
namecreate-pr
descriptionCreate a pull request from the current branch with an auto-generated summary. Use when user asks to create a PR, make a pull request, or submit changes.
allowed-toolsBash(git:*), Bash(gh:*), Read, Grep

Create Pull Request

Instructions

  1. Verify current branch state

    git status
    git log origin/main..HEAD --oneline
    git diff origin/main...HEAD
    
  2. Analyze all commits since divergence from main

    • Review ALL commits that will be included (not just the latest)
    • Check file changes across the entire branch
    • Understand the complete scope of changes
  3. Generate PR title and body

    • Title: Concise summary (50 chars max)
    • Body format:
      ## Summary
      - Bullet points covering ALL changes in the branch
      
      ## Test plan
      - [ ] Checklist of verification steps
      - [ ] Manual testing performed
      - [ ] Automated tests added/updated
      
      🤖 Generated with [Claude Code](https://claude.com/claude-code)
      
  4. Push and create PR

    # Push if needed
    git push -u origin HEAD
    
    # Create PR
    gh pr create --title "Title" --body "$(cat <<'EOF'
    [PR body here]
    EOF
    )"
    
  5. Return PR URL to the user

Best Practices

  • Review the FULL git history, not just the last commit
  • Include testing instructions in the test plan
  • Mention breaking changes prominently
  • Link related issues/tickets if mentioned in commits