agentsclimarketplace

Bitbucket pr

Skill Vishalj32/claude-skills/bitbucket-pr

Creates Bitbucket pull requests from a local git repository using the Bitbucket REST API. Use this skill whenever the user wants to open, create, or raise a PR/pull request on Bitbucket, push their branch for review, or says things like "create a PR", "open a pull request", "raise a PR", "submit my branch for review", or "push this for review". Also triggers when the user asks Claude to summarize their changes and submit them. Handles source branch auto-detection, destination branch selection, title generation from commit messages, and description generation from the diff.From its SKILL.md

Install
npx -y skills add Vishalj32/claude-skills --skill bitbucket-pr

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.6 KB, 936 tokens by cl100k_base, as published. Nobody here has run it

Bitbucket PR Skill

Creates a Bitbucket pull request from the current local git repo using the REST API v2.

Credential safety: Credentials are NEVER read by the model. A bundled Node.js script (scripts/create-pr.js, installed alongside this skill) handles all authentication internally. The model only passes non-sensitive parameters (branch names, title, description) to that script.


Step 1 — Gather git context

Run these commands in the repo root:

# Current (source) branch
git rev-parse --abbrev-ref HEAD

# Commits ahead of destination branch (default: develop)
git log origin/develop..HEAD --oneline

# Full diff vs destination branch
git diff origin/develop...HEAD
  • Source branch: whatever HEAD resolves to. Abort if it's develop, main, or master.
  • Destination branch: default is develop. Use what the user specifies if given.
  • If there are no commits ahead, warn the user and stop.

Step 2 — Generate title and description

Title — from commit messages:

  • One commit: use its subject line directly.
  • Multiple commits: write a single concise sentence (≤72 chars) summarising what they collectively achieve.

Description — from the diff: Write a clear markdown description covering:

  1. What changed — plain-English summary (2–5 sentences)
  2. Why — infer from commit messages if possible
  3. Testing notes — brief placeholder if not obvious

Keep the description under ~300 words.


Step 3 — Confirm with user

Display a summary for review before creating the PR:

Ready to create PR

  From : feature/my-branch
  Into : develop
  Title: <generated title>

  Description:
  <generated description>

Proceed? (yes / edit title / edit description / cancel)

Wait for confirmation. Apply edits and confirm again if requested.


Step 4 — Push branch (if needed)

Check if the source branch has a remote tracking branch:

git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null

If no upstream, push it:

git push -u origin <source-branch>

Step 5 — Create the PR

Call the bundled Node.js script with only non-sensitive parameters. Credentials are loaded securely inside the script and never appear in the model's context.

node ~/.claude/skills/bitbucket-pr/scripts/create-pr.js \
  "<source-branch>" \
  "<destination-branch>" \
  "<title>" \
  "<description>"
  • On success: display the PR URL from the script's output. Done.
  • On error: show the error output and suggest fixes (see Troubleshooting).

Troubleshooting

ErrorLikely causeFix
config file not foundConfig missingCreate .bitbucket.json as shown in Configuration section
Failed to parse config fileInvalid JSONCheck .bitbucket.json syntax
config file missing required fieldsMissing fieldsVerify all 4 fields (username, app_password, workspace, repo_slug) are present
HTTP 401 UnauthorizedWrong credentialsRegenerate app password in Bitbucket; update .bitbucket.json
HTTP 404 Not FoundWrong workspace/repo slugVerify slugs match your Bitbucket URL
HTTP 400 – source branch not foundBranch not pushedEnsure branch is pushed to remote (Step 4 should handle this)
HTTP 400 – PR already existsDuplicate PRCheck Bitbucket for an existing open PR on this branch
No commits aheadBranch not divergedMake commits first or verify you're on the correct branch
ENOENT or script not foundScript missingEnsure ~/.claude/skills/bitbucket-pr/scripts/create-pr.js exists

Notes

  • This skill uses Bitbucket Cloud REST API v2. It does not support Bitbucket Server/Data Center.
  • SSH is used by git for push; the REST API uses the app password from the config file.
  • close_source_branch defaults to false — edit the script if you need to change this.
  • To use a non-default config location: export BITBUCKET_CONFIG=/path/to/config.json

What ships with it: 2 files

6.5 KB alongside SKILL.md, 1 of them executable

scripts/

Keep looking

Skills are one crate of 326,512. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.