Guide for creating, updating, and following up on pull requests in the Coder repository. Use when asked to open a PR, update a PR, rewrite a PR description, or follow up on CI/check failures.
Use this skill when asked to:
Use the canonical docs for shared conventions and validation guidance:
.claude/docs/PR_STYLE_GUIDE.mdAGENTS.md (Essential Commands and
Git Hooks sections)Check for an existing PR before creating a new one:
gh pr list --head "$(git branch --show-current)" --author @me --json number --jq '.[0].number // empty'
If that returns a number, update that PR. If it returns empty output, create a new one.
Check you are not on main. If the current branch is main or master,
create a feature branch before doing PR work.
Default to draft. Use gh pr create --draft unless the user explicitly
asks for ready-for-review.
Keep description aligned with the full diff. Re-read the diff against the base branch before writing or updating the title and body. Describe the entire PR diff, not just the last commit.
Never auto-merge. Do not merge or mark ready for review unless the user explicitly asks.
Never push to main or master.
Always watch CI checks after pushing. Do not push and walk away.
After pushing:
gh pr checks <PR_NUMBER> --watch.gh pr view <PR_NUMBER> --json statusCheckRollup for programmatic check
status.If checks fail:
gh pr checks output.gh run view <run-id> --log-failed.make pre-commit.origin/main or origin/master.