Loading...
Loading...
Create or update a GitHub pull request with a standardized template. Use when the user wants to open a PR, create a pull request, update a PR description, submit changes, or push a PR.
npx skill4agent add clhbid/agent-context open-prwriting-leangh pr view --json number,title,body,urlmaingh pr view --json baseRefName,headRefName
git fetch origin --prune
git diff --stat "origin/<baseRefName>...HEAD"git fetch origin --prune
git symbolic-ref refs/remotes/origin/HEAD
git diff --stat "origin/<defaultBranch>...HEAD"{issue_number}-{description}54-return-to-after-login# Get current branch name
git branch --show-current
# Default to this repo; override when the issue lives elsewhere
ISSUE_REPO="$(gh repo view --json nameWithOwner --jq .nameWithOwner)"
# Fetch issue details
gh issue view <issue_number> --repo "$ISSUE_REPO" --json title,body,url# Check for uncommitted changes (warn user if any)
git status
# Get all commits on this branch (against the *actual* base branch)
git log <base>...HEAD --oneline
# Get the full diff summary against the *actual* base branch
git diff --stat <base>...HEAD
# REQUIRED: Inspect the actual line changes (not just stats)
git diff <base>...HEADOldNameNewNamegit diff --shortstat <base>...HEADissue-trackerwriting-leanReady for Agent{issue_number}: {issue_title}54: Return to after login## Description
- 1-2 bullets: what and why
## Changes
- 2-5 bullets max: user-visible or behavior changes
## How to Test
1. 2-4 steps max
2. Include the single most important edge case
## Deployment Notes
1. OPTIONAL: Only include if there are special deployment steps or risks to call out
2. Flag any tasks that must be done before or after merging (e.g., "Add env var X before merging", "Run data migration Y after merging", "Add a variable to 1Password")
## Related Issues
Closes #<issue_number>Closes owner/repo#N#N# Push branch to remote
git push -u origin HEAD
# Create the PR, against the base resolved in Step 1b
gh pr create --base "<base>" --title "<issue_number>: <issue_title>" --body "$(cat <<'EOF'
## Description
- <1-2 bullets: what/why>
## Changes
- <2-5 bullets max>
## How to Test
1. <2-4 steps max>
## Deployment Notes
1. OPTIONAL: delete this section entirely if there are no special steps or risks
2. Flag any tasks that must be done before or after merging
## Related Issues
Closes #<issue_number>
EOF
)"
# Ask a human to look at it
gh pr edit --add-reviewer <maintainer>--basegh# Push latest changes
git push
# Update PR body
gh pr edit --body "$(cat <<'EOF'
## Description
- <1-2 bullets: what/why>
## Changes
- <2-5 bullets max>
## How to Test
1. <2-4 steps max>
## Deployment Notes
1. OPTIONAL: Only include if there are special deployment steps or risks to call out. If there are none, delete this section entirely.
2. Flag any tasks that must be done before or after merging (e.g., "Add env var X before merging", "Run data migration Y after merging", "Add a variable to 1Password")
## Related Issues
Closes #<issue_number>
EOF
)"gh pr edit --title "<issue_number>: <issue_title>"AGENTS.md