mcpbeat Sign in

Bkt Agent Skill

Bitbucket CLI for Data Center and Cloud. Use when users need to manage repositories, pull requests, branches, issues, webhooks, or pipelines in Bitbucket. Triggers include "bitbucket", "bkt", "pull request", "PR", "repo list", "branch create", "Bitbucket Data Center", "Bitbucket Cloud", "keyring timeout".

49k tokens
context cost
the whole folder, loaded on every use
19
files
instructions only
0
copies elsewhere
how many repositories repackaged it
179
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/avivsinai/bitbucket-cli --skill bkt

The instruction itself

11 sections, as written by the author

Bitbucket CLI (bkt)

bkt is a unified CLI for Bitbucket Data Center and Bitbucket Cloud. It mirrors gh ergonomics and provides structured JSON/YAML output for automation.

Before You Start

1. Verify installation — always check before running any bkt command:

bkt --version

If not installed:

| Platform | Command |

|----------|---------|

| macOS/Linux | brew install avivsinai/tap/bitbucket-cli |

| Windows | scoop bucket add avivsinai https://github.com/avivsinai/scoop-bucket && scoop install bitbucket-cli |

| Go | go install github.com/avivsinai/bitbucket-cli/cmd/bkt@latest |

| Binary | Download from GitHub Releases |

2. Check authentication — most commands require an active session:

bkt auth status

Bitbucket Cloud Token Requirements:

  • Create an "API token with scopes" (not a general API token)
  • Select Bitbucket as the application
  • Required scope: Account: Read (read:user:bitbucket)
  • Additional scopes as needed: Repositories, Pull requests, Issues

For config-free use in containers and CI pipelines, see headless authentication.

If not authenticated, log in:

# Data Center (PAT-based)
bkt auth login https://bitbucket.example.com --username alice --token <PAT>

# Bitbucket Cloud — OAuth (official binaries open browser out of the box)
bkt auth login https://bitbucket.org --kind cloud --web

# Bitbucket Cloud — API token (--web-token opens Atlassian's token creation page)
bkt auth login https://bitbucket.org --kind cloud --web-token

For source and Nix builds, set BKT_OAUTH_CLIENT_ID and BKT_OAUTH_CLIENT_SECRET env vars before running --web.

3. Set up a context — contexts bind a host to a project/workspace and optional default repo, so you don't repeat flags on every command:

# Data Center
bkt context create dc-prod --host bitbucket.example.com --project ABC --set-active

# Cloud
bkt context create cloud-team --host bitbucket.org --workspace myteam --set-active

Platform Awareness

Some commands are Data Center only or Cloud only — check the command reference for *(DC)* and *(Cloud)* badges. Key splits:

| Feature | Data Center | Cloud |

|---------|:-----------:|:-----:|

| Pull requests | yes | yes |

| Repositories | yes | yes |

| Branches (list) | yes | yes |

| Branches (create/delete/protect) | yes | — |

| Issues | — | yes |

| Pipelines | — | yes |

| Permissions | yes | — |

| Webhooks | yes | yes |

| Auto-merge, tasks, reactions | yes | — |

| Variables | — | yes |

When a user's context is DC, do not suggest Cloud-only commands (and vice versa). If the platform is unknown, ask or check with bkt auth status.

Common Workflows

Create a PR from the current branch

bkt pr create --title "feat: add caching" --target main

Source branch, title, and target default to sensible values from git state. Add --draft for work-in-progress, --reviewer alice to request review.

Review cycle

bkt pr checks 42 --wait          # Wait for CI to pass
bkt pr approve 42                # Approve
bkt pr merge 42                  # Merge (closes source branch by default)

Checkout a colleague's PR locally

bkt pr checkout 42               # Creates pr/42 branch

Structured output for scripting

All commands support --json, --yaml, --jq, and --template:

bkt pr list --mine --json | jq '.pull_requests[].title'

Raw API escape hatch

For endpoints without a dedicated command:

bkt api /rest/api/1.0/projects --param limit=100 --json

Global Flags

Every command accepts these inherited flags:

| Flag | Short | Purpose |

|------|-------|---------|

| --context | -c | Use a specific named context |

| --json | | JSON output |

| --yaml | | YAML output |

| --jq | | Apply a jq expression (requires --json) |

| --template | | Render with Go template |

References

  • headless / env vars — Config-free CI/container auth (BKT_TOKEN, BKT_HOST) and full env var reference

<!-- auto-generated by cmd/docgen — do not edit below this line -->

  • admin — Administrative operations for Bitbucket *(DC)*
  • auth — Manage Bitbucket authentication credentials
  • branch — Inspect and manage branches
  • commit — Work with commits
  • context — Manage Bitbucket CLI contexts
  • extension — Manage bkt CLI extensions
  • issue — Work with Bitbucket Cloud issues *(Cloud)*
  • mcp — Model Context Protocol server for agents
  • perms — Manage Bitbucket permissions *(DC)*
  • pipeline — Run and inspect Bitbucket Cloud pipelines *(Cloud)*
  • pr — Manage pull requests
  • project — Work with Bitbucket projects *(DC)*
  • repo — Work with Bitbucket repositories
  • status — Inspect commit and pull request statuses
  • variable — Manage pipeline variables *(Cloud)*
  • webhook — Manage Bitbucket webhooks
  • other — api

<!-- end auto-generated -->

Other skills for the same job

different authors, same section of the catalogue
Git Commit
by github
vendor ×3

Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping

799 tokens
Github Code Review
by ComeOnOliver
×3

Comprehensive GitHub code review with AI-powered swarm coordination

13k tokens
Commit Work
by softaworks
×2

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

2k tokens
Verification & Quality Assurance
by Microck
×2

Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.

4k tokens
Gh CLI
by christophacham
×2

GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line.

10k tokens
Github
by Dicklesworthstone
×2

GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line.

1k tokens
Codebase Cleanup Refactor Clean
by ComeOnOliver
×2

You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.

9k tokens
Codebase Cleanup Tech Debt
by ComeOnOliver
×2

You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create acti

6k tokens

How to use it

Copy the folder

Take avivsinai/bkt from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference brew, go. Without those the skill loads but fails at the first command.