microsoft/pr-writer
Prepare and publish SwiftStreamingMarkdown pull requests end-to-end: generate PR description, commit changes, create/push branch, and open a PR when needed.
npx skills add https://github.com/microsoft/SwiftStreamingMarkdown --skill pr-writer
Prepare pull requests end-to-end by generating the PR description and handling the publish flow (commit -> branch -> push -> PR creation when needed).
> [!IMPORTANT]
> If the current branch already has an open PR, always ask the user before doing anything else whether the new work should (a) be pushed as additional commits to the existing PR, or (b) go on a new branch (off the appropriate base, usually main) as a separate PR.
>
> Never assume the user wants to extend the open PR, even if the new work feels related. Scope, review timing, and merge-queue considerations are the user's call. Do not commit, branch, or push until the user has answered.
git status.gh pr view --json number,url,headRefName,baseRefName,statemain) in step 4 below before any commit..github/pull_request_template.md).Co-authored-by: Copilot <[email protected]>main), create a feature branch with a hyphenated descriptive name.git push -u origin <branch>git push --force or git push --force-with-lease under any circumstance. To update a PR, always add a new commit on top — never rewrite, amend, or squash already-pushed history. If the push is rejected as non-fast-forward, stop and ask the user; do not "fix" it with force.gh pr create --title "<title>" --body "<body>" --base main --head <branch>gh pr edit <PR_NUMBER> --title "<title>" --body "<body>"gh pr edit. If "new branch": create a fresh branch off main and run the normal flow there.git status/diff as the canonical change set, apply temp-file filtering, then proceed with normal commit/push/PR flow.This repo uses hyphenated descriptive branch names (no username prefix):
citation-config
citation-config-followup
configurability-followup
style-configurability
text-fonts-refactor
latex-configurability
Use a clear, sentence-case description of the change. No [TAG] prefixes, no ticket IDs, no conventional-commit prefixes are required.
Examples (from recent merged PRs):
Convert CitationCoder to public Hashable struct on CitationConfigClean up InlineCitationConstants and merge citation predicatesAdd CitationConfig to MarkdownRenderConfig; remove dead Typography propsStyle folder; UIFont inline link/code; optional letterSpacing/lineHeightIntroduce TextFonts struct and decouple style config from Typography enumThe repo template (.github/pull_request_template.md) has three sections plus an OSS-readiness checklist:
## Summary
<!-- What changed and why? -->
## Validation
<!-- List the checks you ran, for example: make test && make build -->
## OSS readiness
- [ ] No secrets, internal URLs, private identifiers, or product-only service names were added.
- [ ] Public docs, fixtures, or notices were updated if behavior or dependencies changed.
- [ ] Third-party dependency changes (adds, removes, version bumps) are intentional and reviewed.
- [ ] Streaming/incomplete markdown behavior remains covered by fixtures or tests.
Closes #<issue-number> for issues this PR fully resolvesFixes #<issue-number> for bug-fix PRsRefs #<issue-number> when the PR is related but does not close the issue (for stacked work, partial progress, or follow-ups)owner/repo#<number> form when referencing an issue in a different repository.gh issue create and reference it. Do not open a PR without a linked issue unless the user explicitly waives this (e.g. for trivial docs/typo fixes).make testmake build-sampleswift build / swift test for SwiftPM-only checkssnapshot-tests skill).(no dependency changes).## Screenshots section when UI/rendering changes warrant it.<img width="568" height="1084" alt="..." src="..." />## Summary
Convert `CitationCoder` from an internal helper into a public `Hashable` struct on `CitationConfig`, so external consumers can construct and compare their own coders. Default values are unchanged behaviorally.
- Promote `CitationCoder` to `public struct: Hashable`
- Expose it on `CitationConfig` instead of the typography layer
- Update sample fixtures and tests to construct configs explicitly
Closes #42
## Validation
- `xcodebuild test -scheme SwiftStreamingMarkdown -destination "platform=iOS Simulator,OS=26.4.1,name=iPhone 17" -skipMacroValidation` — all tests pass
- `xcodebuild build` on the sample app — succeeds
- Verified citation rendering visually in the sample app's multi-paragraph demo
## OSS readiness
- [x] No secrets, internal URLs, private identifiers, or product-only service names were added.
- [x] Public docs, fixtures, or notices were updated if behavior or dependencies changed.
- [x] Third-party dependency changes (adds, removes, version bumps) are intentional and reviewed. (no dependency changes)
- [x] Streaming/incomplete markdown behavior remains covered by fixtures or tests.
Return two parts:
1) Publication summary:
2) Complete PR body, following the template exactly:
## Summary
<!-- What changed and why? -->
## Validation
<!-- List the checks you ran, for example: make test && make build -->
## OSS readiness
- [ ] No secrets, internal URLs, private identifiers, or product-only service names were added.
- [ ] Public docs, fixtures, or notices were updated if behavior or dependencies changed.
- [ ] Third-party dependency changes (adds, removes, version bumps) are intentional and reviewed.
- [ ] Streaming/incomplete markdown behavior remains covered by fixtures or tests.
Closes #N / Fixes #N / Refs #N line. If no issue exists, create one first with gh issue create before opening the PR. The only allowed exception is when the user explicitly waives this requirement.git push --force or git push --force-with-lease, and do not amend, rebase, or squash commits that have already been pushed. To update a PR, always add a new commit on top. If a push is rejected as non-fast-forward, stop and ask the user — do not "resolve" it with force.Take microsoft/pr-writer from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.