bitbucket

Automate Bitbucket Cloud git operations, pull requests, pipelines, and branch restrictions via REST API.

2|Updated Jul 28, 2026
One-click install
npx skills add https://github.com/mbadali25/useful-claude-add-ons --skill bitbucket-mbadali25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bitbucket
Source: https://github.com/mbadali25/useful-claude-add-ons/tree/main/skills/bitbucket
Command: npx skills add https://github.com/mbadali25/useful-claude-add-ons --skill bitbucket-mbadali25

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires curl, jq, and includes scripts (resource) and references (resource) components.

What problem does it solve? Working with Bitbucket Cloud from the command line breaks in confusing ways: app passwords were removed in 2026, the same API token needs a different username for git versus REST calls, and branch restrictions (merge gates) have no simple on/off switch in the API. This Skill handles authentication, push/PR/pipeline workflows, and safe export-disable-restore of merge checks. ## Core Features & Use Cases - Token-based authentication: Configure Atlassian API tokens correctly for both git over HTTPS and the REST API, with triage for 401/403/410 push failures. - REST API operations: Create and review pull requests, check pipeline results, read PR comments, and manage branches through a curl wrapper script. - Merge gate management: Export, disable, and restore branch restrictions with validated backups, dry-run support, and detection of Premium-only or non-API-representable checks. - Use Case: A push to bitbucket.org fails with HTTP 410 because an old app password is cached. The Skill clears the stale credential, configures an API token, pushes the branch, and opens a pull request. ## Quick Start Push my changes to Bitbucket and open a pull request from this branch into main.

Frequently Asked Questions about bitbucket

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I push to Bitbucket after app passwords were removed?

Use an Atlassian API token with scopes instead of an app password. For git over HTTPS, set the username to x-bitbucket-api-token-auth with the token as password, ideally stored via a git credential helper so it never appears in the remote URL.

How do I create a pull request with the Bitbucket REST API?

POST to repositories/{workspace}/{repo}/pullrequests with a JSON body containing title, source branch, and destination branch. Authenticate with Basic auth using your Atlassian account email and API token, and read the PR URL from links.html.href in the response.

Why does my Bitbucket push fail with HTTP 410?

HTTP 410 with a CHANGE-3222 message means the stored credential is a deprecated app password. Clear the stale credential with git credential reject or the OS keychain, then configure an API token and retry the push.

Can I disable all Bitbucket merge checks via the API?

No. The merge_gate.sh script removes the merge-gate kinds it manages, but the "no unresolved pull request comments" check has no API representation at all (BCLOUD-22614), and three kinds are Premium-only. The script exports a validated backup before deleting anything.

What scopes does a Bitbucket API token need for branch restrictions?

Branch restrictions require the repository:admin scope for both reads and writes; there is no read-only scope. A token that lists pull requests fine will still get 403 on the branch-restrictions endpoint without it.