About bitbucket
A Bitbucket skill for agents that first identifies whether a repository uses Cloud or Data Center, then loads the matching detailed guidance. It prioritizes available authenticated Bitbucket MCP tools and documents token-based API fallback steps.
Key features
- 01Distinguish Cloud from Data Center
- 02Prefer available authenticated MCP tools
- 03Load product-specific detailed skills
- 04Use token-based API fallback
- 05Identify product-specific PR tools
Use cases
- 01Determine the Bitbucket product in use
- 02Choose the matching API and repository format
- 03Open a pull request with the listed tool
MCP support
It directs agents to use authenticated Bitbucket MCP tools first when available, without relying on a specific server name. If those tools are unavailable, it provides token-based REST API guidance.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ openhands/ extensions --skill bitbucketAfter installing, type/bitbucketin Claude Code to confirm it loaded.
Bundled files.plugin/plugin.jsonREADME.md
Details
From the project READMEUse 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 theBITBUCKET_TOKENenvironment variable. - Bitbucket Data Center (self-hosted Bitbucket Server) — authenticates with the
BITBUCKET_DATA_CENTER_TOKENenvironment 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:
env | grep -i 'bitbucket' || echo "no bitbucket token found"
- If a
BITBUCKET_DATA_CENTER_TOKENvariable is set (in any letter case) → you are on Bitbucket Data Center. - Otherwise, if a
BITBUCKET_TOKENvariable 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-cloudskill. - Bitbucket Data Center → invoke the
bitbucket-data-centerskill.
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 |