Fix issues/tests and create a new pull request
Fixes failing tests and creates a pull request with the changes.
/plugin marketplace add duyet/claude-plugins/plugin install fix@duyet-claude-pluginsFix any failing tests or issues on the current branch, commit the fixes, and create a new pull request.
/fix:and-create-pr
/fix:and-create-pr
<optional: PR title or description>
<optional: target base branch>
# Current branch
!`git branch --show-current`
# Default branch (usually main or master)
!`git remote show origin | grep 'HEAD branch' | cut -d' ' -f5`
# Uncommitted changes
!`git status --short`
# Commits ahead of base
!`git log origin/$(git remote show origin | grep 'HEAD branch' | cut -d' ' -f5)..HEAD --oneline 2>/dev/null || echo "Branch not pushed yet"`
Run project tests and checks:
pytest, ruff, mypynpm test, npm run lint, npm run type-checkcargo test, cargo clippygo test ./..., golintFor each failure:
Parallel execution for complex issues:
Main Agent (Coordinator)
├── Senior Agent 1: Test fixes
├── Senior Agent 2: Lint/type fixes
└── Main Agent: Commit & PR creation
If fixes were applied:
git add .
git commit -m "fix: resolve test failures and linting issues
Co-Authored-By: duyetbot <duyetbot@users.noreply.github.com>"
Push branch to remote:
git push -u origin [BRANCH_NAME]
Create PR with generated summary:
gh pr create --title "[TITLE]" --body "$(cat <<'EOF'
## Summary
[Auto-generated bullet points based on commits]
## Changes
[List of files modified with brief descriptions]
## Test Plan
- [ ] All tests passing locally
- [ ] CI checks expected to pass
- [ ] Ready for review
---
Generated with Claude Code
EOF
)"
Based on commits and changes:
feat(scope): for new featuresfix(scope): for bug fixesrefactor(scope): for code improvementsdocs(scope): for documentation━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Pre-flight Checks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Branch: feature/add-auth
✅ Base: main
✅ Commits ahead: 3
⚠️ Uncommitted changes: 2 files
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Running Tests & Checks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❌ pytest: 2 failures
✅ ruff: passed
✅ mypy: passed
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Fixing Issues
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Fixed test_auth_login assertion
✅ Fixed test_auth_logout mock
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Creating Pull Request
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Changes committed
✅ Pushed to origin/feature/add-auth
✅ PR created: #456
PR #456: feat(auth): add user authentication
URL: https://github.com/user/repo/pull/456
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
--draft in arguments for draft PR--reviewer @user to request reviewgh) authenticated