Skip to content
Back to skills

Pull Request

ASecurity

The standard for a pull request in a .NET repo — title format, required body sections, size rule, pre-PR checks, and how to open it on GitHub (gh) or Bitbucket Cloud (API with reviewers and delete-source-branch).

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 1, 2026
ai-agentsrustbashgitapi

Works with

  • api

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add zdanovichnick/dotnet-pilot --skill pull-request --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pull Request?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pull Request
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/zdanovichnick-pull-request/badge)](https://www.skillsdirectory.com/skills/zdanovichnick-pull-request)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pull-request
description: The standard for a pull request in a .NET repo — title format, required body sections, size rule, pre-PR checks, and how to open it on GitHub (gh) or Bitbucket Cloud (API with reviewers and delete-source-branch).
when_to_use: Creating, drafting or reviewing the description of a pull request; running /dotnet-pilot:project:ship; the user says "open a PR", "make a PR" or "write the PR description".
---

# Pull Request Standard

A reviewer reads the title, then the Summary, then decides how much of the diff to trust. Write for
that reader: why the change exists first, what changed second.

## Before opening

1. `dotnet build` and `dotnet test` pass. A check that did not run is reported as skipped, never
   ticked.
2. The branch is pushed and has at least one commit ahead of the base.
3. The diff holds one concern. Over about 400 changed lines, excluding `Migrations/`, generated code
   and lockfiles, suggest a split; the user decides.
4. No unrelated formatting churn, commented-out code, secrets, or `appsettings` values that belong in
   a secret store.
5. Migrations came from `dotnet ef migrations add`, and the snapshot changed with them.

## Title

`type(Scope): subject`, imperative, no trailing period, at most 72 characters.

- `type` is a conventional-commit type; `Scope` is the .NET project name (`feat(Api): add order
  export`). Take both from the lead commit.
- Match the repo first: if recent merged PR titles use a ticket prefix such as `PROJ-123`, copy that
  shape. `git log --merges -n 10` or the recent subjects show it.
- The ticket key comes from the branch name (`feature/PROJ-123-order-export`). Never invent one.

## Body

Keep this order. Omit an optional section that does not apply instead of writing "N/A".

```markdown
## Summary
Why this change exists and what it does, in 1–3 sentences. State the user-visible or operational effect.

## Changes
- `Orders.Api` — <what changed>
- `Orders.Infrastructure` — <what changed>

## Risk and rollout          (optional: only when there is any)
Migration, config key, feature flag, breaking API or package change, rollback step.

## .NET checks
- [x] Solution builds
- [x] Tests pass
- Architecture / DI / migration scan: skipped

## Test plan
- [ ] <manual step a reviewer can repeat>

Refs: PROJ-123             (when the branch names a ticket)
```

- **Changes** groups by project, not by commit, and names the file only when the file is the point.
- **Risk and rollout** is required when the diff contains a migration, a column drop or type change,
  a new `appsettings` key, a NuGet add or major bump, or a public API change. State the reversal.
- **.NET checks** ticks only what ran and passed in this session.
- A PR that is incomplete, or whose checks fail, opens as a **draft**.

## Opening it

Read the host from `git remote get-url origin`.

### GitHub (`github.com`)

```bash
gh pr create --title "<title>" --base <base> --body-file - <<'EOF'
<body>
EOF
```

Add `--draft` for a draft. Feed the body on stdin: process substitution can fail for a native
Windows `gh.exe`.

### Bitbucket Cloud (`bitbucket.org`)

Two settings are part of the standard here: **default reviewers added** and **delete source branch
after merge ticked**.

1. Needs a credential: an app password or access token the user already holds. If none is set,
   stop and ask for it; do not guess an environment variable name.
2. Reviewers: `GET /2.0/repositories/{workspace}/{repo}/effective-default-reviewers` returns the
   repository and inherited project defaults. The repo-level `default-reviewers` list alone omits
   the inherited ones.
3. Create: `POST /2.0/repositories/{workspace}/{repo}/pullrequests` with `title`, `description`,
   `source.branch.name`, `destination.branch.name`, `close_source_branch: true`, and `reviewers`
   (an array of user objects) taken from step 2. Add `draft: true` for a draft.
4. Without a credential, print the title, the body and the compare URL, and remind the user of the
   two settings above.

Bitbucket Data Center and Server use a different API; do not reuse these paths there.

### Any other host

Print the title and body for the user to paste.

## After opening

Print the PR URL. Do not merge it, and do not approve it for the user.

## See Also
- `commands/project/ship.md` — runs the pre-flight checks and calls this standard
- `skills/issue-from-notes/SKILL.md` — when the PR closes an issue that needs writing first

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.