Use when creating a pull request — defaults to draft PRs, uses repo PR template if available, supports "ready for review" override
86
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillValidation for skill structure
Create a pull request for the current branch. Defaults to draft so the author can review on GitHub before marking ready.
Core principle: Draft by default. The author controls when a PR is ready for review.
# Verify gh CLI is available and authenticated
command -v gh >/dev/null 2>&1 || echo "GitHub CLI (gh) not installed"
gh auth status 2>/dev/null || echo "Not authenticated with gh"
# Detect default branch
base=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
base=${base:-main}
git log "origin/$base..HEAD" --oneline
# Verify branch is pushed
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/nullIf branch is not pushed:
git push -u origin $(git branch --show-current)# Check common template locations
ls .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null
ls .github/PULL_REQUEST_TEMPLATE/ 2>/dev/null
ls docs/PULL_REQUEST_TEMPLATE.md 2>/dev/null
ls PULL_REQUEST_TEMPLATE.md 2>/dev/nullIf template exists: read it, fill out all sections from diff and commit history.
If no template: examine recent merged PRs for conventions (gh pr list --state merged --limit 5).
Default (draft):
gh pr create --draft --title "<title>" --body "<body>"If your human partner explicitly requests "ready for review":
gh pr create --title "<title>" --body "<body>"## Summary
<2-3 bullets of what changed and why>
## Test Plan
- [ ] <verification steps>Your human partner can request a non-draft PR by saying:
In these cases, omit the --draft flag.
main as the base branch — always detect the default branch dynamically; some repos use master, develop, or other names.gh pr create will fail if the branch doesn't exist on the remote.--draft — the default is draft for a reason. Only omit when your human partner explicitly asks.Called by:
References:
/commit command for staging and committing5f1a022
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.