create-pr
21
总安装量
4
周安装量
#17619
全站排名
安装命令
npx skills add https://github.com/yonatangross/skillforge-claude-plugin --skill create-pr
Agent 安装分布
claude-code
3
opencode
2
antigravity
2
windsurf
1
trae
1
Skill 文档
Create Pull Request
Comprehensive PR creation with validation. All output goes directly to GitHub PR.
Quick Start
/create-pr
Workflow
Phase 1: Pre-Flight Checks
# Verify branch
BRANCH=$(git branch --show-current)
if [[ "$BRANCH" == "dev" || "$BRANCH" == "main" ]]; then
echo "Cannot create PR from dev/main. Create a feature branch first."
exit 1
fi
# Check for uncommitted changes
if [[ -n $(git status --porcelain) ]]; then
echo "Uncommitted changes detected. Commit or stash first."
exit 1
fi
# Push branch if needed
git fetch origin
if ! git rev-parse --verify origin/$BRANCH &>/dev/null; then
git push -u origin $BRANCH
fi
Phase 2: Run Local Validation
# Backend
cd backend
poetry run ruff format --check app/
poetry run ruff check app/
poetry run pytest tests/unit/ -v --tb=short -x
# Frontend
cd ../frontend
npm run lint && npm run typecheck
Phase 3: Gather Context
BRANCH=$(git branch --show-current)
ISSUE=$(echo $BRANCH | grep -oE '[0-9]+' | head -1)
git log --oneline dev..HEAD
git diff dev...HEAD --stat
Phase 4: Create PR
TYPE="feat" # Determine: feat/fix/refactor/docs/test/chore
gh pr create --base dev \
--title "$TYPE(#$ISSUE): Brief description" \
--body "## Summary
[1-2 sentence description]
## Changes
- [Change 1]
- [Change 2]
## Test Plan
- [x] Unit tests pass
- [x] Lint/type checks pass
Closes #$ISSUE
---
Generated with [Claude Code](https://claude.com/claude-code)"
Phase 5: Verify
PR_URL=$(gh pr view --json url -q .url)
echo "PR created: $PR_URL"
gh pr view --web
Rules
- NO junk files – Don’t create files in repo root
- Run validation locally – Don’t spawn agents for lint/test
- All content goes to GitHub – PR body via
gh pr create --body - Keep it simple – One command to create PR
Agent Usage
Only use Task agents for:
- Complex code analysis requiring multiple files
- Security review of sensitive changes
- Architecture review for large refactors
Related Skills
- commit: Create commits before PRs
- review-pr: Review PRs after creation