git-pr-helper
БесплатноБез исполняемых скриптовНе проверенGit workflow assistant for pull request creation, branch management, and merge coordination. Use when creating PRs, merging branches, resolving conflicts, or…
Об этом скилле
Git PR Helper
Expert at managing git workflows for pull requests, merges, and branch management with a focus on safety, quality, and best practices.
Core Mission
Assist with pull request creation, branch management, merge coordination, and conflict resolution while ensuring code quality and preventing data loss.
When to Use This Skill
Use this skill when:
- Creating a pull request from a feature branch
- Merging branches (feature → main/master)
- Resolving merge conflicts
- Cleaning up old session or feature branches
- Generating PR descriptions from commits
- Checking if work is ready to merge
- Recovering from git mistakes
Do NOT use this skill for:
- Preventing file deletion (use git hooks + CLAUDE.md instead)
- Creating session branches at workflow start (use CLAUDE.md guidance)
- Enforcing branch policies (use git hooks instead)
Skill Capabilities
1. Pull Request Creation
Purpose: Create high-quality pull requests with comprehensive descriptions
Create PR with Generated Description
To create a PR:
Verify we're on a feature branch:
CURRENT_BRANCH=$(git branch --show-current) if [ "$CURRENT_BRANCH" = "main" ] || [ "$CURRENT_BRANCH" = "master" ]; then echo "❌ ERROR: Cannot create PR from main/master branch" exit 1 fi echo "✓ Current branch: $CURRENT_BRANCH"Check git status is clean:
if [ -n "$(git status --porcelain)" ]; then echo "⚠️ WARNING: Uncommitted changes detected" git status --short echo "" echo "Commit these changes before creating PR? (y/n)" # Ask user via AskUserQuestion tool else echo "✓ Working tree clean" fiDetermine base branch:
# Try to detect default branch BASE_BRANCH=$(git remote show origin 2>/dev/null | grep 'HEAD branch' | cut -d' ' -f5) # Fallback to checking what exists if [ -z "$BASE_BRANCH" ]; then if git show-ref --verify --quiet refs/heads/main; then BASE_BRANCH="main" elif git show-ref --verify --quiet refs/heads/master; then BASE_BRANCH="master" else echo "⚠️ Cannot detect base branch. Please specify manually." fi fi echo "Base branch: $BASE_BRANCH"Get all commits on this branch:
# Get commit history since branch diverged from base git log $BASE_BRANCH..HEAD --oneline # Get detailed commit info git log $BASE_BRANCH..HEAD --format="%h %s%n%b" --reverseGet diff summary:
# File changes summary git diff $BASE_BRANCH...HEAD --stat # List changed files git diff $BASE_BRANCH...HEAD --name-onlyGenerate PR description:
Analyze commits and changes to create:
## Summary - [Brief bullet points of main changes] - [Focus on WHY, not WHAT] - [User-facing impact] ## Changes Made - [Detailed technical changes] - [Components affected] - [API changes if applicable] ## Testing - [ ] Unit tests added/updated - [ ] Manual testing completed - [ ] Edge cases considered - [ ] Documentation updated ## Related Issues Closes #[issue-number] (if applicable) ## Notes for Reviewers [Any context reviewers should know] [Areas needing special attention]Check if remote tracking branch exists:
if git rev-parse --verify --quiet origin/$CURRENT_BRANCH >/dev/null 2>&1; then echo "✓ Remote branch exists" else echo "⚠️ Remote branch does not exist. Need to push first." echo "Push now? (y/n)" # If yes: git push -u origin $CURRENT_BRANCH fiCreate PR using GitHub CLI:
gh pr create \ --title "[Generated title from commits]" \ --body "$(cat <<'EOF' [Generated PR description] EOF )" \ --base "$BASE_BRANCH" \ --head "$CURRENT_BRANCH"Update CLAUDE-activeContext.md (if exists):
if [ -f CLAUDE-activeContext.md ]; then # Add PR link to active context PR_URL=$(gh pr view --json url -q .url) echo "PR created: $PR_URL" >> CLAUDE-activeContext.md fi
Generate PR Description Only
To generate a PR description without creating the PR:
- Follow steps 1-6 above
- Output the generated description for user review
- Ask if user wants to create PR with this description
2. Merge Coordination
Purpose: Safely merge branches with conflict detection and resolution guidance
Check Merge Readiness
To check if branch is ready to merge:
echo "=== MERGE READINESS CHECK ==="
echo ""
# 1. Check current branch
CURRENT_BRANCH=$(git branch --show-current)
BASE_BRANCH=${BASE_BRANCH:-main}
if [ "$CURRENT_BRANCH" = "$BASE_BRANCH" ]; then
echo "❌ ERROR: Already on base branch $BASE_BRANCH"
exit 1
fi
echo "✓ Feature branch: $CURRENT_BRANCH"
echo ""
# 2. Check for uncommitted changes
if
Установить git-pr-helper в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteEditGlobGrepFAQ
Что делает скилл git-pr-helper?
Git workflow assistant for pull request creation, branch management, and merge coordination. Use when creating PRs, merging branches, resolving conflicts, or cleaning up session branches. Provides intelligent PR descriptions, safety checks, and workflow guidance.
Как установить скилл git-pr-helper?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл git-pr-helper запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic