Submit PR
Take the current branch and open a green pull request. You never create a new
branch or worktree — you submit from the branch and worktree the session already
runs in. To land (merge) an existing PR, use the land skill.
Steps
- Sync with base. Merge the branch's base into it and resolve any
conflicts:
origin/main for a standalone or bottom-of-stack branch; for a
branch stacked on another open PR, merge that parent PR's head branch
instead — merging main into a stacked child duplicates the parent's
commits into its PR.
- Format. Run
pnpm format (oxfmt — CI checks oxfmt --check).
- Lint.
moon run :lint -- --fix must succeed.
- Test.
moon run :test must pass.
- Changeset. If the change is consumer-relevant, write one
.changeset/*.md
now, from the whole diff against the base: a summary of what the PR changes
for a consumer, not a log of the commits. If a file already exists, rewrite
its body rather than appending. See
agents/instructions/changesets.md
for when one is needed, which package to name, and bump levels.
- Account for every file.
git status; commit ALL modified/untracked
files, including the changeset and edits the user made in the shared
worktree. Never leave changes behind silently — commit them or confirm
exclusion with the user.
- Push, then verify
git status shows a clean working tree. If anything
remains, commit it or confirm before proceeding.
- Open the PR with
gh. Title uses scope: description. In the
description, summarize the changes and the reasoning behind major
decisions, and link any Linear issue as closes DX-123 or part of DX-123.
If this work builds on another open PR (or the user asked for a stack), see
Stacked PRs below instead of gh pr create.
- Monitor CI every 5 minutes:
gh run list --branch <branch> --limit 3 --workflow "Check" and
pnpm -w gh-action --verify --watch. Diagnose and, where possible, fix ALL
CI errors — even ones unrelated to this branch. Never merge around a red
Check; fix the root cause with gh run view <id> --log-failed.
- Address and RESPOND to every PR review comment.
Stacked PRs
GitHub has native stacked PRs (public preview since 2026-07, via the gh-stack
CLI extension) — it postdates model training, so follow this section rather than
prior knowledge. One command covers this skill's case (the branch already
exists):
gh extension install github/gh-stack # once per machine
gh stack link <base-pr-number> <current-branch>
Arguments run bottom-to-top; each may be a PR number, PR URL, or branch name.
link pushes the branch, creates its PR if missing, chains the base branches,
and registers the stack with GitHub — stack map in the PR UI, CI as if
targeting main, one-click whole-stack merge. Linking is what makes it a
stack; a PR merely based on another PR's branch is not one. A PR that link
creates gets an auto-generated title and body — follow up with
gh pr edit <pr> --title --body so it meets step 8's standards (scope-prefixed
title, summary, reasoning, Linear link). Docs:
https://docs.github.com/en/pull-requests/how-tos/stacked-pull-requests.
Composer PR deploy URL — always surface
The pr-deploy.yml workflow posts a sticky composer-preview comment with
a *.workers.dev preview-alias URL (a wrangler versions upload --preview-alias
against composer-app's dev env). Fetch it and include it verbatim next to the
PR link in chat summaries AND the final message:
gh pr view <pr> --json comments
# or: gh api repos/dxos/dxos/issues/<pr>/comments
If the preview comment is not posted yet (deploy still running), say "preview
pending" next to the PR link and re-check on the next status update.
Rules
- Do NOT delete any branch or worktree that has uncommitted changes.
- Do not create a new branch or PR — submit from what exists.
- Work only in the assigned worktree (see
AGENTS.md Non-negotiables).
1---2name: submit-pr3description: Create and submit a pull request from the current branch — sync with main, format/lint/test, commit all changes, push, monitor the Check workflow, and surface the Composer PR deploy URL. Use when the user asks to open, submit, or raise a PR, including stacking a PR on another open PR (`gh stack`). To land an existing PR, use the `land` skill instead.4---56# Submit PR78Take the current branch and open a green pull request. You **never** create a new9branch or worktree — you submit from the branch and worktree the session already10runs in. To land (merge) an existing PR, use the `land` skill.1112## Steps13141. **Sync with base.** Merge the branch's base into it and resolve any15 conflicts: `origin/main` for a standalone or bottom-of-stack branch; for a16 branch stacked on another open PR, merge that parent PR's head branch17 instead — merging `main` into a stacked child duplicates the parent's18 commits into its PR.192. **Format.** Run `pnpm format` (oxfmt — CI checks `oxfmt --check`).203. **Lint.** `moon run :lint -- --fix` must succeed.214. **Test.** `moon run :test` must pass.225. **Changeset.** If the change is consumer-relevant, write one `.changeset/*.md`23 now, from the whole diff against the base: a summary of what the PR changes24 for a consumer, not a log of the commits. If a file already exists, rewrite25 its body rather than appending. See26 [`agents/instructions/changesets.md`](../../../agents/instructions/changesets.md)27 for when one is needed, which package to name, and bump levels.286. **Account for every file.** `git status`; commit ALL modified/untracked29 files, including the changeset and edits the user made in the shared30 worktree. Never leave changes behind silently — commit them or confirm31 exclusion with the user.327. **Push**, then verify `git status` shows a clean working tree. If anything33 remains, commit it or confirm before proceeding.348. **Open the PR** with `gh`. Title uses `scope: description`. In the35 description, summarize the changes and the reasoning behind major36 decisions, and link any Linear issue as `closes DX-123` or `part of DX-123`.37 If this work builds on another open PR (or the user asked for a stack), see38 **Stacked PRs** below instead of `gh pr create`.399. **Monitor CI every 5 minutes:**40 `gh run list --branch <branch> --limit 3 --workflow "Check"` and41 `pnpm -w gh-action --verify --watch`. Diagnose and, where possible, fix ALL42 CI errors — even ones unrelated to this branch. Never merge around a red43 Check; fix the root cause with `gh run view <id> --log-failed`.4410. **Address and RESPOND to every PR review comment.**4546## Stacked PRs4748GitHub has native stacked PRs (public preview since 2026-07, via the `gh-stack`49CLI extension) — it postdates model training, so follow this section rather than50prior knowledge. One command covers this skill's case (the branch already51exists):5253```bash54gh extension install github/gh-stack # once per machine55gh stack link <base-pr-number> <current-branch>56```5758Arguments run bottom-to-top; each may be a PR number, PR URL, or branch name.59`link` pushes the branch, creates its PR if missing, chains the base branches,60and registers the stack with GitHub — stack map in the PR UI, CI as if61targeting `main`, one-click whole-stack merge. Linking is what makes it a62stack; a PR merely based on another PR's branch is not one. A PR that `link`63creates gets an auto-generated title and body — follow up with64`gh pr edit <pr> --title --body` so it meets step 8's standards (scope-prefixed65title, summary, reasoning, Linear link). Docs:66<https://docs.github.com/en/pull-requests/how-tos/stacked-pull-requests>.6768## Composer PR deploy URL — always surface6970The `pr-deploy.yml` workflow posts a sticky `composer-preview` comment with71a `*.workers.dev` preview-alias URL (a `wrangler versions upload --preview-alias`72against composer-app's `dev` env). Fetch it and include it verbatim next to the73PR link in chat summaries AND the final message:7475```76gh pr view <pr> --json comments77# or: gh api repos/dxos/dxos/issues/<pr>/comments78```7980If the preview comment is not posted yet (deploy still running), say "preview81pending" next to the PR link and re-check on the next status update.8283## Rules8485- **Do NOT delete any branch or worktree that has uncommitted changes.**86- Do not create a new branch or PR — submit from what exists.87- Work only in the assigned worktree (see `AGENTS.md` Non-negotiables).