Skip to content
Back to skills

Bitbucket

ASecurity

Bitbucket integration hub. Detects whether the repository is on Bitbucket Cloud or Bitbucket Data Center and directs you to the matching detailed skill (bitbucket-cloud or bitbucket-data-center). Use for any Bitbucket repository or pull request task.

  • 191 stars
  • 0 votes
  • 1 copy
  • 8 views
  • Added June 5, 2026
developmentbashgitapi

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add OpenHands/extensions --skill bitbucket --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bitbucket?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bitbucket
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/openhands-bitbucket/badge)](https://www.skillsdirectory.com/skills/openhands-bitbucket)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bitbucket
description: Bitbucket integration hub. Detects whether the repository is on Bitbucket Cloud or Bitbucket Data Center and directs you to the matching detailed skill (bitbucket-cloud or bitbucket-data-center). Use for any Bitbucket repository or pull request task.
triggers:
- bitbucket
---

Use authenticated Bitbucket MCP tools first when they are available in the agent's environment. Detect this by tool availability, without depending on a particular MCP server name. Still identify Cloud versus Data Center and load the matching detailed skill. Use the token and direct API instructions only when Bitbucket MCP tools are unavailable or when raw API or `curl` access is explicitly needed.

You are working with **Bitbucket**, which ships as two distinct products that behave
differently:

- **Bitbucket Cloud** (`bitbucket.org`) — authenticates with the `BITBUCKET_TOKEN`
  environment variable.
- **Bitbucket Data Center** (self-hosted Bitbucket Server) — authenticates with the
  `BITBUCKET_DATA_CENTER_TOKEN` environment variable.

They use different REST APIs, repository identifiers, git remote URL formats, and pull
request tools, so you must first determine which one you are on, then load the matching
detailed skill for full instructions.

## Step 1 — Detect which Bitbucket you are on

First use the repository host or available Bitbucket MCP tool context to identify the product. For the token fallback, check which token environment variable is present. Environment variable names are
case-sensitive, so look for it case-insensitively:

```bash
env | grep -i 'bitbucket' || echo "no bitbucket token found"
```

- If a **`BITBUCKET_DATA_CENTER_TOKEN`** variable is set (in any letter case) → you are on
  **Bitbucket Data Center**.
- Otherwise, if a **`BITBUCKET_TOKEN`** variable is set → you are on **Bitbucket Cloud**.
- If neither is set, ask the user how they authenticate to Bitbucket before proceeding.

When you reference the token later, use the exact variable name (and letter case) that
actually exists in the environment.

## Step 2 — Load the detailed skill

Once you know the environment, use the `invoke_skill` tool to load the matching skill for
full instructions on API calls, authenticated git remotes, and opening pull requests:

- Bitbucket Cloud → invoke the **`bitbucket-cloud`** skill.
- Bitbucket Data Center → invoke the **`bitbucket-data-center`** skill.

## Quick reference (fallback)

If you are unable to load the detailed skill, these are the essentials. Always use the
Bitbucket API (not a web browser) and always use the listed PR tool to open a pull request.

| | Bitbucket Cloud | Bitbucket Data Center |
|---|---|---|
| Token env var | `BITBUCKET_TOKEN` | `BITBUCKET_DATA_CENTER_TOKEN` |
| Host | `bitbucket.org` | self-hosted domain |
| REST API base | `https://api.bitbucket.org/2.0` | `https://<host>/rest/api/1.0` |
| Repository identifier | `workspace/repo_slug` | `PROJECT/repo_slug` (project key) |
| Pull request tool | `create_bitbucket_pr` | `create_bitbucket_data_center_pr` |

Files in this skill

  • .plugin/plugin.json544 B
  • README.md3.2 KB
  • SKILL.md3.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.