Skip to content

hashgraph-online/awesome-codex-plugins / plugins/avivsinai/bitbucket-cli/skills/bkt

Operate Bitbucket Cloud or Data Center repositories, pull requests, branches, pipelines, permissions, and webhooks with bkt. Use when a request names Bitbucket or bkt; confirm the platform before platform-specific commands.

FileKindSize
SKILL.mdskill md3.9 KB
rules/admin.mdmarkdown5.3 KB
rules/auth.mdmarkdown8.4 KB
rules/branch.mdmarkdown12.6 KB
rules/commit.mdmarkdown2.2 KB
rules/context.mdmarkdown5.0 KB
rules/extension.mdmarkdown5.3 KB
rules/guide.mdmarkdown5.8 KB
rules/headless.mdmarkdown3.7 KB
rules/mcp.mdmarkdown29.1 KB
rules/other.mdmarkdown1.2 KB
rules/perms.mdmarkdown10.6 KB
rules/pipeline.mdmarkdown7.7 KB
rules/pr.mdmarkdown47.9 KB
rules/project.mdmarkdown4.2 KB
rules/repo.mdmarkdown14.0 KB
rules/skill.mdmarkdown17.1 KB
rules/status.mdmarkdown5.9 KB
rules/variable.mdmarkdown7.6 KB
rules/webhook.mdmarkdown6.7 KB

rules/branch.md

View on GitHub
<!-- auto-generated by cmd/docgen — do not edit -->

# bkt branch

Inspect and manage branches in a Bitbucket repository.

Supports listing, creating, deleting, rebasing, and setting the default branch.
Branch protection rules are available through the "protect" subcommand.

Listing works on both Bitbucket Data Center and Cloud. Create, delete,
set-default, and protect subcommands currently support Data Center only.

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

### Examples

```bash
# List branches in the current context
  bkt branch list

  # Create a branch from main (Data Center)
  bkt branch create feature/login --from main

  # Delete a stale branch (Data Center)
  bkt branch delete feature/old-experiment
```

## Subcommands

| Subcommand | Description | Key Flags |
|---|---|---|
| [create](#bkt-branch-create) | Create a new branch *(DC)* | `--from`, `--message`, `--project`, `--repo` |
| [delete](#bkt-branch-delete) | Delete a branch *(DC)* | `--dry-run`, `--project`, `--repo` |
| [list](#bkt-branch-list) | List branches | `--filter`, `--limit`, `--project`, `--repo` |
| [protect](#bkt-branch-protect) | Manage branch protection rules *(DC)* | — |
| [rebase](#bkt-branch-rebase) | Rebase the current branch onto another branch | `--interactive`, `--no-fetch` |
| [set-default](#bkt-branch-set-default) | Set the default branch *(DC)* | — |

## bkt branch create

Create a new branch in a Bitbucket Data Center repository.

The --from flag is required and specifies the branch or commit to use as the
starting point. An optional --message flag lets you attach a creation message.

This command currently supports Data Center contexts only.

### Usage

```
bkt branch create <branch> [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--from` |  | Branch or commit to start from (required) |
| `--message` |  | Optional branch creation message |
| `--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
# Create a feature branch from main
  bkt branch create feature/user-auth --from main

  # Create a branch from a specific commit
  bkt branch create hotfix/login --from abc1234

  # Create a branch with a message
  bkt branch create release/v2.0 --from main --message "Release candidate"
```

## bkt branch delete

Delete a branch from a Bitbucket Data Center repository.

Use --dry-run to validate that the branch can be deleted without actually
removing it. This is useful for confirming permissions and branch existence.

This command currently supports Data Center contexts only.

**Alias:** `rm`

### Usage

```
bkt branch delete <branch> [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--dry-run` |  | Perform a dry run without deleting |
| `--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
# Delete a branch
  bkt branch delete feature/old-experiment

  # Dry-run to verify before deleting
  bkt branch delete feature/old-experiment --dry-run

  # Delete a branch in a specific project and repo
  bkt branch delete bugfix/stale --project MYPROJ --repo backend
```

## bkt branch list

List branches in a Bitbucket repository.

Works on both Bitbucket Data Center and Cloud. On Data Center, uses --project
and --repo to identify the repository. On Cloud, uses --workspace and --repo.
The default branch is marked with an asterisk (*).

**Alias:** `ls`

### Usage

```
bkt branch list [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--filter` |  | Filter branches by text |
| `--limit` |  | Maximum branches to list (0 for all) |
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--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
# List branches in the current context
  bkt branch list

  # Filter branches by name
  bkt branch list --filter feature/

  # List up to 10 branches
  bkt branch list --limit 10

  # List branches in a specific Cloud workspace and repo
  bkt branch list --workspace myteam --repo backend
```

## bkt branch protect

Manage branch protection rules (restrictions) for a Bitbucket Data Center
repository. Supports listing existing restrictions, adding new ones, and
removing them by ID.

Restriction types include no-creates, no-deletes, fast-forward-only, and
require-approvals. Restrictions can target specific users or groups.

This command group currently supports Data Center contexts only.

```
bkt branch protect <command> [flags]
```

### Examples

```bash
# List all branch restrictions
  bkt branch protect list

  # Prevent direct pushes to main
  bkt branch protect add main --type fast-forward-only

  # Remove a restriction by ID
  bkt branch protect remove 42
```

| Subcommand | Description |
|---|---|
| add | Add a branch restriction (DC only) |
| list | List branch restrictions (DC only) |
| remove | Remove a branch restriction (DC only) |

## bkt branch protect add

Add a branch restriction to a Bitbucket Data Center repository.

Available restriction types:
  no-creates          Prevent creating branches matching the pattern
  no-deletes          Prevent deleting branches matching the pattern
  fast-forward-only   Only allow fast-forward merges (no force pushes)
  require-approvals   Require pull request approval before merging

Restrictions can be scoped to specific users or groups with the --user and
--group flags, which are repeatable.

This command currently supports Data Center contexts only.

### Usage

```
bkt branch protect add <branch> [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--group` |  | Group names to apply the restriction to (repeatable) |
| `--project` |  | Bitbucket project key override |
| `--repo` |  | Repository slug override |
| `--type` |  | Restriction type (no-creates, no-deletes, fast-forward-only, require-approvals) |
| `--user` |  | Usernames to apply the restriction to (repeatable) |

### 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
# Prevent force pushes to main
  bkt branch protect add main --type fast-forward-only

  # Require PR approvals on release branches
  bkt branch protect add release/v2 --type require-approvals

  # Block branch deletion for specific users
  bkt branch protect add main --type no-deletes --user alice --user bob

  # Restrict a branch for a group
  bkt branch protect add develop --type no-creates --group developers
```

## bkt branch protect list

List all branch restrictions configured for a Bitbucket Data Center repository.

Each restriction is shown with its ID, type, and the branch matcher it applies
to. Use the restriction ID with "protect remove" to delete a rule.

This command currently supports Data Center contexts only.

### Usage

```
bkt branch protect list [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
# List all restrictions in the current context
  bkt branch protect list

  # List restrictions for a specific project and repo
  bkt branch protect list --project MYPROJ --repo backend
```

## bkt branch protect remove

Remove a branch restriction from a Bitbucket Data Center repository by its
numeric ID. Use "bkt branch protect list" to find restriction IDs.

This command currently supports Data Center contexts only.

### Usage

```
bkt branch protect remove <restriction-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
# Remove a restriction by ID
  bkt branch protect remove 42

  # Remove a restriction in a specific project and repo
  bkt branch protect remove 15 --project MYPROJ --repo backend
```

## bkt branch rebase

Rebase the current local branch onto another branch using git rebase.

By default, all remotes are fetched before rebasing to ensure the target branch
is up to date. Use --no-fetch to skip the fetch step if you have already
fetched recently. Use --interactive to open an interactive rebase session.

This command is a local git convenience wrapper and does not call the Bitbucket
API. It works regardless of whether the context is Data Center or Cloud.

### Usage

```
bkt branch rebase <branch> [flags]
```

### Flags

| Flag | Short | Description |
|---|---|---|
| `--interactive` |  | Run rebase in interactive mode |
| `--no-fetch` |  | Skip fetching before rebase |

### 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
# Rebase onto main
  bkt branch rebase main

  # Interactive rebase onto develop
  bkt branch rebase develop --interactive

  # Rebase without fetching first
  bkt branch rebase main --no-fetch
```

## bkt branch set-default

Set the default branch for a Bitbucket Data Center repository.

The default branch is the one shown by default when browsing the repository
and is used as the base for new pull requests.

This command currently supports Data Center contexts only.

### Usage

```
bkt branch set-default <branch> [flags]
```

### 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
# Set main as the default branch
  bkt branch set-default main

  # Switch the default branch to develop
  bkt branch set-default develop
```

writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall