A lightweight Bitbucket Cloud CLI skill for Claude Code. Manage pull requests, pipelines, and code reviews directly from your terminal — no external dependencies required.
- Pull Requests: Create, list, view, merge, decline PRs
- Comments: Add general and inline code review comments
- Pipelines: View recent pipeline runs and statuses
- Batch Code Review: Add multiple inline comments at once
- Auto-detection: Workspace and repo are detected from
git remote
- Copy the
bitbucketfolder to your Claude Code skills directory:
cp -r bitbucket ~/.claude/skills/bitbucket- Create config file at
~/.claude/bitbucket.config:
{
"username": "your_bitbucket_username",
"app_password": "your_bitbucket_app_password"
}
workspaceandrepo_slugare optional — auto-detected fromgit remote get-url origin.
- Make scripts executable:
chmod +x ~/.claude/skills/bitbucket/scripts/*.shSupports three auth methods (in priority order):
| # | Method | Config Keys | Auth Type |
|---|---|---|---|
| 1 | Atlassian API Token with scopes | username + app_password |
Basic |
| 2 | Repository Access Token | access_token |
Bearer |
| 3 | App Password |
username + app_password |
Basic |
- Go to https://id.atlassian.com/manage-profile/security/api-tokens
- Click Create API token with scopes
- Select Bitbucket scopes:
read:pullrequest:bitbucket,write:pullrequest:bitbucket,read:repository:bitbucket,read:pipeline:bitbucket(and others as needed)
{
"username": "your_atlassian_email",
"app_password": "your_atlassian_api_token"
}Note: Classic Atlassian API Tokens (created with "Create API token" — without scopes) do NOT work with Bitbucket Cloud API. You must use "Create API token with scopes" and select Bitbucket scopes.
- Go to Repository settings > Access tokens > Create
- Grant scopes: Repositories (Read/Write), Pull Requests (Read/Write)
{
"access_token": "your_repository_access_token"
}Repository Access Tokens are scoped to a single repository and do not require a username.
⚠️ Deprecated: Bitbucket App Passwords are deprecated by Atlassian. Use Atlassian API Tokens with scopes instead.
- Go to Bitbucket > Personal settings > App passwords
- Create with scopes: Repositories (Read/Write), Pull Requests (Read/Write)
{
"username": "your_bitbucket_username",
"app_password": "your_bitbucket_app_password"
}Once installed, use the /bitbucket command in Claude Code:
/bitbucket create-pr — Create a pull request
/bitbucket list-prs — List open PRs
/bitbucket get-pr 123 — View PR details
/bitbucket merge-pr 123 — Merge a PR
/bitbucket pr-comments 123 — View PR comments
/bitbucket pipelines — View recent pipelines
Or use natural language:
"Create a PR for the current branch"
"Show me open pull requests"
"Merge PR #42 with squash strategy"
- Python 3.6+ (no external packages — uses stdlib only)
jq(for shell scripts, optional)- Git (for auto-detection of workspace/repo)
MIT License. See LICENSE for details.