pr
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Context
- Current branch: !
git branch --show-current - Default branch candidates: !
git branch -r | grep -E 'origin/(main|master)' - PR for this branch: !
gh pr view --json number,title,url 2>/dev/null || echo "NO_PR"
Your task
Create or update a pull request for the current branch.
Pre-flight checks
- Detect the base branch by running:
git rev-parse --verify origin/main >/dev/null 2>&1 && echo main || echo master. Use this as<base>. - If the current branch is the base branch, stop and tell the user to switch to a feature branch first. Do nothing else.
- Run
git log <base>..HEAD --oneline. If there are no commits ahead of the base branch, stop and tell the user to commit changes first. Do nothing else. - Never run
git addorgit commit. Only manage the PR.