Skip to main content
rule CX Codex

pr — Claude Code rule: Bitbucket pull requests via bkt

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.

MIT ★ 1,596 updated 2026-10-29

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/pr.md
Open on GitHub

What pr 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.

What it helps with

  • 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 for the agent

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

How to install pr

Manually: put the files in place

.claude/rules/pr.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about pr

How do I install the pr rule in Claude Code?

Copy the rule file to .claude/rules/pr.md in your project. That is the whole install.

What does the pr rule do?

It gives the agent a reference for the bkt pr CLI, so it can create, review and merge Bitbucket pull requests with the right subcommand and flags.

Do I need the bkt CLI installed?

Yes. The rule only describes the commands; bkt runs them, and it needs a Bitbucket context selected with --context.

Source text

pr.md · MIT
<!-- 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.
When auto-merge is enabled, the pull request is merged automatically once
all required conditions (approvals, build checks) are met.

Data Center only. Not yet supported on Cloud.

```
bkt pr auto-merge <command> [flags]
```

### Examples

```bash
# Enable auto-merge for a pull request
  bkt pr auto-merge enable 42

  # Check auto-merge status
  bkt pr auto-merge status 42

  # Disable auto-merge
  bkt pr auto-merge disable 42
```

| Subcommand | Description |
|---|---|
| disable | Disable auto-merge (DC only) |
| enable | Enable auto-merge for a pull request (DC only) |
| status | Show auto-merge configuration (DC only) |

## bkt pr auto-merge disable

Disable auto-merge for a pull request on Data Center. The pull request will no longer merge automatically.

### Usage

```
bkt pr auto-merge disable <id> [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug 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
# Disable auto-merge
  bkt pr auto-merge disable 42
```

## bkt pr auto-merge enable

Enable auto-merge for a pull request on Data Center. The pull request will be
merged automatically when all preconditions are satisfied. You can optionally
specify a merge strategy, a custom merge commit message, and whether the
source branch should be closed after merge.

### Usage

```
bkt pr auto-merge enable <id> [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--close-source` |  | Close source branch when auto-merge completes |
| `--message` |  | Custom merge commit message |
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--strategy` |  | Merge strategy ID (leave empty for default) |

### 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
# Enable auto-merge with defaults
  bkt pr auto-merge enable 42

  # Enable with a specific merge strategy and message
  bkt pr auto-merge enable 42 --strategy squash --message "Squash merge feature X"

  # Enable but keep the source branch
  bkt pr auto-merge enable 42 --close-source=false
```

## bkt pr auto-merge status

Show the current auto-merge configuration for a pull request on Data Center, including whether it is enabled, the merge strategy, commit message, and close-source-branch setting.

### Usage

```
bkt pr auto-merge status <id> [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug 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
# Check auto-merge status
  bkt pr auto-merge status 42
```

## bkt pr checkout

Fetch and check out the source branch of a pull request into a local branch.
By default the local branch is named pr/<id>.

On Data Center, the PR head is fetched via the refs/pull-requests/<id>/from
ref. On Cloud, the source branch name is resolved from the API and fetched
directly. For fork-based Cloud pull requests, a remote is automatically
added (or reused) for the fork repository.

### Usage

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

### Flags

| Flag | Short | Description |
|---|---|---|
| `--branch` |  | Local branch name (defaults to pr/<id>) |
| `--project` |  | Bitbucket project key override |
| `--remote` |  | Git remote name to fetch from |
| `--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
# Check out pull request #42
  bkt pr checkout 42

  # Check out into a custom branch name
  bkt pr checkout 42 --branch feature-review

  # Check out from a specific remote
  bkt pr checkout 42 --remote upstream
```

## bkt pr checks

Display CI/build statuses for the head commit of a pull request. Use --wait to
poll until all builds complete, with exponential backoff and jitter. The
--fail-fast flag exits on the first failure. Use --web to open the first
build's URL in your browser.

On Data Center, statuses are fetched from the commit build-status API using
the source branch's latest commit. On Cloud, the source commit hash from the
pull request is used.

Exit codes in --wait mode: 0 = all passed, 1 = a build failed,
8 = timed out with builds still pending.

**Alias:** `builds`

### Usage

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

### Flags

| Flag | Short | Description |
|---|---|---|
| `--fail-fast` |  | Exit immediately when a check fails (requires --wait) |
| `--interval` |  | Initial polling interval when using --wait |
| `--max-interval` |  | Maximum polling interval (backoff cap) |
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--timeout` |  | Maximum time to wait for builds (0 for no timeout) |
| `--wait` |  | Wait for all builds to complete |
| `--web` |  | Open the build URL in your browser (first build) |
| `--workspace` |  | Bitbucket workspace override (Cloud) |

### 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
# Show current build status
  bkt pr checks 42

  # Wait for all builds to finish
  bkt pr checks 42 --wait

  # Wait with fail-fast and a custom timeout
  bkt pr checks 42 --wait --fail-fast --timeout 10m

  # Open the first build URL in a browser
  bkt pr checks 42 --web
```

## bkt pr comment

Add a comment to a pull request. Comments can be general (activity-level),
threaded replies (via --parent), or inline on a specific file and line in the
diff (via --file with --from-line or --to-line). Use --pending to create a
draft review comment that is not visible until submitted.

Works on both Data Center and Cloud.

### Usage

```
bkt pr comment <id> --text <message> [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--file` |  | File path in the diff (requires --from-line or --to-line) |
| `--from-line` |  | Line in the old file (removed/source side) |
| `--parent` |  | Parent comment ID for threaded replies |
| `--pending` |  | Create the comment as pending (draft review feedback) |
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--text` |  | Comment text |
| `--to-line` |  | Line in the new file (added/destination side) |
| `--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
# Add a general comment
  bkt pr comment 42 --text "Looks good to me"

  # Reply to an existing comment thread
  bkt pr comment 42 --text "Fixed in the latest push" --parent 1001

  # Add an inline comment on a specific line in the new file
  bkt pr comment 42 --text "Nit: rename this variable" --file src/main.go --to-line 55

  # Add a pending (draft) inline comment
  bkt pr comment 42 --text "Consider error handling here" --file api.go --to-line 30 --pending
```

## bkt pr comments

List all comments on a pull request. On Cloud, use --state to filter by
resolution status (resolved, unresolved, or deleted). The --state flag is not supported
on Data Center because the DC API does not expose resolution status.

Works on both Data Center and Cloud.

Resolve and reopen subcommands require the top-level thread comment ID, not a
reply ID. Use --details when listing comments to inspect thread structure before
changing thread state.

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

### Flags

| Flag | Short | Description |
|---|---|---|
| `--details` |  | Show full comment details (file, resolved, task status) |
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--state` |  | Filter by state: all, resolved, unresolved, deleted (Cloud only) |
| `--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
# List all comments
  bkt pr comments 42

  # List only unresolved comments (Cloud only)
  bkt pr comments 42 --state unresolved

  # List resolved comments (Cloud only)
  bkt pr comments 42 --state resolved

  # List deleted comments (Cloud only)
  bkt pr comments 42 --state deleted

  # View one comment thread with its file/line anchor
  bkt pr comments view 42 1001

  # Delete a comment
  bkt pr comments delete 42 1001

  # Resolve a comment thread
  bkt pr comments resolve 42 1001

  # Reopen a resolved comment thread
  bkt pr comments reopen 42 1001
```

| Subcommand | Description |
|---|---|
| delete | Delete a pull request comment |
| reopen | Reopen a resolved pull request comment thread |
| resolve | Resolve a pull request comment thread |
| view | View one pull request comment thread |

## bkt pr comments delete

Delete a pull request comment on Bitbucket Cloud or Data Center.

Use bkt pr comments <id> or bkt pr comments <id> --details to find the comment
ID before deleting it. On Bitbucket Cloud, deleted comments can still be listed
with --state deleted when the API returns them. On Data Center, bkt fetches the
current comment version before deleting because the API requires it.

**Alias:** `rm`

### Usage

```
bkt pr comments delete <id> <comment-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
# Delete comment 1001 from pull request 42
  bkt pr comments delete 42 1001

  # Delete a comment in a specific repository
  bkt pr comments delete 42 1001 --repo platform-api
```

## bkt pr comments reopen

Reopen a resolved pull request comment thread on Bitbucket Cloud or Data Center.

The comment-id must be the top-level comment for the thread. Replies cannot be
reopened directly; pass the parent comment ID instead. Deleted comments cannot
be reopened.

### Usage

```
bkt pr comments reopen <id> <comment-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
# Reopen thread 1001 on pull request 42
  bkt pr comments reopen 42 1001

  # Reopen a thread in a specific repository
  bkt pr comments reopen 42 1001 --repo platform-api
```

## bkt pr comments resolve

Resolve a pull request comment thread on Bitbucket Cloud or Data Center.

The comment-id must be the top-level comment for the thread. Replies cannot be
resolved directly; pass the parent comment ID instead. Deleted comments cannot
be resolved.

### Usage

```
bkt pr comments resolve <id> <comment-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
# Resolve thread 1001 on pull request 42
  bkt pr comments resolve 42 1001

  # Resolve a thread in a specific repository
  bkt pr comments resolve 42 1001 --repo platform-api
```

## bkt pr comments view

Show the comment thread that contains a comment: the root comment, its
replies, and the inline anchor (file, line, orphaned). The comment-id can be the
root comment or any reply; the requested comment is marked in the output.

On Data Center, the output also includes a few lines of diff around the
anchored line when Bitbucket returns them. --json returns the root comment as
"thread" with replies nested under "comments" and the diff lines as
"diff_context". On Cloud, --json returns the thread as a flat "comments" list,
root first.

### Usage

```
bkt pr comments view <id> <comment-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
# View the thread that contains comment 1001 on pull request 42
  bkt pr comments view 42 1001

  # Get the thread as JSON
  bkt pr comments view 42 1001 --json
```

## bkt pr create

Create a new pull request. The source branch defaults to the current git branch,
and the target branch defaults to the remote's default branch (e.g. main).
The title defaults to the first unique commit subject on the source branch.

Reviewers can be added with repeatable --reviewer flags.
--with-default-reviewers merges the repository's configured default reviewers
into the reviewer list. On Cloud, the current user is automatically excluded.

On Data Center, --source-project and --source-repo select a fork repository for
the source branch. Each defaults to the destination project or repository when
omitted. These flags are rejected on Bitbucket Cloud.

Draft pull requests are supported on Cloud (always) and on Data Center 8.18+
via the --draft flag.

### Usage

```
bkt pr create [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--body` | `-b` | Pull request description (alias for --description) |
| `--close-source` |  | Close source branch on merge |
| `--description` |  | Pull request description |
| `--destination` |  | Target branch (alias for --target) |
| `--draft` | `-d` | Create pull request as a draft (DC 8.18+, Cloud always supported) |
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--reviewer` |  | Reviewer username or {UUID} (repeatable) |
| `--source` |  | Source branch (defaults to the current branch) |
| `--source-project` |  | Source project key (Data Center only; defaults to --project) |
| `--source-repo` |  | Source repository slug (Data Center only; defaults to --repo) |
| `--target` |  | Target branch (defaults to the remote's default branch) |
| `--title` |  | Pull request title (defaults to the first unique commit subject) |
| `--with-default-reviewers` |  | Add repository default reviewers |
| `--workspace` |  | Bitbucket workspace override (Cloud) |

### 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
# Create a pull request with auto-detected title
  bkt pr create

  # Create with an explicit title and description
  bkt pr create --title "Add OAuth2 support" --description "Implements RFC 6749"

  # Create with reviewers and close source branch on merge
  bkt pr create -t "Fix login bug" --reviewer alice --reviewer bob --close-source

  # Create a draft pull request
  bkt pr create --title "WIP: new feature" --draft

  # Create from a Data Center fork into an upstream repository
  bkt pr create --source-project FORK --source-repo contributor-fork \
    --project DEST --repo upstream --source feature --target main
```

## bkt pr decline

Decline (close without merging) a pull request. On Data Center, the optional
--delete-source flag also deletes the source branch after declining. This flag
is not supported on Cloud.

Works on both Data Center and Cloud.

**Alias:** `close`

### Usage

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

### Flags

| Flag | Short | Description |
|---|---|---|
| `--body` |  | Alias for --comment; use --comment instead |
| `--comment` | `-m` | Comment explaining why the pull request was declined |
| `--delete-source` |  | Delete the source branch after declining |
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--text` |  | Alias for --comment; use --comment instead |
| `--workspace` |  | Bitbucket workspace override (Cloud) |

### 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
# Decline a pull request
  bkt pr decline 42

  # Decline with a comment explaining the reason
  bkt pr decline 42 --comment "Needs more work before we can merge"

  # Same using the close alias
  bkt pr close 42

  # Decline and delete the source branch (Data Center only)
  bkt pr decline 42 --delete-source
```

## bkt pr diff

Display the full unified diff for a pull request, streamed through the
configured pager when available. Use --stat for a compact summary of changed
files, additions, and deletions instead of the full patch.

Works on both Data Center and Cloud. On Cloud, --stat also lists per-file
change counts.

### Usage

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

### Flags

| Flag | Short | Description |
|---|---|---|
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--stat` |  | Show diff statistics instead of full patch |
| `--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
# Show the full diff
  bkt pr diff 42

  # Show diff statistics only
  bkt pr diff 42 --stat
```

## bkt pr edit

Edit a pull request's title, description, and/or reviewers. Also available as 'pr update'.

**Alias:** `update`

### Usage

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

### Flags

| Flag | Short | Description |
|---|---|---|
| `--body` | `-b` | Set the new body (alias for --description). |
| `--description` |  | Set the new description. |
| `--project` |  | Bitbucket project key override. |
| `--remove-reviewer` |  | Reviewer username or {UUID} to remove (repeatable) |
| `--repo` |  | Repository slug override. |
| `--reviewer` |  | Reviewer username or {UUID} to add (repeatable) |
| `--title` | `-t` | Set the new title. |
| `--with-default-reviewers` |  | Add repository default reviewers |
| `--workspace` |  | Bitbucket workspace override (Cloud). |

### 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
# Update pull request title
  bkt pr edit 123 --title "New feature: user authentication"

  # Update pull request description
  bkt pr edit 123 --body "This PR adds OAuth2 support"

  # Update both title and description
  bkt pr edit 123 -t "Fix login bug" -b "Resolves issue with session timeout"

  # Add reviewers
  bkt pr edit 123 --reviewer alice --reviewer bob

  # Remove a reviewer
  bkt pr edit 123 --remove-reviewer alice

  # Add repository default reviewers
  bkt pr edit 123 --with-default-reviewers

  # Add and remove reviewers in one call
  bkt pr edit 123 --reviewer charlie --remove-reviewer alice
```

## bkt pr list

List pull requests for a repository, filtered by state. On Data Center, the
project and repo are resolved from the active context (or --project/--repo).
On Cloud, the workspace and repo are used instead.

When --mine is set without a specific repository, the command lists pull
requests authored by the authenticated user across all repositories. On Data
Center this uses the dashboard API; on Cloud it queries the workspace.

--reviewer is the reviewer-facing counterpart: it shows pull requests where the
authenticated user is a requested reviewer. Without a repository, Data Center
lists them across all repositories via the dashboard API; Bitbucket Cloud has
no workspace-wide reviewer endpoint, so --reviewer there requires a repository.
--mine and --reviewer cannot be combined.

**Alias:** `ls`

### Usage

```
bkt pr list [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--limit` |  | Maximum pull requests to list (0 for all) |
| `--mine` |  | Show pull requests authored by the authenticated user |
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--reviewer` |  | Show pull requests where the authenticated user is a requested reviewer |
| `--state` |  | Filter by state (OPEN, MERGED, DECLINED) |
| `--workspace` |  | Bitbucket workspace override (Cloud) |

### 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 |
| `--ya...

© Aviv Sinai · MIT · hashgraph-online/awesome-codex-plugins

Similar IDE rules

All IDE rules for Code review and refactoring →

From the same set391

The whole set →
game Build or change multiplayer web games in a Homie studio, with server-run rules and browser-side play. The skill also covers AI-driven game decisions and a game’s landing page. CX Codex +1 ★ 1,596repo stars webly webly publishes a site or a folder of files at a live URL without an account: the anonymous copy lasts 24 hours, then you claim it and edit over MCP. CX Codex +1 ★ 1,596repo stars amazon-ads-marketing-cloud amazon-ads-marketing-cloud formulates AMC SQL queries, analyzes ad attribution pathways, and manages audience segments directly within conversational agent workflows. CX Codex +1 ★ 1,596repo stars ship ship breaks a project into phases and runs each from discovery through implementation, checks, and a report. Saved phase state lets you resume after a stop or /clear. CX Codex +1 ★ 1,596repo stars maintaining-modding-environments maintaining-modding-environments handles ongoing maintenance for Bethesda modding setups: updates KB packs, cleans cache directories, and configures the xtl translation tool. CX Codex +1 ★ 1,596repo stars review This skill reviews PRs and diffs with multiple agents. Its default mode uses 5 agents; --deep runs the full review pipeline. CX Codex +1 ★ 1,596repo stars codiris-agentizer The codiris-agentizer skill crawls a company's site, works out what it sells, and builds a matching agentfront from a Next.js template. CX Codex +1 ★ 1,596repo stars zotero-research-tools The zotero-research-tools plugin connects an agent to a local Zotero library through Zotero MCP. Use it to find and read items, prepare citations, and inspect collections and tags. CX Codex ★ 1,596repo stars

Project sponsors

Companies that keep this analytics open