Official agent skill

PR Writer

by microsoft in microsoft/SwiftStreamingMarkdown

Prepare and publish SwiftStreamingMarkdown pull requests end-to-end: generate PR description, commit changes, create/push branch, and open a PR when needed.

OfficialMITAuto-check passedDevelopment

Install PR Writer

skills CLI
$ npx skills add microsoft/SwiftStreamingMarkdown --skill pr-writer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/SwiftStreamingMarkdown pr-writer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/SwiftStreamingMarkdown.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/pr-writer .claude/skills/pr-writer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pr-writer
GitHub stars
378
Token cost
~2.9k tokens
SKILL.md length
1,322 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Prepare and publish SwiftStreamingMarkdown pull requests end-to-end: generate PR description, commit changes, create/push branch, and open a PR when needed.

  • Works in 7 steps: Check repository and PR state → Generate PR description body → Commit current changes → …
  • Tasks that involve Pull requests
  • SKILL.md covers When to Activate, End-to-End Publish Workflow, Partial-State Handling (Some… and Branch Naming Convention, plus 6 more sections
  • Calls git, gh and make

What it does

PR Writer is an agent skill from microsoft/SwiftStreamingMarkdown, published by the product's own GitHub organization. Prepare and publish SwiftStreamingMarkdown pull requests end-to-end: generate PR description, commit changes, create/push branch, and open a PR when needed.

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests. It works with SwiftUI, Swift, iOS and macOS. The repository describes itself as: A performant markdown library for iOS & macOS that supports streaming. The licence is MIT.

When your agent uses it

  • Tasks that involve Pull requests

Example prompts

  • “/pr-writer”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Check repository and PR state
  2. Generate PR description body
  3. Commit current changes
  4. Create or switch to a publish branch
  5. Push branch
  6. Create PR only if one does not already exist
  7. Return publication result

What it can do on your machine

Read from SKILL.md and the folder at commit 95bb755. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • make
    • swift

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

PR Writer loads about 2.9k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 1,322 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/SwiftStreamingMarkdown at commit 95bb755, republished under its MIT licence (© microsoft). 1,322 words, ~2,861 tokens.

Download SKILL.mdSave it as .claude/skills/pr-writer/SKILL.md (or your agent's skills folder).
name
pr-writer
description
Prepare and publish SwiftStreamingMarkdown pull requests end-to-end: generate PR description, commit changes, create/push branch, and open a PR when needed.

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).

When to Activate

  • User asks to write, open, or update a PR
  • User asks to commit, push, and open a PR for current branch changes
  • User says "ship this", "publish this", "make a PR", or similar

End-to-End Publish Workflow

[!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.

  1. Check repository and PR state

    • Confirm current branch and dirty working tree using git status.
    • Check if branch already has an open PR:
      • gh pr view --json number,url,headRefName,baseRefName,state
    • If an open PR exists on the current branch, stop and ask the user whether to push to that PR or start a new branch. Wait for the answer before proceeding to any other step. Quote the existing PR's number/title/URL in the question so the user can decide with full context.
    • If the user picks "new branch", create it off the appropriate base (usually main) in step 4 below before any commit.
  2. Generate PR description body

    • Produce the PR body using the template in this skill (mirrors .github/pull_request_template.md).
    • Ensure title is a clear, sentence-case description of the change (see conventions below).
  3. Commit current changes

    • Treat the current branch working tree as source of truth even if prior session history is unavailable.
    • Include both staged and unstaged tracked code/doc/config changes that are relevant to the PR scope.
    • Exclude obvious temporary artifacts (for example root-level screenshots, ad-hoc logs, dumps, tmp/debug files) unless explicitly requested.
    • Stage relevant files and create a commit with a clear message.
    • Include the standard co-author trailer unless the user opts out:
      • Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
    • If there are no changes to commit, skip commit creation and continue.
  4. Create or switch to a publish branch

    • If current branch is a protected/shared branch (for example main), create a feature branch with a hyphenated descriptive name.
    • Otherwise keep using current feature branch.
  5. Push branch

    • Push with upstream tracking:
      • git push -u origin <branch>
    • Never force-push to update a PR. Do not use 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.
  6. Create PR only if one does not already exist

    • If no open PR exists for the branch, create one:
      • gh pr create --title "<title>" --body "<body>" --base main --head <branch>
    • If PR already exists, update body/title as needed instead of creating duplicates.
    • Update existing PR metadata when work is already partially published:
      • gh pr edit <PR_NUMBER> --title "<title>" --body "<body>"
    • If branch and PR already exist and no new commit is needed, run metadata update only.
  7. Return publication result

    • Report commit SHA, branch name, push status, and PR URL.

Partial-State Handling (Some Steps Already Done)

  • Existing branch + existing PR + new code changes:
    • Ask the user first whether the new changes belong on this PR or on a new branch (see the IMPORTANT callout above). If "this PR": commit/push changes, then update PR body/title with gh pr edit. If "new branch": create a fresh branch off main and run the normal flow there.
  • Existing branch + existing PR + no code changes:
    • Skip commit/push and update PR description/title only.
  • Existing branch + no PR:
    • Push branch if needed, then create PR with generated body.
  • No branch/PR yet:
    • Create branch, commit, push, then create PR.
  • Session reset/compaction or new-agent context with unknown edit history:
    • Do not rely on prior agent edit memory.
    • Use the current git status/diff as the canonical change set, apply temp-file filtering, then proceed with normal commit/push/PR flow.

Branch Naming Convention

This repo uses hyphenated descriptive branch names (no username prefix):

text
citation-config
citation-config-followup
configurability-followup
style-configurability
text-fonts-refactor
latex-configurability

PR Title Conventions

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 CitationConfig
  • Clean up InlineCitationConstants and merge citation predicates
  • Add CitationConfig to MarkdownRenderConfig; remove dead Typography props
  • Style folder; UIFont inline link/code; optional letterSpacing/lineHeight
  • Introduce TextFonts struct and decouple style config from Typography enum

PR Template

The repo template (.github/pull_request_template.md) has three sections plus an OSS-readiness checklist:

markdown
## 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.

Template Filling Guidelines

Show full SKILL.md (529 more words)Show less
Summary
  • Lead with what changed and why (one or two sentences).
  • For multi-part changes, use a short bullet list of the concrete pieces (files, types, behaviors).
  • Always reference the related GitHub issue. Every PR must cite the issue it addresses using a closing keyword on its own line so GitHub auto-links and auto-closes it on merge:
    • Closes #<issue-number> for issues this PR fully resolves
    • Fixes #<issue-number> for bug-fix PRs
    • Refs #<issue-number> when the PR is related but does not close the issue (for stacked work, partial progress, or follow-ups)
    • Use the full owner/repo#<number> form when referencing an issue in a different repository.
    • If no issue exists yet, create one first with 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).
  • For large PRs, note scope and any follow-ups at the top.
Validation
  • List the actual commands you ran and their result. Common ones in this repo:
    • make test
    • make build-sample
    • swift build / swift test for SwiftPM-only checks
  • Mention snapshot test runs explicitly when relevant (record vs validate; see the snapshot-tests skill).
  • For UI changes, mention manual verification in the sample app and any VoiceOver/accessibility checks.
  • Brief is fine when no new tests apply: "Existing test suite passes locally."
OSS readiness
  • Tick each box honestly. Leave unchecked items visible so the reviewer can see what still needs attention.
  • If a row genuinely does not apply (for example no dependency change), tick it and append a short note like (no dependency changes).
Screenshots (optional)
  • Not part of the committed template, but add a ## Screenshots section when UI/rendering changes warrant it.
  • Use GitHub's image upload format with explicit dimensions:
    • <img width="568" height="1084" alt="..." src="..." />
  • Light and dark variants are valuable for theme-related changes.

Example PR Body

markdown
## 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.

Output Format

Return two parts:

  1. Publication summary:
  • Commit created/skipped (+ SHA when created)
  • Branch used/created
  • Push result
  • PR action: created or updated
  • PR URL (if available)
  1. Complete PR body, following the template exactly:
markdown
## 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.

Guardrails

  • If the current branch has an open PR, always ask the user whether the new work belongs on that PR or on a new branch — never assume. See the IMPORTANT callout at the top of the workflow.
  • Every PR must reference its GitHub issue in the Summary section using a 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.
  • Never force-push to update a PR. Do not run 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.
  • Do not create duplicate PRs for the same head branch.
  • Keep commit scope limited to intended changes; avoid unrelated files.
  • Do not omit legitimate branch changes only because they were not created in the current agent session.
  • Do not commit secrets, internal-only URLs, or product-confidential identifiers — this is a public OSS repo.

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/pr-writer of microsoft/SwiftStreamingMarkdown.

Open the folder on GitHubat commit 95bb755

Compare with similar skills

PR Writer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PR Writer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR Writer this skillmicrosoft/SwiftStreamingMarkdown378—~2.9kAutomated safety check: PassMIT
Bootstrap iOSRayFernando1337/rayfernando-skills130—~1.1kAutomated safety check: PassApache-2.0
Swift Developmentaiskillstore/marketplace430—~1.8kAutomated safety check: PassNone
Coding Best PracticesKartikLabhshetwar/better-shot2.4k2 repos~1.8kAutomated safety check: PassCustom licence
Prepare PRchattymin/PokeTokenBar505—~1.8kAutomated safety check: PassMIT
Core Data ExpertAvdLee/Core-Data-Agent-Skill314—~1.2kAutomated safety check: PassMIT

Similar skills

  • Bootstrap iOS

    RayFernando1337/rayfernando-skills

    Bootstrap agents for iOS, iPadOS, macOS, Swift, SwiftUI, SwiftData/Core Data, Swift Testing, Xcode build/test/debug, Simulator, App Intents, or XcodeBuildMCP work.

    130 GitHub stars~1.1k tokensUpdated 2 mo ago
    MobileAuto-check passed
  • Swift Development

    aiskillstore/marketplace

    Comprehensive Swift development for building, testing, and deploying iOS/macOS applications.

    430 GitHub stars~1.8k tokensUpdated today
    MobileAuto-check passed
  • Coding Best Practices

    KartikLabhshetwar/better-shot

    Reviews macOS Swift 6+ code for modern idioms, SOLID principles, SwiftData patterns, and concurrency best practices.

    2.4k GitHub starsUsed in 2 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Prepare PR

    chattymin/PokeTokenBar

    Prepare, create, or update a PokeTokenBar pull request with an English Conventional Commits title, the repository PR template, and mandatory images for visible UI changes.

    505 GitHub stars~1.8k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Core Data Expert

    AvdLee/Core-Data-Agent-Skill

    Expert Core Data guidance (iOS/macOS): stack setup, fetch requests & NSFetchedResultsController, saving/merge conflicts, threading & Swift Concurrency, batch operations & persistent history…

    314 GitHub stars~1.2k tokensUpdated 23 days ago
    DevelopmentAuto-check passed
  • Prepare, validate, push, open, monitor, and merge paired pull requests across the public AetherKiri repository and private AetherInternal package without publishing private source or unrelated…

    149 GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed

More from microsoft/SwiftStreamingMarkdown

  • Snapshot Tests

    microsoft/SwiftStreamingMarkdown

    Official

    Record and validate swift-snapshot-testing snapshots in the SwiftStreamingMarkdown package: regenerate reference PNGs, run snapshot tests, and diff failed snapshots.

    378 GitHub stars~2.2k tokensUpdated 13 days ago
    Auto-check passed

Categories

Questions about PR Writer

What does PR Writer do?

Prepare and publish SwiftStreamingMarkdown pull requests end-to-end: generate PR description, commit changes, create/push branch, and open a PR when needed. PR Writer is an agent skill from microsoft/SwiftStreamingMarkdown, published by the product's own GitHub organization. Prepare and publish SwiftStreamingMarkdown pull requests end-to-end: generate PR description, commit changes, create/push branch, and open a PR when needed.

When should I use PR Writer?

PR Writer fits situations like: tasks that involve Pull requests.

How do I install PR Writer in Claude Code?

Run `npx skills add microsoft/SwiftStreamingMarkdown --skill pr-writer -a claude-code`. Or copy the skill folder (.agents/skills/pr-writer in microsoft/SwiftStreamingMarkdown) into .claude/skills/pr-writer in your project. Claude Code loads it when a task matches its description.

How do I install PR Writer in Codex?

Run `npx skills add microsoft/SwiftStreamingMarkdown --skill pr-writer -a codex`. Or copy the skill folder (.agents/skills/pr-writer in microsoft/SwiftStreamingMarkdown) into .agents/skills/pr-writer in your project. Codex loads it when a task matches its description.

Can I use PR Writer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/SwiftStreamingMarkdown --skill pr-writer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr-writer, .gemini/skills/pr-writer, .github/skills/pr-writer and .opencode/skills/pr-writer in your project.

What does PR Writer need to run?

Going by SKILL.md and its folder, PR Writer needs the command-line tools its instructions call (git, gh, make and swift).

Does PR Writer access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is PR Writer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does PR Writer use?

PR Writer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR Writer use?

About 2.9k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PR Writer?

Skills that share tags, products or a category with PR Writer: Bootstrap iOS (RayFernando1337/rayfernando-skills, 130 stars), Swift Development (aiskillstore/marketplace, 430 stars), Coding Best Practices (KartikLabhshetwar/better-shot, 2.4k stars) and Prepare PR (chattymin/PokeTokenBar, 505 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR Writer?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/SwiftStreamingMarkdown, which has 378 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 25, 2026.

Source: microsoft/SwiftStreamingMarkdown on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.