git-hex-pr-workflow
Complete pull request workflow combining git-hex (local craft) with remote collaboration (GitHub plugin or CLI). This skill should be used when the user wants to prepare, submit, and iterate on a PR with clean commit history. Trigger phrases include: "prepare a PR", "open a pull request", "address review feedback", "update my PR", "clean up commits for PR".
When & Why to Use This Skill
The git-hex-pr-workflow skill provides a comprehensive solution for managing the end-to-end Pull Request lifecycle. It bridges the gap between local commit crafting and remote collaboration by combining git-hex's history manipulation capabilities with GitHub integration. This skill ensures developers can maintain a clean, professional commit history while efficiently handling PR creation, updates, and review iterations.
Use Cases
- Preparing a Professional PR: Use git-hex to rebase, fix up, and organize local commits into a clean history before pushing to a remote repository for team review.
- Addressing Review Feedback: Seamlessly iterate on existing Pull Requests by applying requested changes to specific commits and updating the remote branch with safe force-pushes.
- Streamlined GitHub Collaboration: Automate the creation and management of PRs using the GitHub plugin or CLI, including adding reviewers and responding to comments without leaving the workflow.
- Commit Refactoring: Split large, monolithic commits into smaller, logical units using git-hex-splitCommit to improve code readability and simplify the review process for teammates.
| name | git-hex-pr-workflow |
|---|---|
| description | > |
| Trigger phrases include | "prepare a PR", "open a pull request", "address review |
Git-hex PR Workflow
When to use this Skill
This skill should be used when:
- The user wants to prepare a branch for PR submission with clean history
- The user is iterating on a PR after receiving review feedback
- The user asks about combining git-hex with GitHub/PR workflows
Trigger phrases include: "prepare a PR", "open a PR", "create a pull request", "address PR feedback", "update the PR", "force-push after rebase".
Workflow
Local craft (git-hex) - shape commits before pushing:
- Use
git-hex-getRebasePlanto inspect current history - Use
git-hex-createFixup+git-hex-rebaseWithPlanto clean up - Use
git-hex-splitCommitif commits need to be broken apart
- Use
Push to remote:
git push --force-with-lease(safe force push)
Remote collaboration - work with teammates:
- If the GitHub Plugin is installed: use its tools to create/update PRs, add reviewers, respond to comments
- Otherwise: use GitHub CLI (
gh) commands:gh pr create- create a pull requestgh pr view- view PR detailsgh pr edit- update PR title/body/reviewersgh pr comment- add comments
After review feedback:
- Return to step 1 for more local craft
- Use
git-hex-undoLastif a cleanup went wrong
Tools to prefer
- Local craft: all git-hex tools (see branch-cleanup skill)
- Remote: GitHub plugin tools if installed, otherwise
ghCLI
Key insight
git-hex handles the local craft of shaping commits.
Remote collaboration (via the GitHub Plugin from the Official Claude Plugin Marketplace, or standard gh CLI) handles working with teammates.
Together, they cover the complete pull request lifecycle.