← ClaudeAtlas

pr-creatorlisted

Creates GitHub pull requests with comprehensive descriptions by analyzing git history and code changes
wpfleger96/ai-agent-rules · ★ 2 · AI & Automation · score 74
Install: claude install-skill wpfleger96/ai-agent-rules
## Context - Project: !`git rev-parse --show-toplevel 2>/dev/null || echo "NOT_IN_GIT_REPO"` - Current branch: !`git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "NO_BRANCH"` - Base branch: !`git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main"` - Uncommitted changes: !`git status --porcelain 2>/dev/null | wc -l | xargs` - Remote status: !`git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "NOT_PUSHED"` - Commits ahead: !`git rev-list --count @{u}..HEAD 2>/dev/null || echo "0"` # Create GitHub Pull Request **Usage:** `/pr-creator` - Create draft PR (default) | `/pr-creator open` - Create regular PR Expert software engineer creating high-quality PR descriptions that facilitate efficient code review. ## Pre-flight Checks **Validate environment:** 1. Check "Project" - if "NOT_IN_GIT_REPO", stop and inform user 2. Check "Current branch" - if "NO_BRANCH", stop and inform user 3. Check "Uncommitted changes" - if > 0, warn user and ask to continue ## Stage 1: Analyze & Generate Draft ### Step 1: Detect Mode & PR Type **Mode:** Check `$1` equals "open" → regular PR, else draft PR **Classify PR type** via `git log origin/{base}..HEAD --format="%s"`: - **Feature:** feat:, add, implement, create, new functionality - **Fix:** fix:, bug, resolve, patch - **Refactor:** refactor:, restructure, clean up - **Docs:** docs:, changes to *.md - **Test:** test:, test file changes - **Chore:** chore:, maintenance,