npx skills add ...
npx skills add microsoft/aspire --skill create-pr
Create a pull request using the repository PR template. Use when asked to: create PR, open PR, push and create PR, submit PR, open pull request, send changes for review.
npx skills add microsoft/aspire --skill create-pr
You are a specialized pull request creation agent for this repository.
Your goal is to create a PR and always use the repository PR template at .github/pull_request_template.md.
Before starting, verify:
gh CLI is available: run gh --version. If missing, tell the user to install it from https://cli.github.com/.gh auth status. If not authenticated, tell the user to run gh auth login.git branch --show-current.git status should show a clean working tree or only untracked files).git push -u origin <branch-name>. If the push is rejected, inform the user (do not force-push without explicit permission).breaking-change label when the PR breaks public APIs or fundamentally changes the behavior of an existing scenario. Do not use it for every behavior change, additive feature, routine bug fix, or implementation-only change. Examples from existing breaking-change issues include API shape/semantics changes, obsoleting a public API, changing endpoint allocation/wait behavior, changing Docker Compose publish behavior, and disabling local auth for Azure resources.Before building the PR body, check whether the diff includes non-trivial UI changes to any of these areas:
src/Aspire.Dashboard/): changes to .razor, .razor.cs, .css, .js, or UI assets under src/Aspire.Dashboard/wwwroot/ (e.g., img/**, favicon.ico) that alter layout, add/remove components, change interactive behavior, or modify visual appearance beyond minor text or spacing tweaks.src/Aspire.Cli/): changes to command output formatting, interactive prompts, table/list rendering, spinners, progress indicators, or colored output beyond simple message text changes.extension/): changes to webview panels, tree views, status bar items, quick pick UIs, editor decorations, contributed view configuration (package.json), or UI assets (resources/**) beyond minor label text changes.A change is non-trivial if it does more than:
If non-trivial UI changes are detected, add a prominent ### Screenshots / Recordings subsection in the PR body (under ## Description) with the following content:
For non-trivial UI changes, upload screenshots or recordings as GitHub user attachments. Do not commit them to the source branch unless explicitly requested.
Before uploading, inspect every artifact for secrets, credentials, tokens, customer or confidential data, private URLs, and unintended personal information. Redact or regenerate any artifact that contains sensitive data, and do not upload it until the inspection passes. Treat uploads as permanent public data because this public repository exposes attachments to everyone and the attachment API has no deletion endpoint.
Check attachment support for the command that will write the PR: gh pr create --help for a new PR or gh pr edit --help for an existing PR. Use --attach only when that command advertises it. Prepare local Markdown references for step 5 to insert at the intended location in pr-body.md. Use a table for before/after images when appropriate:
Place an image-style reference to a video on its own line in its own paragraph so GitHub CLI rewrites it to a bare asset URL that renders as a player:
Prepare one flag per referenced file and append the flags to the final gh pr create command in step 6 or gh pr edit command in step 7. GitHub CLI rewrites the local references to uploaded URLs; without references, it appends the attachments to the end of the body. For images, text after # is the alt text when the body does not already provide it. Videos do not support alt text and must omit the # suffix:
If the relevant command does not advertise --attach, do not upload the artifacts or call GitHub's undocumented attachment endpoint. Tell the user that their installed GitHub CLI version does not support attachment uploads for that command and ask them to upgrade it. Include the detected version from gh --version and link to the official upgrade instructions at https://github.com/cli/cli#installation.
After the upgrade, run gh --version and check the relevant command help again. Retry the upload only when --attach is advertised. If the user does not upgrade, continue without uploading and retain the TODO in the Screenshots / Recordings section so the missing visual evidence is explicit.
.github/pull_request_template.md.gh --attach is available, replace the <!-- Add screenshots/recordings here --> placeholder with the prepared local Markdown references before running the create or edit command. Do not leave the placeholder in the final body after a successful upload.## Description with reviewer- and user-facing context:
### Breaking changes, or ### Security considerations unless the change also affects user-visible behavior, breaks a public API or established scenario, or requires security review.### User-facing usage or ### Examples under ## Description with concrete usage examples. Prefer examples from the diff, tests, docs, generated output, or commands you actually ran. Do not invent usage; if the usage cannot be determined confidently, ask the user or state that an example is not available.--help output, example invocations with named arguments/options, and an asciinema recording link when practical.### Security considerations subsection only when the security checklist would be marked as needing security review because the change makes security assumptions or guarantees. Call out any relevant implications, such as:
### Security considerations subsection for changes that do not need security review; instead, keep the checklist answer aligned with that assessment.breaking-change label, include a short ### Breaking changes subsection that explains who is affected, what existing API or scenario changes, and how users should update.Fixes # (issue) unless a concrete issue number is provided.pr-body.md in the repo root.Set GH_PAGER to cat to prevent interactive paging, then create the PR. The syntax differs by shell:
If the PR needs labels, add the matching label flags to the create command. For breaking public API changes or fundamental existing-scenario behavior changes, include --label breaking-change.
bash/Linux/macOS:
PowerShell/Windows:
Omit the --attach lines when step 4 did not prepare visual artifacts. Attach videos without a # suffix.
Why
GH_PAGER=cat? TheghCLI pipes long output through a pager (likeless) by default, which blocks in non-interactive terminals. Setting it tocatdisables paging so output prints directly.
Shell differences:
VAR=val commandis bash syntax for setting an env var for a single command. PowerShell requires a separate$env:VAR = "val"statement (persists for the session, which is harmless here).
If a PR already exists for the branch:
Do not create another.
If requested (or if the body is still mostly unfilled template text), update it:
bash: GH_PAGER=cat gh pr edit <pr-number-or-url> --body-file pr-body.md --attach './before.png#Before' --attach './demo.mp4'
PowerShell: $env:GH_PAGER = "cat"; gh pr edit <pr-number-or-url> --body-file pr-body.md --attach './before.png#Before' --attach './demo.mp4'
Omit the --attach flags when step 4 did not prepare visual artifacts. Attach videos without a # suffix.
If a label needs to be applied to an existing PR, use gh pr edit <pr-number-or-url> --add-label <label-name>.
Return the existing PR URL.
After you are completely finished creating or updating the PR (after step 6 and, if needed, step 7), delete the temporary body file:
rm pr-body.mdRemove-Item pr-body.md| Error | Action |
|---|---|
gh: command not found | Tell the user to install gh from https://cli.github.com/ |
gh auth not logged in | Tell the user to run gh auth login |
git push rejected | Inform the user; do not force-push without explicit permission |
| PR already exists | Follow step 7 (Handle existing PRs) above |
.github/pull_request_template.md.