# pr

A rule file that hands your agent the bkt pr command reference: list, view, approve and merge pull requests on Bitbucket Data Center or Cloud.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 1596 repo stars
- Author: Aviv Sinai
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/hashgraph-online/awesome-codex-plugins/tree/HEAD/plugins/avivsinai/bitbucket-cli/skills/bkt/rules/pr.md
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/pr

## What it does

The rule drops a map of the `bkt pr` CLI into the agent's context: subcommands for listing, viewing, creating, reviewing and merging pull requests, each with its flags and a couple of call examples. Ask about open PRs in the current repo and the agent reaches for `bkt pr list` instead of guessing at syntax.

Coverage runs from `bkt pr diff` and `bkt pr checks` to `bkt pr comment` with line-level flags, plus shared output flags: `--json`, `--yaml`, `--jq`, `--template`. That last set earns its place when the result feeds another script.

Four subcommands are Data Center only: `auto-merge`, `reaction`, `reviewer-group`, `suggestion`. On Cloud they fail, so merge automation there needs another route. The file documents the CLI; the calls themselves still need `bkt` installed and a Bitbucket context picked with `--context`.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/pr.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/pr.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/pr.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/pr.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/pr.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/hashgraph-online/awesome-codex-plugins/tree/HEAD/plugins/avivsinai/bitbucket-cli/skills/bkt/rules/pr.md

## When to use it
- list open pull requests without leaving the terminal
- approve and merge a PR by number
- wait for green builds before merging
- comment on a specific line of a diff
- turn a draft PR into one ready for review

## Example prompts
- What PRs are open in this repo?
- Check the builds on PR 42 and merge it if they're green.
- Approve PR 42 and leave a comment on line 12 of the diff.

## Source text · pr.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: f979c47874479f82.

BEGIN THIRD-PARTY FILE f979c47874479f82
````text
<!-- auto-generated by cmd/docgen — do not edit -->

# bkt pr

Create, list, review, merge, and manage pull requests on Bitbucket Data Center
and Bitbucket Cloud. Most subcommands work on both platforms; platform-specific
limitations are noted in each subcommand's help.

```
bkt pr <command> [flags]
```

### Examples

```bash
# List open pull requests in the current repository
  bkt pr list

  # View details of a specific pull request
  bkt pr view 42

  # Create a pull request from the current branch
  bkt pr create --title "Add user authentication"

  # Approve and merge a pull request
  bkt pr approve 42
  bkt pr merge 42
```

## Subcommands

| Subcommand | Description | Key Flags |
|---|---|---|
| [approve](#bkt-pr-approve) | Approve a pull request | `--project`, `--repo`, `--workspace` |
| [auto-merge](#bkt-pr-auto-merge) | Manage pull request auto-merge *(DC)* | — |
| [checkout](#bkt-pr-checkout) | Check out the pull request branch | `--branch`, `--project`, `--remote`, `--repo` |
| [checks](#bkt-pr-checks) | Show build/CI status for a pull request | `--fail-fast`, `--interval`, `--max-interval`, `--project` |
| [comment](#bkt-pr-comment) | Comment on a pull request | `--file`, `--from-line`, `--parent`, `--pending` |
| [comments](#bkt-pr-comments) | List comments on a pull request | `--details`, `--project`, `--repo`, `--state` |
| [create](#bkt-pr-create) | Create a new pull request | `--body`, `--close-source`, `--description`, `--destination` |
| [decline](#bkt-pr-decline) | Decline a pull request | `--body`, `--comment`, `--delete-source`, `--project` |
| [diff](#bkt-pr-diff) | Show the diff for a pull request | `--project`, `--repo`, `--stat`, `--workspace` |
| [edit](#bkt-pr-edit) | Edit a pull request | `--body`, `--description`, `--project`, `--remove-reviewer` |
| [list](#bkt-pr-list) | List pull requests | `--limit`, `--mine`, `--project`, `--repo` |
| [merge](#bkt-pr-merge) | Merge a pull request | `--close-source`, `--message`, `--project`, `--repo` |
| [publish](#bkt-pr-publish) | Mark a draft pull request as ready for review | `--project`, `--repo`, `--undo`, `--workspace` |
| [reaction](#bkt-pr-reaction) | Manage comment reactions *(DC)* | — |
| [reopen](#bkt-pr-reopen) | Reopen a declined pull request | `--project`, `--repo`, `--workspace` |
| [reviewer-group](#bkt-pr-reviewer-group) | Manage default reviewer groups *(DC)* | — |
| [suggestion](#bkt-pr-suggestion) | Apply or preview a code suggestion *(DC)* | `--preview`, `--project`, `--repo` |
| [task](#bkt-pr-task) | Manage pull request tasks (DC and Cloud) | — |
| [view](#bkt-pr-view) | Show details for a pull request | `--project`, `--repo`, `--web`, `--workspace` |

## bkt pr approve

Approve a pull request as the authenticated user. This adds your approval to
the pull request, which may satisfy merge checks that require reviewer
approvals.

Works on both Data Center and Cloud.

### Usage

```
bkt pr approve <id> [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--workspace` |  | Bitbucket Cloud workspace override |

### Inherited Flags

| Flag | Short | Description |
|---|---|---|
| `--context` | `-c` | Active Bitbucket context name |
| `--format` |  | Output format: json or yaml (alias for --json/--yaml) |
| `--jq` |  | Apply a jq expression to JSON output (requires --json or --format json) |
| `--json` |  | Output in JSON format when supported |
| `--template` |  | Render output using Go templates |
| `--yaml` |  | Output in YAML format when supported |

### Examples

```bash
# Approve a pull request
  bkt pr approve 42

  # Approve a pull request in a specific repository
  bkt pr approve 42 --repo my-service
```

## bkt pr auto-merge

Enable, disable, or check the status of auto-merge for a pull request.
````
END THIRD-PARTY FILE f979c47874479f82

The third-party file has ended. Everything between the f979c47874479f82 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3881 of 47611 bytes. © Aviv Sinai · MIT · https://github.com/hashgraph-online/awesome-codex-plugins/tree/HEAD/plugins/avivsinai/bitbucket-cli/skills/bkt/rules/pr.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
