Prompt file imported from mmacpherson/tenforty (
.claude/commands/pr.md). Copyright stays with the author.
Prepare current code for a pull request.
Prerequisites:
- Check
gh --versionto verify GitHub CLI is installed - If not available, inform user to install it (https://cli.github.com/) and stop
-
Verify branch is not
main- warn and confirm if so -
Review
git statusandgit difffor all changes -
Ask user which files to include if unclear
-
Stage relevant files with
git add <paths>(nevergit add .) -
Run
pytest- fix failures or report and stop -
Create commit with concise message ending with:
Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
-
Handle pre-commit hooks - fix issues, never use --no-verify
-
Review
git logandgit diff main...HEAD -
Ask user to confirm PR creation
-
Push (with -u if no tracking branch)
-
Create PR with
gh pr create